1 .. Copyright (c) 2019-2022 Intel
3 .. Licensed under the Apache License, Version 2.0 (the "License");
4 .. you may not use this file except in compliance with the License.
5 .. You may obtain a copy of the License at
7 .. http://www.apache.org/licenses/LICENSE-2.0
9 .. Unless required by applicable law or agreed to in writing, software
10 .. distributed under the License is distributed on an "AS IS" BASIS,
11 .. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 .. See the License for the specific language governing permissions and
13 .. limitations under the License.
16 eCPRI DDP Profile for Columbiaville (Experimental Feature)
17 ==========================================================
24 The Intel® Ethernet 800 Series is the next generation of Intel® Ethernet
25 Controllers and Network Adapters. The Intel® Ethernet 800 Series is
26 designed with an enhanced programmable pipeline, allowing deeper and
27 more diverse protocol header processing. This on-chip capability is
28 called Dynamic Device Personalization (DDP). In the Intel® Ethernet 800
29 Series, a DDP profile is loaded dynamically on driver load per device.
31 A general-purpose DDP package is automatically installed with all
32 supported Intel® Ethernet 800 Series drivers on Windows*, ESX*,
33 FreeBSD*, and Linux\* operating systems, including those provided by the
34 Data Plane Development Kit (DPDK). This general-purpose DDP package is
35 known as the OS-default package.
37 For more information on DDP technology in the Intel® Ethernet 800 Series
38 products and the OS-default package, refer to the Intel® Ethernet
39 Controller E810 Dynamic Device Personalization (DDP) Technology Guide,
40 published here: https://cdrdv2.intel.com/v1/dl/getContent/617015.
42 This document describes an optional DDP package targeted towards the
43 needs of Wireless and Edge (Wireless Edge) customers. This Wireless Edge
44 DDP package (v1.3.22.101) adds support for eCPRI protocols in addition
45 to the protocols in the OS-default package. The Wireless Edge DDP
46 package is supported by DPDK.
48 Starting from DPDK 21.02 drivers and in the future will also be
49 supported by the Intel® Ethernet 800 Series ice driver. on Linux
50 operating systems. The Wireless DDP Package can be loaded on all Intel®
51 Ethernet 800 Series devices, or different packages can be selected via
52 serial number per device.
54 Software/Firmware Requirements
55 ==============================
57 The specific DDP package requires certain firmware and DPDK versions and
58 Intel® Ethernet 800 Series firmware/NVM versions. Support for eCPRI DDP
59 profile included starting from Columbiaville (CVL)release 2.4 or later.
60 The required DPDK version contains the support of loading the specific
61 Wireless Edge DDP package.
63 - Intel® Ethernet 800 Series Linux Driver (ice) — 1.4.0 (or later)
65 - Wireless Edge DDP Package version (ice_wireless_edge) — 1.3.22.101
67 - Intel® Ethernet 800 Series firmware version — 1.5.4.2 (or later)
69 - Intel® Ethernet 800 Series NVM version — 2.4 (or later)
71 - DPDK version— 21.02 (or later)
73 - For FlexRAN release 21.03, corresponding support of CVL 2.4 driver pack and DPDK 21.02 is “experimental” and subject to additional testing and potential changes.
78 The Intel® Ethernet 800 Series Comms DDP package supports only
79 Linux-based operating systems currently.
81 Currently, the eCPRI is fully supported only by DPDK 21.02. It can be
82 loaded either by DPDK or the Intel® Ethernet 800 Series Linux base
85 Wireless Edge DDP Package
86 =========================
88 For details on how to set up DPDK, refer to Intel® Ethernet Controller
89 E810 Data Plane Development Kit (DPDK) Configuration Guide (Doc ID:
92 There are two methods where DDP package can be loaded and used under
93 DPDK (see Section C.3.2 and
94 Section C.3.2 ). For both methods, the
95 user must obtain the ice_wireless_edge-1.3.22.101.pkg or later from
96 Intel (please contact your Intel representative for more information)
98 Option 1: *ice* Linux Base Driver
99 =================================
101 The first option is to have the ice Linux base driver load the package.
103 The *ice* Linux base driver looks for the symbolic link
104 *intel/ice/ddp/ice.pkg* under the default firmware search path, checking
105 the following folders in order:
107 - */lib/firmware/updates/*
111 To install the Comms package, copy the extracted .pkg file and its
112 symbolic link to */lib/firmware/updates/intel/ice/ddp* as follows, and
113 reload the ice driver::
115 # cp /usr/tmp/ice_wireless_edge-1.3.22.101.pkg /lib/firmware/updates/intel/ice/ddp/
116 # ln -sf /lib/firmware/updates/intel/ice/ddp/ice_wireless_edge-1.3.22.101.pkg /lib/firmware/updates/intel/ice/ddp/ice.pkg
122 The kernel message log (*dmesg*) indicates status of package loading in
123 the system. If the driver successfully finds and loads the DDP package,
124 *dmesg* indicates that the DDP package successfully loaded. If not, the
125 driver transitions to safe mode.
127 Once the driver loads the package, the user can unbind the *ice* driver
128 from a desired port on the device so that DPDK can utilize the port.
130 The following example unbinds Port 0 and Port 1 of device on Bus 6,
131 Device 0. Then, the port is bound to either igb_uio or vfio-pci. ::
134 # dpdk-devbind -u 06:00.0
135 # dpdk-devbind -u 06:00.1
136 # dpdk-devbind -b igb_uio 06:00.0 06:00.1
138 Option 2: DPDK Driver Only
139 ==========================
141 The second method is if the system does not have the *ice* driver
142 installed. In this case, the user can download the DDP package from the
143 Intel download center and extract the zip file to obtain the package
144 (*.pkg*) file. Similar to the Linux base driver, the DPDK driver looks
145 for the *intel/ddp/ice.pkg* symbolic link in the kernel default firmware
146 search path */lib/firmware/updates and /lib/firmware/*.
148 Copy the extracted DDP *.pkg* file and its symbolic link to
149 */lib/firmware/intel/ice/ddp*, as follows. ::
151 # cp /usr/tmp/ice_wireless_edge-1.3.22.101 /lib/firmware/intel/ice/ddp/
152 # cp /usr/tmp/ice.pkg /lib/firmware/intel/ice/ddp/
154 When DPDK driver loads, it looks for *ice.pkg* to load. If the file
155 exists, the driver downloads it into the device. If not, the driver
156 transitions into safe mode.
158 Loading DDP Package to a Specific Intel® Ethernet 800 Series Device
159 ===================================================================
161 On a host system running with multiple Intel® Ethernet 800 Series
162 devices, there is sometimes a need to load a specific DDP package on a
163 selected device while loading a different package on the remaining
166 The Intel® Ethernet 800 Series Linux base driver and DPDK driver can
167 both load a specific DDP package to a selected adapter based on the
168 device's serial number. The driver does this by looking for a specific
169 symbolic link package filename containing the selected device's serial
172 The following example illustrates how a user can load a specific package
173 (e.g., *ice_wireless_edge-1.3.22.101*) on the device of Bus 6.
175 1. Find device serial number.
179 To view bus, device, and function of all Intel® Ethernet 800 Series
180 Network Adapters in the system:::
182 # lspci | grep -i Ethernet | grep -i Intel
183 06:00.0 Ethernet controller: Intel Corporation Ethernet Controller E810-C for QSFP (rev 01)
184 06:00.1 Ethernet controller: Intel Corporation Ethernet Controller E810-C for QSFP (rev 01)
185 82:00.0 Ethernet controller: Intel Corporation Ethernet Controller E810-C for SFP (rev 01)
186 82:00.1 Ethernet controller: Intel Corporation Ethernet Controller E810-C for SFP (rev 01)
187 82:00.2 Ethernet controller: Intel Corporation Ethernet Controller E810-C for SFP (rev 01)
188 82:00.3 Ethernet controller: Intel Corporation Ethernet Controller E810-C for SFP (rev 01)
190 Use the **lspci** command to obtain the selected device serial
193 # lspci -vv -s 06:00.0 \| grep -i Serial
194 Capabilities: [150 v1] Device Serial Number 35-11-a0-ff-ff-ca-05-68
196 Or, fully parsed without punctuation:::
198 # lspci -vv -s 06:00.0 \|grep Serial \|awk '{print $7}'|sed s/-//g
201 2. Rename the package file with the device serial number in the name.
205 Copy the specific package over to /lib/firmware/updates/intel/ice/ddp
206 (or /lib/firmware/intel/ice/ ddp) and create a symbolic link with the
207 serial number linking to the package, as shown. The specific symbolic
208 link filename starts with “ice-” followed by the device serial in
209 lower case without dash ('-'). ::
212 /lib/firmware/updates/intel/ice/ddp/ice_wireless_edge-1.3.22.101.pkg
213 /lib/firmware/updates/intel/ice/ddp/ice-3511a0ffffca0568.pkg
215 3. If using Linux kernel driver (*ice*), reload the base driver (not
216 required if using only DPDK driver). ::
221 The driver loads the specific package to the selected device and the
222 OS-default package to the remaining Intel® Ethernet 800 Series
223 devices in the system.
230 Example of output of successful load of Wireless Edge Package to all
233 # dmesg | grep -i "ddp \| safe"
234 [606960.921404] ice 0000:18:00.0: The DDP package was successfully loaded: ICE Wireless Edge Package version 1.3.22.101
235 [606961.672999] ice 0000:18:00.1: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
236 [606962.439067] ice 0000:18:00.2: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
237 [606963.198305] ice 0000:18:00.3: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
238 [606964.252076] ice 0000:51:00.0: The DDP package was successfully loaded: ICE Wireless Edge Package version 1.3.22.101
239 [606965.017082] ice 0000:51:00.1: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
240 [606965.802115] ice 0000:51:00.2: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
241 [606966.576517] ice 0000:51:00.3: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
244 If using only DPDK driver:
245 ==========================
247 Verify using DPDK's **testpmd** application to indicate the status
248 And version of the loaded DDP package.
250 Example of eCPRI config with dpdk-testpmd
251 -----------------------------------------
253 16 O-RAN eCPRI IQ streams mapped to 16 independent HW queues each.::
255 #./dpdk-testpmd -l 22-25 -n 4 -a 0000:af:01.0 -- -i --rxq=16 --txq=16 --cmdline-file=/home/flexran_xran/ddp.txt
257 cat /home/flexran_xran/ddp.txt
259 port config mtu 0 9600
260 port config 0 rx_offload vlan_strip on
262 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0000 / end actions queue index 0 / mark / end
263 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0001 / end actions queue index 1 / mark / end
264 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0002 / end actions queue index 2 / mark / end
265 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0003 / end actions queue index 3 / mark / end
266 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0004 / end actions queue index 4 / mark / end
267 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0005 / end actions queue index 5 / mark / end
268 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0006 / end actions queue index 6 / mark / end
269 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0007 / end actions queue index 7 / mark / end
270 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0008 / end actions queue index 8 / mark / end
271 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0009 / end actions queue index 9 / mark / end
272 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000a / end actions queue index 10 / mark / end
273 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000b / end actions queue index 11 / mark / end
274 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000c / end actions queue index 12 / mark / end
275 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000d / end actions queue index 13 / mark / end
276 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000e / end actions queue index 14 / mark / end
277 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000f / end actions queue index 15 / mark / end
283 O-RAN Front haul eCPRI
284 ======================
286 Intel® Ethernet 800 Series DDP capabilities support several
287 functionalities important for the O-RAN FH.
289 - RSS for packet steering based on ecpriMessage
291 - RSS for packet steering based on ecpriRtcid/ecpriPcid
293 - Queue mapping based on ecpriRtcid/ecpriPcid
295 - Queue mapping based on ecpriMessage
297 .. image:: images/O-RAN-FH-VNF.jpg
299 :alt: Figure . O-RAN FH VNF
301 Figure 30. O-RAN FH VNF
303 Table 13. Patterns & Input Sets for Flow Director and RSS (DPDK 21.02)
305 ============================= ========================================
307 ============================= ========================================
308 ETH / VLAN / eCPRI ecpriMessage \| ecpriRtcid/ecpriPcid
309 ETH / VLAN /IPv4(6)/UDP/eCPRI ecpriMessage \| ecpriRtcid/ecpriPcid (*)
310 ============================= ========================================
312 *Note:* \* IP/UDP is not used with FlexRAN
317 DPDK 21.02 allows up to 1024 queues per VF and RSS across up to 64
323 The DPDK Generic flow API (rte_flow) will be used to the configure the
324 Intel® Ethernet 800 Series to match specific ingress traffic and forward
325 it to specified queues.
327 For further information, please refer to section 11 of the DPDK
329 guide <https://doc.dpdk.org/guides/prog_guide/rte_flow.html>.
331 The specific ingress traffic is identified by a matching pattern which
332 is composed of one or more Pattern items (represented by struct
333 rte_flow_item). Once a match has been determined one or more associated
334 Actions (represented by struct rte_flow_action) will be performed.
336 A number of flow rules can be combined such that one rule directs
337 traffic to a queue group based on *ecpriMessage/ ecpriRtcid/ecpriPcid*
338 etc. and a second rule distributes matching packets within that queue
341 The following subset of the RTE Flow API functions can be used to
342 validate, create and destroy RTE Flow rules.
344 RTE Flow Rule Validation
345 ========================
347 A RTE Flow rule is created via a call to the function
348 *rte_flow_validate*. This can be used to check the rule for correctness
349 and whether it would be accepted by the device given sufficient
352 int rte_flow_validate(uint16_t port_id,
353 const struct rte_flow_attr *attr,
354 const struct rte_flow_item pattern[],
355 const struct rte_flow_action *actions[]
356 struct rte_flow_error *error);
359 port_id : port identifier of Ethernet device
361 attr : flow rule attributes(ingress/egress)
363 pattern : pattern specification (list terminated by the END pattern
366 action : associated actions (list terminated by the END action).
368 error : perform verbose error reporting if not NULL.
370 0 is returned upon success, negative errno otherwise.
372 RTE Flow Rule Creation
373 ======================
375 A RTE Flow rule is created via a call to the function *rte_flow_create*.::
377 struct rte_flow * rte_flow_create(uint16_t port_id,
378 const struct rte_flow_attr *attr,
379 const struct rte_flow_item pattern[],
380 const struct rte_flow_action *actions[]
381 struct rte_flow_error *error);
383 port_id : port identifier of Ethernet device
385 attr : flow rule attributes(ingress/egress)
387 pattern : pattern specification (list terminated by the END pattern
390 action : associated actions (list terminated by the END action).
392 error : perform verbose error reporting if not NULL.
394 A valid handle is returned upon success, NULL otherwise.
396 RTE Flow Rule Destruction
397 =========================
399 A RTE Flow rule is destroyed via a call to the function
400 *rte_flow_destroy*.::
402 int rte_flow_destroy(uint16_t port_id,
403 struct rte_flow \*flow,
404 struct rte_flow_error \*error);
406 port_id : port identifier of Ethernet device
408 flow : flow rule handle to destroy.
410 error : perform verbose error reporting if not NULL.
412 0 is returned upon success, negative errno otherwise.
417 All flow rule handles associated with a port can be released using
418 *rte_flow_flush*. They are released as with successive calls to function
419 *rte_flow_destroy*.::
421 int rte_flow_flush(uint16_t port_id,
422 struct rte_flow_error \*error);
424 port_id : port identifier of Ethernet device
426 error : perform verbose error reporting if not NULL.
428 0 is returned upon success, negative errno otherwise.
433 A RTE Flow rule is queried via a call to the function *rte_flow_query*.::
435 int rte_flow_query(uint16_t port_id,
436 struct rte_flow *flow,
437 const struct rte_flow_action *action,
439 struct rte_flow_error *error);
441 port_id : port identifier of Ethernet device
443 flow : flow rule handle to query
445 action : action to query, this must match prototype from flow rule.
447 data : pointer to storage for the associated query data type
449 error : perform verbose error reporting if not NULL.
451 0 is returned upon success, negative errno otherwise.
456 A flow rule is the combination of attributes with a matching pattern and
457 a list of actions. Each flow rules consists of:
459 - **Attributes (represented by struct rte_flow_attr):** properties of a flow rule such as its direction (ingress or egress) and priority.
461 - **Pattern Items (represented by struct rte_flow_item):** is part of a matching pattern that either matches specific packet data or traffic properties.
463 - **Matching pattern:** traffic properties to look for, a combination of any number of items.
465 - **Actions (represented by struct rte_flow_action):** operations to perform whenever a packet is matched by a pattern.
470 Flow rule patterns apply to inbound and/or outbound traffic. For the
471 purposes described in later sections the rules apply to ingress only.
472 For further information, please refer to section 11 of the DPDK
473 Programmers guide <https://doc.dpdk.org/guides/prog_guide/rte_flow.html>.::
475 *struct*\ rte_flow_attr <https://doc.dpdk.org/api/structrte__flow__attr.html>\ *{*
476 *uint32_t*\ group <https://doc.dpdk.org/api/structrte__flow__attr.html#a0d20c78ce80e301ed514bd4b4dec9ec0>\ *;*
477 *uint32_t*\ priority <https://doc.dpdk.org/api/structrte__flow__attr.html#a90249de64da5ae5d7acd34da7ea1b857>\ *;*
478 *uint32_t*\ ingress <https://doc.dpdk.org/api/structrte__flow__attr.html#ae4d19341d5298a2bc61f9eb941b1179c>\ *:1;*
479 *uint32_t*\ egress <https://doc.dpdk.org/api/structrte__flow__attr.html#a33bdc3cfc314d71f3187a8186bc570a9>\ *:1;*
480 *uint32_t*\ transfer <https://doc.dpdk.org/api/structrte__flow__attr.html#a9371183486f590ef35fef41dec806fef>\ *:1;*
481 *uint32_t*\ reserved <https://doc.dpdk.org/api/structrte__flow__attr.html#aa43c4c21b173ada1b6b7568956f0d650>\ *:29;*
487 For the purposes described in later sections Pattern items are primarily
488 for matching protocol headers and packet data, usually associated with a
489 specification structure. These must be stacked in the same order as the
490 protocol layers to match inside packets, starting from the lowest.
492 Item specification structures are used to match specific values among
493 protocol fields (or item properties).
495 Up to three structures of the same type can be set for a given item:
497 - **spec:** values to match (e.g. a given IPv4 address).
499 - **last:** upper bound for an inclusive range with corresponding fields in spec.
501 - **mask:** bit-mask applied to both spec and last whose purpose is to distinguish the values to take into account and/or partially mask them out (e.g. in order to match an IPv4 address prefix).
503 Table 14. Example RTE FLOW Item Types
505 +-------------+---------------------------------------+-------------------------+
506 | Item Type\* | Description | Specification Structure |
507 +=============+=======================================+=========================+
508 | END | End marker for item lists | None |
509 +-------------+---------------------------------------+-------------------------+
510 | VOID | Used as a placeholder for convenience | None |
511 +-------------+---------------------------------------+-------------------------+
512 | ETH | Matches an Ethernet header | rte_flow_item_eth |
513 +-------------+---------------------------------------+-------------------------+
514 | VLAN | Matches an 802.1Q/ad VLAN tag. | rte_flow_item_vlan |
515 +-------------+---------------------------------------+-------------------------+
516 | IPV4 | Matches an IPv4 header | rte_flow_item_ipv4 |
517 +-------------+---------------------------------------+-------------------------+
518 | IPV6 | Matches an IPv6 header | rte_flow_item_ipv6 |
519 +-------------+---------------------------------------+-------------------------+
520 | ICMP | Matches an ICMP header. | rte_flow_item_icmp |
521 +-------------+---------------------------------------+-------------------------+
522 | UDP | Matches an UDP header. | rte_flow_item_udp |
523 +-------------+---------------------------------------+-------------------------+
524 | TCP | Matches a TCP header. | rte_flow_item_tcp |
525 +-------------+---------------------------------------+-------------------------+
526 | SCTP | Matches a SCTP header. | rte_flow_item_sctp |
527 +-------------+---------------------------------------+-------------------------+
528 | VXLAN | Matches a VXLAN header. | rte_flow_item_vxlan |
529 +-------------+---------------------------------------+-------------------------+
530 | NVGRE | Matches a NVGRE header. | rte_flow_item_nvgre |
531 +-------------+---------------------------------------+-------------------------+
532 | ECPRI | Matches ECPRI Header | rte_flow_item_ecpri |
533 +-------------+---------------------------------------+-------------------------+
537 RTE_FLOW_ITEM_TYPE_ETH
539 struct rte_flow_item_eth {
540 struct rte_ether_addr dst; /**< Destination MAC. */
541 struct rte_ether_addr src; /**< Source MAC. > */
542 rte_be16_t type; /**< EtherType or TPID.> */
545 struct rte_ether_addr {
546 uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]; /**< Addr bytes in tx order */
551 RTE_FLOW_ITEM_TYPE_IPV4
553 struct rte_flow_item_ipv4 {
554 struct rte_ipv4_hdr hdr; /**< IPv4 header definition. */
557 struct rte_ipv4_hdr {
558 uint8_t version_ihl; /**< version and header length */
559 uint8_t type_of_service; /**< type of service */
560 rte_be16_t total_length; /**< length of packet */
561 rte_be16_t packet_id; /**< packet ID */
562 rte_be16_t fragment_offset; /**< fragmentation offset */
563 uint8_t time_to_live; /**< time to live */
564 uint8_t next_proto_id; /**< protocol ID */
565 rte_be16_t hdr_checksum; /**< header checksum */
566 rte_be32_t src_addr; /**< source address */
567 rte_be32_t dst_addr; /**< destination address */
570 RTE_FLOW_ITEM_TYPE_UDP
572 struct rte_flow_item_udp {
573 struct rte_udp_hdr hdr; /**< UDP header definition. */
577 rte_be16_t src_port; /**< UDP source port. */
578 rte_be16_t dst_port; /**< UDP destination port. */
579 rte_be16_t dgram_len; /**< UDP datagram length */
580 rte_be16_t dgram_cksum; /**< UDP datagram checksum */
583 RTE_FLOW_ITEM_TYPE_ECPRI
585 struct rte_flow_item_ecpri {
586 struct rte_ecpri_combined_msg_hdr hdr;
589 struct rte_ecpri_combined_msg_hdr {
590 struct rte_ecpri_common_hdr common;
592 struct rte_ecpri_msg_iq_data type0;
593 struct rte_ecpri_msg_bit_seq type1;
594 struct rte_ecpri_msg_rtc_ctrl type2;
595 struct rte_ecpri_msg_bit_seq type3;
596 struct rte_ecpri_msg_rm_access type4;
597 struct rte_ecpri_msg_delay_measure type5;
598 struct rte_ecpri_msg_remote_reset type6;
599 struct rte_ecpri_msg_event_ind type7;
603 struct rte_ecpri_common_hdr {
605 rte_be32_t u32; /**< 4B common header in BE */
607 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
608 uint32_t size:16; /**< Payload Size */
609 uint32_t type:8; /**< Message Type */
610 uint32_t c:1; /**< Concatenation Indicator */
611 uint32_t res:3; /**< Reserved */
612 uint32_t revision:4; /**< Protocol Revision */
613 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
614 uint32_t revision:4; /**< Protocol Revision */
615 uint32_t res:3; /**< Reserved */
616 uint32_t c:1; /**< Concatenation Indicator */
617 uint32_t type:8; /**< Message Type */
618 uint32_t size:16; /**< Payload Size */
624 * eCPRI Message Header of Type #0: IQ Data
626 struct rte_ecpri_msg_iq_data {
627 rte_be16_t pc_id; /**< Physical channel ID */
628 rte_be16_t seq_id; /**< Sequence ID */
632 * eCPRI Message Header of Type #1: Bit Sequence
634 struct rte_ecpri_msg_bit_seq {
635 rte_be16_t pc_id; /**< Physical channel ID */
636 rte_be16_t seq_id; /**< Sequence ID */
640 * eCPRI Message Header of Type #2: Real-Time Control Data
642 struct rte_ecpri_msg_rtc_ctrl {
643 rte_be16_t rtc_id; /**< Real-Time Control Data ID */
644 rte_be16_t seq_id; /**< Sequence ID */
648 * eCPRI Message Header of Type #3: Generic Data Transfer
650 struct rte_ecpri_msg_gen_data {
651 rte_be32_t pc_id; /**< Physical channel ID */
652 rte_be32_t seq_id; /**< Sequence ID */
656 * eCPRI Message Header of Type #4: Remote Memory Access
659 struct rte_ecpri_msg_rm_access {
660 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
661 uint32_t ele_id:16; /**< Element ID */
662 uint32_t rr:4; /**< Req/Resp */
663 uint32_t rw:4; /**< Read/Write */
664 uint32_t rma_id:8; /**< Remote Memory Access ID */
665 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
666 uint32_t rma_id:8; /**< Remote Memory Access ID */
667 uint32_t rw:4; /**< Read/Write */
668 uint32_t rr:4; /**< Req/Resp */
669 uint32_t ele_id:16; /**< Element ID */
671 uint8_t addr[6]; /**< 48-bits address */
672 rte_be16_t length; /**< number of bytes */
676 * eCPRI Message Header of Type #5: One-Way Delay Measurement
678 struct rte_ecpri_msg_delay_measure {
679 uint8_t msr_id; /**< Measurement ID */
680 uint8_t act_type; /**< Action Type */
684 * eCPRI Message Header of Type #6: Remote Reset
686 struct rte_ecpri_msg_remote_reset {
687 rte_be16_t rst_id; /**< Reset ID */
688 uint8_t rst_op; /**< Reset Code Op */
692 * eCPRI Message Header of Type #7: Event Indication
694 struct rte_ecpri_msg_event_ind {
695 uint8_t evt_id; /**< Event ID */
696 uint8_t evt_type; /**< Event Type */
697 uint8_t seq; /**< Sequence Number */
698 uint8_t number; /**< Number of Faults/Notif */
705 A matching pattern is formed by stacking items starting from the lowest
706 protocol layer to match. Patterns are terminated by END pattern item.
711 Each possible action is represented by a type. An action can have an
712 associated configuration object. Actions are terminated by the END
715 Table 15. RTE FLOW Actions
717 +----------+----------------------------+-------------------------+
718 | Action\* | Description | Configuration Structure |
719 +==========+============================+=========================+
720 | END | End marker for action | none |
722 +----------+----------------------------+-------------------------+
723 | VOID | Used as a placeholder for | none |
725 +----------+----------------------------+-------------------------+
726 | PASSTHRU | Leaves traffic up for | none |
727 | | additional processing by | |
728 | | subsequent flow rules; | |
729 | | makes a flow rule | |
730 | | non-terminating. | |
731 +----------+----------------------------+-------------------------+
732 | MARK | Attaches an integer value | rte_flow_action_mark |
733 | | to packets and sets | |
734 | | PKT_RX_FDIR and | |
735 | | PKT_RX_FDIR_ID mbuf flags | |
736 +----------+----------------------------+-------------------------+
737 | QUEUE | Assigns packets to a given | rte_flow_action_queue |
739 +----------+----------------------------+-------------------------+
740 | DROP | Drops packets | none |
741 +----------+----------------------------+-------------------------+
742 | COUNT | Enables Counters for this | rte_flow_action_count |
744 +----------+----------------------------+-------------------------+
745 | RSS | Similar to QUEUE, except | rte_flow_action_rss |
746 | | RSS is additionally | |
747 | | performed on packets to | |
748 | | spread them among several | |
749 | | queues according to the | |
750 | | provided parameters. | |
751 +----------+----------------------------+-------------------------+
752 | VF | Directs matching traffic | rte_flow_action_vf |
753 | | to a given virtual | |
754 | | function of the current | |
756 +----------+----------------------------+-------------------------+
758 Route to specific Queue id based on ecpriRtcid/ecpriPcid
759 ========================================================
761 An RTE Flow Rule will be created to match an eCPRI packet with a
762 specific pc_id value and route it to specified queues.
769 Table 16. Pattern Items to match eCPRI packet with a Specific Physical
772 +-------+----------+-----------------------+-----------------------+
773 | Index | Item | Spec | Mask |
774 +=======+==========+=======================+=======================+
775 | 0 | Ethernet | 0 | 0 |
776 +-------+----------+-----------------------+-----------------------+
777 | 1 | eCPRI | hdr.common.type = | hdr.common.type = |
778 | | | RTE_EC | 0xff; |
779 | | | PRI_MSG_TYPE_IQ_DATA; | |
780 | | | | hdr.type0.pc_id = |
781 | | | hdr.type0.pc_id = | 0xffff; |
783 +-------+----------+-----------------------+-----------------------+
785 +-------+----------+-----------------------+-----------------------+
787 The following code sets up the *RTE_FLOW_ITEM_TYPE_ETH* and
788 *RTE_FLOW_ITEM_TYPE_ECPRI* Pattern Items.
790 The *RTE_FLOW_ITEM_TYPE_ECPRI* Pattern is configured to match on the
791 pc_id value (in this case 8 converted to Big Endian byte order).
793 +--------------------------------------------------------------------------+
794 | uint8_t pc_id_be = 0x0800; |
796 | #define MAX_PATTERN_NUM 3 |
798 | struct rte_flow_item pattern[MAX_PATTERN_NUM]; |
800 | struct rte_flow_action action[MAX_ACTION_NUM]; |
802 | struct rte_flow_item_ecpri ecpri_spec; |
804 | struct rte_flow_item_ecpri ecpri_mask; |
808 | patterns[0].type = RTE_FLOW_ITEM_TYPE_ETH; |
810 | patterns[0].spec = 0; |
812 | patterns[0].mask = 0; |
816 | ecpri_spec.hdr.common.type = RTE_ECPRI_MSG_TYPE_IQ_DATA; |
818 | ecpri_spec.hdr.type0.pc_id = pc_id_be; |
820 | ecpri_mask.hdr.common.type = 0xff; |
822 | ecpri_mask.hdr.type0.pc_id = 0xffff; |
824 | ecpri_spec.hdr.common.u32 = rte_cpu_to_be_32(ecpri_spec.hdr.common.u32); |
826 | pattern[1].type = RTE_FLOW_ITEM_TYPE_ECPRI; |
828 | pattern[1].spec = &ecpri_spec; |
830 | pattern[1].mask = &ecpri_mask; |
832 | /\* END the pattern array \*/ |
834 | patterns[2].type = RTE_FLOW_ITEM_TYPE_END |
835 +--------------------------------------------------------------------------+
840 Table 17. QUEUE action for given queue id
842 ===== ====== ====== ==================== ====================
843 Index Action Fields Description Value
844 ===== ====== ====== ==================== ====================
845 0 QUEUE index queue indices to use Must be 0,1,2,3, etc
847 ===== ====== ====== ==================== ====================
849 The following code sets up the action *RTE_FLOW_ACTION_TYPE_QUEUE* and
850 calls the *rte_flow_create* function to create the RTE Flow rule.
852 +----------------------------------------------------------------------+
853 | *#define MAX_ACTION_NUM 2* |
855 | *uint16_t rx_q = 4;* |
857 | *struct rte_flow_action_queue queue = { .index = rx_q };* |
859 | *struct rte_flow \*handle;* |
861 | *struct rte_flow_error err;* |
863 | *struct rte_flow_action actions[MAX_ACTION_NUM];* |
865 | *struct rte_flow_attr attributes = {.ingress = 1 };* |
867 | *action[0].type = RTE_FLOW_ACTION_TYPE_QUEUE;* |
869 | *action[0].conf = &queue;* |
871 | *action[1].type = RTE_FLOW_ACTION_TYPE_END;* |
873 | *handle = rte_flow_create (port_id, &attributes, patterns, actions, |
875 +----------------------------------------------------------------------+