I am trying to build a multi-RX-queue dpdk program, using RSS to split the incoming traffic into RX queues on a single port. Mellanox ConnectX-5 and DPDK Version 19.11 is used for this purpose. It works fine when I use IP over Ethernet packets as input. However when the packet contains IP over MPLS over Ethernet, RSS does not seems to work. As a result, all packets belonging to various flows (with different src & dst IPs, ports) over MPLS are all sent into the same RX queue.
My queries are
- Is there any parameter/techniques in DPDK to distribute MPLS packets to multiple RX queues?
- Is there any way to strip off MPLS tags (between Eth and IP) in hardware, something like
hw_vlan_strip?
My Port configuration is
const struct rte_eth_conf default_port_conf = {
.rxmode = {
.hw_vlan_strip = 0, /* VLAN strip enabled. */
.header_split = 0, /* Header Split disabled. */
.hw_ip_checksum = 0, /* IP checksum offload disabled. */
.hw_strip_crc = 0, /* CRC stripping by hardware disabled. */
},
.rx_adv_conf = {
.rss_conf = {
.rss_key = NULL,
.rss_key_len = 0,
.rss_hf = ETH_RSS_IP,
},
} };
The requirement of
POP_MPLSandRSS on MPLScan be activated viaRTE_FLOWfor supported NIC PMD. Butmellanox mxl5 PMDsupports onlyRTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN & RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN. Only options supported for tunneled packets bymxl5 PMDareMPLSoGRE, MPLSoUD. Hence POP MPLS in HW via PMD is not possible on MXL5 PMD for DPDK 19.11 LTSFor any PMD
RSSis reserved forouter/inner IP addressalong withTCP/UDP/SCTP port numbers. Hence I have to interpretRSS for MPLSasI would like to distribute/ spread packets with different MPLS to various queues. This can be achieved by again usingRTE_FLOWforRTE_FLOW_ITEM_TYPE_MPLSand action field asRTE_FLOW_ACTION_TYPE_QUEUE. Usingmask/range fieldsone can set patterns which can satisfy condition as2 ^ 20 (MPLS id max value) / number of RX queues. hence the recommendation is to use RTE_FLOW_ITEM_TYPE_MPLS from RTE_FLOW and RTE_FLOW_ACTION_TYPE_QUEUE. But there is no IP/PORT RSS hashing for the same.to test the same you can use
flow rulesornote: for
POP MPLSI highly recommend to usePTYPESto identify the metadata and useRX-callabckto modify the packet header.