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 This section is for general information purposes as the binaries provided
61 for this FlexRan release in github.com are built with DPDK 20.11.1 and the
62 mix and match of binaries is not supported.
63 The required DPDK version contains the support of loading the specific
64 Wireless Edge DDP package.
66 - Intel® Ethernet 800 Series Linux Driver (ice) — 1.4.0 (or later)
68 - Wireless Edge DDP Package version (ice_wireless_edge) — 1.3.22.101
70 - Intel® Ethernet 800 Series firmware version — 1.5.4.2 (or later)
72 - Intel® Ethernet 800 Series NVM version — 2.4 (or later)
74 - DPDK version— 21.02 (or later)
76 - For FlexRAN oran_e_maintenance_release_v1.0, corresponding support of CVL 2.4 driver pack and DPDK 21.02 is “experimental” and subject to additional
77 testing and potential changes.
82 The Intel® Ethernet 800 Series Comms DDP package supports only
83 Linux-based operating systems currently.
85 Currently, the eCPRI is fully supported only by DPDK 21.02. It can be
86 loaded either by DPDK or the Intel® Ethernet 800 Series Linux base
89 Wireless Edge DDP Package
90 =========================
92 For details on how to set up DPDK, refer to Intel® Ethernet Controller
93 E810 Data Plane Development Kit (DPDK) Configuration Guide (Doc ID:
96 There are two methods where DDP package can be loaded and used under
97 DPDK (see Section C.3.2 and
98 Section C.3.2 ). For both methods, the
99 user must obtain the ice_wireless_edge-1.3.22.101.pkg or later from
100 Intel (please contact your Intel representative for more information)
102 Option 1: *ice* Linux Base Driver
103 =================================
105 The first option is to have the ice Linux base driver load the package.
107 The *ice* Linux base driver looks for the symbolic link
108 *intel/ice/ddp/ice.pkg* under the default firmware search path, checking
109 the following folders in order:
111 - */lib/firmware/updates/*
115 To install the Comms package, copy the extracted .pkg file and its
116 symbolic link to */lib/firmware/updates/intel/ice/ddp* as follows, and
117 reload the ice driver::
119 # cp /usr/tmp/ice_wireless_edge-1.3.22.101.pkg /lib/firmware/updates/intel/ice/ddp/
120 # ln -sf /lib/firmware/updates/intel/ice/ddp/ice_wireless_edge-1.3.22.101.pkg /lib/firmware/updates/intel/ice/ddp/ice.pkg
126 The kernel message log (*dmesg*) indicates status of package loading in
127 the system. If the driver successfully finds and loads the DDP package,
128 *dmesg* indicates that the DDP package successfully loaded. If not, the
129 driver transitions to safe mode.
131 Once the driver loads the package, the user can unbind the *ice* driver
132 from a desired port on the device so that DPDK can utilize the port.
134 The following example unbinds Port 0 and Port 1 of device on Bus 6,
135 Device 0. Then, the port is bound to either igb_uio or vfio-pci. ::
138 # dpdk-devbind -u 06:00.0
139 # dpdk-devbind -u 06:00.1
140 # dpdk-devbind -b igb_uio 06:00.0 06:00.1
142 Option 2: DPDK Driver Only
143 ==========================
145 The second method is if the system does not have the *ice* driver
146 installed. In this case, the user can download the DDP package from the
147 Intel download center and extract the zip file to obtain the package
148 (*.pkg*) file. Similar to the Linux base driver, the DPDK driver looks
149 for the *intel/ddp/ice.pkg* symbolic link in the kernel default firmware
150 search path */lib/firmware/updates and /lib/firmware/*.
152 Copy the extracted DDP *.pkg* file and its symbolic link to
153 */lib/firmware/intel/ice/ddp*, as follows. ::
155 # cp /usr/tmp/ice_wireless_edge-1.3.22.101 /lib/firmware/intel/ice/ddp/
156 # cp /usr/tmp/ice.pkg /lib/firmware/intel/ice/ddp/
158 When DPDK driver loads, it looks for *ice.pkg* to load. If the file
159 exists, the driver downloads it into the device. If not, the driver
160 transitions into safe mode.
162 Loading DDP Package to a Specific Intel® Ethernet 800 Series Device
163 ===================================================================
165 On a host system running with multiple Intel® Ethernet 800 Series
166 devices, there is sometimes a need to load a specific DDP package on a
167 selected device while loading a different package on the remaining
170 The Intel® Ethernet 800 Series Linux base driver and DPDK driver can
171 both load a specific DDP package to a selected adapter based on the
172 device's serial number. The driver does this by looking for a specific
173 symbolic link package filename containing the selected device's serial
176 The following example illustrates how a user can load a specific package
177 (e.g., *ice_wireless_edge-1.3.22.101*) on the device of Bus 6.
179 1. Find device serial number.
183 To view bus, device, and function of all Intel® Ethernet 800 Series
184 Network Adapters in the system:::
186 # lspci | grep -i Ethernet | grep -i Intel
187 06:00.0 Ethernet controller: Intel Corporation Ethernet Controller E810-C for QSFP (rev 01)
188 06:00.1 Ethernet controller: Intel Corporation Ethernet Controller E810-C for QSFP (rev 01)
189 82:00.0 Ethernet controller: Intel Corporation Ethernet Controller E810-C for SFP (rev 01)
190 82:00.1 Ethernet controller: Intel Corporation Ethernet Controller E810-C for SFP (rev 01)
191 82:00.2 Ethernet controller: Intel Corporation Ethernet Controller E810-C for SFP (rev 01)
192 82:00.3 Ethernet controller: Intel Corporation Ethernet Controller E810-C for SFP (rev 01)
194 Use the **lspci** command to obtain the selected device serial
197 # lspci -vv -s 06:00.0 \| grep -i Serial
198 Capabilities: [150 v1] Device Serial Number 35-11-a0-ff-ff-ca-05-68
200 Or, fully parsed without punctuation:::
202 # lspci -vv -s 06:00.0 \|grep Serial \|awk '{print $7}'|sed s/-//g
205 2. Rename the package file with the device serial number in the name.
209 Copy the specific package over to /lib/firmware/updates/intel/ice/ddp
210 (or /lib/firmware/intel/ice/ ddp) and create a symbolic link with the
211 serial number linking to the package, as shown. The specific symbolic
212 link filename starts with “ice-” followed by the device serial in
213 lower case without dash ('-'). ::
216 /lib/firmware/updates/intel/ice/ddp/ice_wireless_edge-1.3.22.101.pkg
217 /lib/firmware/updates/intel/ice/ddp/ice-3511a0ffffca0568.pkg
219 3. If using Linux kernel driver (*ice*), reload the base driver (not
220 required if using only DPDK driver). ::
225 The driver loads the specific package to the selected device and the
226 OS-default package to the remaining Intel® Ethernet 800 Series
227 devices in the system.
234 Example of output of successful load of Wireless Edge Package to all
237 # dmesg | grep -i "ddp \| safe"
238 [606960.921404] ice 0000:18:00.0: The DDP package was successfully loaded: ICE Wireless Edge Package version 1.3.22.101
239 [606961.672999] ice 0000:18:00.1: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
240 [606962.439067] ice 0000:18:00.2: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
241 [606963.198305] ice 0000:18:00.3: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
242 [606964.252076] ice 0000:51:00.0: The DDP package was successfully loaded: ICE Wireless Edge Package version 1.3.22.101
243 [606965.017082] ice 0000:51:00.1: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
244 [606965.802115] ice 0000:51:00.2: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
245 [606966.576517] ice 0000:51:00.3: DDP package already present on device: ICE Wireless Edge Package version 1.3.22.101
248 If using only DPDK driver:
249 ==========================
251 Verify using DPDK's **testpmd** application to indicate the status
252 And version of the loaded DDP package.
254 Example of eCPRI config with dpdk-testpmd
255 -----------------------------------------
257 16 O-RAN eCPRI IQ streams mapped to 16 independent HW queues each.::
259 #./dpdk-testpmd -l 22-25 -n 4 -a 0000:af:01.0 -- -i --rxq=16 --txq=16 --cmdline-file=/home/flexran_xran/ddp.txt
261 cat /home/flexran_xran/ddp.txt
263 port config mtu 0 9600
264 port config 0 rx_offload vlan_strip on
266 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0000 / end actions queue index 0 / mark / end
267 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0001 / end actions queue index 1 / mark / end
268 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0002 / end actions queue index 2 / mark / end
269 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0003 / end actions queue index 3 / mark / end
270 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0004 / end actions queue index 4 / mark / end
271 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0005 / end actions queue index 5 / mark / end
272 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0006 / end actions queue index 6 / mark / end
273 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0007 / end actions queue index 7 / mark / end
274 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0008 / end actions queue index 8 / mark / end
275 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x0009 / end actions queue index 9 / mark / end
276 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000a / end actions queue index 10 / mark / end
277 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000b / end actions queue index 11 / mark / end
278 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000c / end actions queue index 12 / mark / end
279 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000d / end actions queue index 13 / mark / end
280 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000e / end actions queue index 14 / mark / end
281 flow create 0 ingress pattern eth / ecpri common type iq_data pc_id is 0x000f / end actions queue index 15 / mark / end
287 O-RAN Front haul eCPRI
288 ======================
290 Intel® Ethernet 800 Series DDP capabilities support several
291 functionalities important for the O-RAN FH.
293 - RSS for packet steering based on ecpriMessage
295 - RSS for packet steering based on ecpriRtcid/ecpriPcid
297 - Queue mapping based on ecpriRtcid/ecpriPcid
299 - Queue mapping based on ecpriMessage
301 .. image:: images/O-RAN-FH-VNF.jpg
303 :alt: Figure . O-RAN FH VNF
305 Figure 30. O-RAN FH VNF
307 Table 13. Patterns & Input Sets for Flow Director and RSS (DPDK 21.02)
309 ============================= ========================================
311 ============================= ========================================
312 ETH / VLAN / eCPRI ecpriMessage \| ecpriRtcid/ecpriPcid
313 ETH / VLAN /IPv4(6)/UDP/eCPRI ecpriMessage \| ecpriRtcid/ecpriPcid (*)
314 ============================= ========================================
316 *Note:* \* IP/UDP is not used with FlexRAN
321 DPDK 21.02 allows up to 1024 queues per VF and RSS across up to 64
327 The DPDK Generic flow API (rte_flow) will be used to the configure the
328 Intel® Ethernet 800 Series to match specific ingress traffic and forward
329 it to specified queues.
331 For further information, please refer to section 11 of the DPDK
333 guide <https://doc.dpdk.org/guides/prog_guide/rte_flow.html>.
335 The specific ingress traffic is identified by a matching pattern which
336 is composed of one or more Pattern items (represented by struct
337 rte_flow_item). Once a match has been determined one or more associated
338 Actions (represented by struct rte_flow_action) will be performed.
340 A number of flow rules can be combined such that one rule directs
341 traffic to a queue group based on *ecpriMessage/ ecpriRtcid/ecpriPcid*
342 etc. and a second rule distributes matching packets within that queue
345 The following subset of the RTE Flow API functions can be used to
346 validate, create and destroy RTE Flow rules.
348 RTE Flow Rule Validation
349 ========================
351 A RTE Flow rule is created via a call to the function
352 *rte_flow_validate*. This can be used to check the rule for correctness
353 and whether it would be accepted by the device given sufficient
356 int rte_flow_validate(uint16_t port_id,
357 const struct rte_flow_attr *attr,
358 const struct rte_flow_item pattern[],
359 const struct rte_flow_action *actions[]
360 struct rte_flow_error *error);
363 port_id : port identifier of Ethernet device
365 attr : flow rule attributes(ingress/egress)
367 pattern : pattern specification (list terminated by the END pattern
370 action : associated actions (list terminated by the END action).
372 error : perform verbose error reporting if not NULL.
374 0 is returned upon success, negative errno otherwise.
376 RTE Flow Rule Creation
377 ======================
379 A RTE Flow rule is created via a call to the function *rte_flow_create*.::
381 struct rte_flow * rte_flow_create(uint16_t port_id,
382 const struct rte_flow_attr *attr,
383 const struct rte_flow_item pattern[],
384 const struct rte_flow_action *actions[]
385 struct rte_flow_error *error);
387 port_id : port identifier of Ethernet device
389 attr : flow rule attributes(ingress/egress)
391 pattern : pattern specification (list terminated by the END pattern
394 action : associated actions (list terminated by the END action).
396 error : perform verbose error reporting if not NULL.
398 A valid handle is returned upon success, NULL otherwise.
400 RTE Flow Rule Destruction
401 =========================
403 A RTE Flow rule is destroyed via a call to the function
404 *rte_flow_destroy*.::
406 int rte_flow_destroy(uint16_t port_id,
407 struct rte_flow \*flow,
408 struct rte_flow_error \*error);
410 port_id : port identifier of Ethernet device
412 flow : flow rule handle to destroy.
414 error : perform verbose error reporting if not NULL.
416 0 is returned upon success, negative errno otherwise.
421 All flow rule handles associated with a port can be released using
422 *rte_flow_flush*. They are released as with successive calls to function
423 *rte_flow_destroy*.::
425 int rte_flow_flush(uint16_t port_id,
426 struct rte_flow_error \*error);
428 port_id : port identifier of Ethernet device
430 error : perform verbose error reporting if not NULL.
432 0 is returned upon success, negative errno otherwise.
437 A RTE Flow rule is queried via a call to the function *rte_flow_query*.::
439 int rte_flow_query(uint16_t port_id,
440 struct rte_flow *flow,
441 const struct rte_flow_action *action,
443 struct rte_flow_error *error);
445 port_id : port identifier of Ethernet device
447 flow : flow rule handle to query
449 action : action to query, this must match prototype from flow rule.
451 data : pointer to storage for the associated query data type
453 error : perform verbose error reporting if not NULL.
455 0 is returned upon success, negative errno otherwise.
460 A flow rule is the combination of attributes with a matching pattern and
461 a list of actions. Each flow rules consists of:
463 - **Attributes (represented by struct rte_flow_attr):** properties of a flow rule such as its direction (ingress or egress) and priority.
465 - **Pattern Items (represented by struct rte_flow_item):** is part of a matching pattern that either matches specific packet data or traffic properties.
467 - **Matching pattern:** traffic properties to look for, a combination of any number of items.
469 - **Actions (represented by struct rte_flow_action):** operations to perform whenever a packet is matched by a pattern.
474 Flow rule patterns apply to inbound and/or outbound traffic. For the
475 purposes described in later sections the rules apply to ingress only.
476 For further information, please refer to section 11 of the DPDK
477 Programmers guide <https://doc.dpdk.org/guides/prog_guide/rte_flow.html>.::
479 *struct*\ rte_flow_attr <https://doc.dpdk.org/api/structrte__flow__attr.html>\ *{*
480 *uint32_t*\ group <https://doc.dpdk.org/api/structrte__flow__attr.html#a0d20c78ce80e301ed514bd4b4dec9ec0>\ *;*
481 *uint32_t*\ priority <https://doc.dpdk.org/api/structrte__flow__attr.html#a90249de64da5ae5d7acd34da7ea1b857>\ *;*
482 *uint32_t*\ ingress <https://doc.dpdk.org/api/structrte__flow__attr.html#ae4d19341d5298a2bc61f9eb941b1179c>\ *:1;*
483 *uint32_t*\ egress <https://doc.dpdk.org/api/structrte__flow__attr.html#a33bdc3cfc314d71f3187a8186bc570a9>\ *:1;*
484 *uint32_t*\ transfer <https://doc.dpdk.org/api/structrte__flow__attr.html#a9371183486f590ef35fef41dec806fef>\ *:1;*
485 *uint32_t*\ reserved <https://doc.dpdk.org/api/structrte__flow__attr.html#aa43c4c21b173ada1b6b7568956f0d650>\ *:29;*
491 For the purposes described in later sections Pattern items are primarily
492 for matching protocol headers and packet data, usually associated with a
493 specification structure. These must be stacked in the same order as the
494 protocol layers to match inside packets, starting from the lowest.
496 Item specification structures are used to match specific values among
497 protocol fields (or item properties).
499 Up to three structures of the same type can be set for a given item:
501 - **spec:** values to match (e.g. a given IPv4 address).
503 - **last:** upper bound for an inclusive range with corresponding fields in spec.
505 - **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).
507 Table 14. Example RTE FLOW Item Types
509 +-------------+---------------------------------------+-------------------------+
510 | Item Type\* | Description | Specification Structure |
511 +=============+=======================================+=========================+
512 | END | End marker for item lists | None |
513 +-------------+---------------------------------------+-------------------------+
514 | VOID | Used as a placeholder for convenience | None |
515 +-------------+---------------------------------------+-------------------------+
516 | ETH | Matches an Ethernet header | rte_flow_item_eth |
517 +-------------+---------------------------------------+-------------------------+
518 | VLAN | Matches an 802.1Q/ad VLAN tag. | rte_flow_item_vlan |
519 +-------------+---------------------------------------+-------------------------+
520 | IPV4 | Matches an IPv4 header | rte_flow_item_ipv4 |
521 +-------------+---------------------------------------+-------------------------+
522 | IPV6 | Matches an IPv6 header | rte_flow_item_ipv6 |
523 +-------------+---------------------------------------+-------------------------+
524 | ICMP | Matches an ICMP header. | rte_flow_item_icmp |
525 +-------------+---------------------------------------+-------------------------+
526 | UDP | Matches an UDP header. | rte_flow_item_udp |
527 +-------------+---------------------------------------+-------------------------+
528 | TCP | Matches a TCP header. | rte_flow_item_tcp |
529 +-------------+---------------------------------------+-------------------------+
530 | SCTP | Matches a SCTP header. | rte_flow_item_sctp |
531 +-------------+---------------------------------------+-------------------------+
532 | VXLAN | Matches a VXLAN header. | rte_flow_item_vxlan |
533 +-------------+---------------------------------------+-------------------------+
534 | NVGRE | Matches a NVGRE header. | rte_flow_item_nvgre |
535 +-------------+---------------------------------------+-------------------------+
536 | ECPRI | Matches ECPRI Header | rte_flow_item_ecpri |
537 +-------------+---------------------------------------+-------------------------+
541 RTE_FLOW_ITEM_TYPE_ETH
543 struct rte_flow_item_eth {
544 struct rte_ether_addr dst; /**< Destination MAC. */
545 struct rte_ether_addr src; /**< Source MAC. > */
546 rte_be16_t type; /**< EtherType or TPID.> */
549 struct rte_ether_addr {
550 uint8_t addr_bytes[RTE_ETHER_ADDR_LEN]; /**< Addr bytes in tx order */
555 RTE_FLOW_ITEM_TYPE_IPV4
557 struct rte_flow_item_ipv4 {
558 struct rte_ipv4_hdr hdr; /**< IPv4 header definition. */
561 struct rte_ipv4_hdr {
562 uint8_t version_ihl; /**< version and header length */
563 uint8_t type_of_service; /**< type of service */
564 rte_be16_t total_length; /**< length of packet */
565 rte_be16_t packet_id; /**< packet ID */
566 rte_be16_t fragment_offset; /**< fragmentation offset */
567 uint8_t time_to_live; /**< time to live */
568 uint8_t next_proto_id; /**< protocol ID */
569 rte_be16_t hdr_checksum; /**< header checksum */
570 rte_be32_t src_addr; /**< source address */
571 rte_be32_t dst_addr; /**< destination address */
574 RTE_FLOW_ITEM_TYPE_UDP
576 struct rte_flow_item_udp {
577 struct rte_udp_hdr hdr; /**< UDP header definition. */
581 rte_be16_t src_port; /**< UDP source port. */
582 rte_be16_t dst_port; /**< UDP destination port. */
583 rte_be16_t dgram_len; /**< UDP datagram length */
584 rte_be16_t dgram_cksum; /**< UDP datagram checksum */
587 RTE_FLOW_ITEM_TYPE_ECPRI
589 struct rte_flow_item_ecpri {
590 struct rte_ecpri_combined_msg_hdr hdr;
593 struct rte_ecpri_combined_msg_hdr {
594 struct rte_ecpri_common_hdr common;
596 struct rte_ecpri_msg_iq_data type0;
597 struct rte_ecpri_msg_bit_seq type1;
598 struct rte_ecpri_msg_rtc_ctrl type2;
599 struct rte_ecpri_msg_bit_seq type3;
600 struct rte_ecpri_msg_rm_access type4;
601 struct rte_ecpri_msg_delay_measure type5;
602 struct rte_ecpri_msg_remote_reset type6;
603 struct rte_ecpri_msg_event_ind type7;
607 struct rte_ecpri_common_hdr {
609 rte_be32_t u32; /**< 4B common header in BE */
611 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
612 uint32_t size:16; /**< Payload Size */
613 uint32_t type:8; /**< Message Type */
614 uint32_t c:1; /**< Concatenation Indicator */
615 uint32_t res:3; /**< Reserved */
616 uint32_t revision:4; /**< Protocol Revision */
617 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
618 uint32_t revision:4; /**< Protocol Revision */
619 uint32_t res:3; /**< Reserved */
620 uint32_t c:1; /**< Concatenation Indicator */
621 uint32_t type:8; /**< Message Type */
622 uint32_t size:16; /**< Payload Size */
628 * eCPRI Message Header of Type #0: IQ Data
630 struct rte_ecpri_msg_iq_data {
631 rte_be16_t pc_id; /**< Physical channel ID */
632 rte_be16_t seq_id; /**< Sequence ID */
636 * eCPRI Message Header of Type #1: Bit Sequence
638 struct rte_ecpri_msg_bit_seq {
639 rte_be16_t pc_id; /**< Physical channel ID */
640 rte_be16_t seq_id; /**< Sequence ID */
644 * eCPRI Message Header of Type #2: Real-Time Control Data
646 struct rte_ecpri_msg_rtc_ctrl {
647 rte_be16_t rtc_id; /**< Real-Time Control Data ID */
648 rte_be16_t seq_id; /**< Sequence ID */
652 * eCPRI Message Header of Type #3: Generic Data Transfer
654 struct rte_ecpri_msg_gen_data {
655 rte_be32_t pc_id; /**< Physical channel ID */
656 rte_be32_t seq_id; /**< Sequence ID */
660 * eCPRI Message Header of Type #4: Remote Memory Access
663 struct rte_ecpri_msg_rm_access {
664 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
665 uint32_t ele_id:16; /**< Element ID */
666 uint32_t rr:4; /**< Req/Resp */
667 uint32_t rw:4; /**< Read/Write */
668 uint32_t rma_id:8; /**< Remote Memory Access ID */
669 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
670 uint32_t rma_id:8; /**< Remote Memory Access ID */
671 uint32_t rw:4; /**< Read/Write */
672 uint32_t rr:4; /**< Req/Resp */
673 uint32_t ele_id:16; /**< Element ID */
675 uint8_t addr[6]; /**< 48-bits address */
676 rte_be16_t length; /**< number of bytes */
680 * eCPRI Message Header of Type #5: One-Way Delay Measurement
682 struct rte_ecpri_msg_delay_measure {
683 uint8_t msr_id; /**< Measurement ID */
684 uint8_t act_type; /**< Action Type */
688 * eCPRI Message Header of Type #6: Remote Reset
690 struct rte_ecpri_msg_remote_reset {
691 rte_be16_t rst_id; /**< Reset ID */
692 uint8_t rst_op; /**< Reset Code Op */
696 * eCPRI Message Header of Type #7: Event Indication
698 struct rte_ecpri_msg_event_ind {
699 uint8_t evt_id; /**< Event ID */
700 uint8_t evt_type; /**< Event Type */
701 uint8_t seq; /**< Sequence Number */
702 uint8_t number; /**< Number of Faults/Notif */
709 A matching pattern is formed by stacking items starting from the lowest
710 protocol layer to match. Patterns are terminated by END pattern item.
715 Each possible action is represented by a type. An action can have an
716 associated configuration object. Actions are terminated by the END
719 Table 15. RTE FLOW Actions
721 +----------+----------------------------+-------------------------+
722 | Action\* | Description | Configuration Structure |
723 +==========+============================+=========================+
724 | END || End marker for action | none |
726 +----------+----------------------------+-------------------------+
727 | VOID || Used as a placeholder for | none |
729 +----------+----------------------------+-------------------------+
730 | PASSTHRU || Leaves traffic up for | none |
731 | || additional processing by | |
732 | || subsequent flow rules; | |
733 | || makes a flow rule | |
734 | || non-terminating. | |
735 +----------+----------------------------+-------------------------+
736 | MARK || Attaches an integer value | rte_flow_action_mark |
737 | || to packets and sets | |
738 | || PKT_RX_FDIR and | |
739 | || PKT_RX_FDIR_ID mbuf flags | |
740 +----------+----------------------------+-------------------------+
741 | QUEUE || Assigns packets to a given| rte_flow_action_queue |
743 +----------+----------------------------+-------------------------+
744 | DROP || Drops packets | none |
745 +----------+----------------------------+-------------------------+
746 | COUNT || Enables Counters for this | rte_flow_action_count |
748 +----------+----------------------------+-------------------------+
749 | RSS || Similar to QUEUE, except | rte_flow_action_rss |
750 | || RSS is additionally | |
751 | || performed on packets to | |
752 | || spread them among several | |
753 | || queues according to the | |
754 | || provided parameters. | |
755 +----------+----------------------------+-------------------------+
756 | VF || Directs matching traffic | rte_flow_action_vf |
757 | || to a given virtual | |
758 | || function of the current | |
760 +----------+----------------------------+-------------------------+
762 Route to specific Queue id based on ecpriRtcid/ecpriPcid
763 ========================================================
765 An RTE Flow Rule will be created to match an eCPRI packet with a
766 specific pc_id value and route it to specified queues.
773 Table 16. Pattern Items to match eCPRI packet with a Specific Physical
776 +-------+----------+-----------------------+-----------------------+
777 | Index | Item | Spec | Mask |
778 +=======+==========+=======================+=======================+
779 | 0 | Ethernet | 0 | 0 |
780 +-------+----------+-----------------------+-----------------------+
781 | 1 | eCPRI || hdr.common.type = || hdr.common.type = |
782 | | || RTE_EC || 0xff; |
783 | | || PRI_MSG_TYPE_IQ_DATA;| |
784 | | | || hdr.type0.pc_id = |
785 | | || hdr.type0.pc_id = || 0xffff; |
787 +-------+----------+-----------------------+-----------------------+
789 +-------+----------+-----------------------+-----------------------+
791 The following code sets up the *RTE_FLOW_ITEM_TYPE_ETH* and
792 *RTE_FLOW_ITEM_TYPE_ECPRI* Pattern Items.
794 The *RTE_FLOW_ITEM_TYPE_ECPRI* Pattern is configured to match on the
795 pc_id value (in this case 8 converted to Big Endian byte order).
797 +--------------------------------------------------------------------------+
798 | uint8_t pc_id_be = 0x0800; |
800 | #define MAX_PATTERN_NUM 3 |
802 | struct rte_flow_item pattern[MAX_PATTERN_NUM]; |
804 | struct rte_flow_action action[MAX_ACTION_NUM]; |
806 | struct rte_flow_item_ecpri ecpri_spec; |
808 | struct rte_flow_item_ecpri ecpri_mask; |
812 | patterns[0].type = RTE_FLOW_ITEM_TYPE_ETH; |
814 | patterns[0].spec = 0; |
816 | patterns[0].mask = 0; |
820 | ecpri_spec.hdr.common.type = RTE_ECPRI_MSG_TYPE_IQ_DATA; |
822 | ecpri_spec.hdr.type0.pc_id = pc_id_be; |
824 | ecpri_mask.hdr.common.type = 0xff; |
826 | ecpri_mask.hdr.type0.pc_id = 0xffff; |
828 | ecpri_spec.hdr.common.u32 = rte_cpu_to_be_32(ecpri_spec.hdr.common.u32); |
830 | pattern[1].type = RTE_FLOW_ITEM_TYPE_ECPRI; |
832 | pattern[1].spec = &ecpri_spec; |
834 | pattern[1].mask = &ecpri_mask; |
836 | /\* END the pattern array \*/ |
838 | patterns[2].type = RTE_FLOW_ITEM_TYPE_END |
839 +--------------------------------------------------------------------------+
844 Table 17. QUEUE action for given queue id
846 ===== ====== ====== ==================== ====================
847 Index Action Fields Description Value
848 ===== ====== ====== ==================== ====================
849 0 QUEUE index queue indices to use Must be 0,1,2,3, etc
851 ===== ====== ====== ==================== ====================
853 The following code sets up the action *RTE_FLOW_ACTION_TYPE_QUEUE* and
854 calls the *rte_flow_create* function to create the RTE Flow rule.
856 +----------------------------------------------------------------------+
857 | *#define MAX_ACTION_NUM 2* |
859 | *uint16_t rx_q = 4;* |
861 | *struct rte_flow_action_queue queue = { .index = rx_q };* |
863 | *struct rte_flow \*handle;* |
865 | *struct rte_flow_error err;* |
867 | *struct rte_flow_action actions[MAX_ACTION_NUM];* |
869 | *struct rte_flow_attr attributes = {.ingress = 1 };* |
871 | *action[0].type = RTE_FLOW_ACTION_TYPE_QUEUE;* |
873 | *action[0].conf = &queue;* |
875 | *action[1].type = RTE_FLOW_ACTION_TYPE_END;* |
877 | *handle = rte_flow_create (port_id, &attributes, patterns, actions, |
879 +----------------------------------------------------------------------+