[dpdk-dev] [Bug 402] i40e: cannot add rte_flow with ether_type = ARP

bugzilla at dpdk.org bugzilla at dpdk.org
Thu Feb 20 18:25:47 CET 2020


            Bug ID: 402
           Summary: i40e: cannot add rte_flow with ether_type = ARP
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: dev at dpdk.org
          Reporter: maxime.leroy at 6wind.com
  Target Milestone: ---

Looking into the DPDK Test Plans for i40e, we can see that adding a rte_flow
rule with ether_type equals to ARP should work:
See: https://doc.dpdk.org/dts/test_plans/generic_flow_api_test_plan.html (27.2.
Test case: Fortville ethertype).

When we test with the dpdk master (commit id 538da7a1c), it's a different

  ./build/app/testpmd  --legacy-mem     -c 1f -n 4 -w 0000:85:00.1 -- -i
--rxq=1 --txq=1 --total-num-mbufs=10000
EAL: PCI device 0000:85:00.1 on NUMA socket 1
EAL:   probe driver: 8086:1583 net_i40e
EAL:   using IOMMU type 1 (Type 1)
testpmd> flow validate 0 ingress pattern eth type is 0x0806 / end actions mark
id 0x86 / rss / end
  port_flow_complain(): Caught PMD error type 13 (specific pattern item):
cause: 0x200130880, Unsupported ether_type.: Invalid argument

The pmd complain that the ARP ether_type is not supported. This issue is
related to this test in the code:

Let's try to patch this conditional test: 

--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2649,7 +2649,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
                                if (next_type == RTE_FLOW_ITEM_TYPE_VLAN ||
                                    ether_type == RTE_ETHER_TYPE_IPV4 ||
                                    ether_type == RTE_ETHER_TYPE_IPV6 ||
-                                   ether_type == RTE_ETHER_TYPE_ARP ||
+                                   //ether_type == RTE_ETHER_TYPE_ARP ||
                                    ether_type == outer_tpid) {
                                        rte_flow_error_set(error, EINVAL,

Test again with testpmd:

./build/app/testpmd  --legacy-mem     -c 1f -n 4 -w 0000:85:00.1 -- -i --rxq=1
--txq=1 --total-num-mbufs=10000
testpmd> flow validate 0 ingress pattern eth type is 0x0806 / end actions mark
id 0x86 / rss / end
Flow rule validated
testpmd> flow create 0 ingress pattern eth type is 0x0806 / end actions mark id
0x86 / rss / end
Flow rule #0 created

Now it's working fine. Let's send an arp packet on this interface to see if
it's really working on the hardware side:
testpmd> set fwd rxonly
Set rxonly packet forwarding mode
testpmd> set verbose 1
Change verbose level from 0 to 1
testpmd>  start
testpmd> port 0/queue 0: received 1 packets
  src=3C:FD:FE:A2:7D:E0 - dst=3C:FD:FE:A2:80:F8 - type=0x0806 - length=60 -
nb_segs=1 - FDIR matched ID=0x86 - hw ptype: L2_ETHER_ARP  - sw ptype: L2_ETHER
 - l2_len=14 - Receive queue=0x0

ARP is correctly matched by the i40e nic.  I am not sure to understand why
i40e_flow_parse_fdir_pattern don't want to create rule matching ethertype = arp
(ipv4, ipv6). 

The following commit introduces this conditional test: 42044b69c67d ("net/i40e:
support input set selection for FDIR").

You are receiving this mail because:
You are the assignee for the bug.

More information about the dev mailing list