[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


https://bugs.dpdk.org/show_bug.cgi?id=402

            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
story.

::
  ./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:
https://git.dpdk.org/dpdk/tree/drivers/net/i40e/i40e_flow.c?id=b565280d45022292e566cf98f8ccf926d8048d2c#n2649

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,
                                                     RTE_FLOW_ERROR_TYPE_I

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
  ol_flags: PKT_RX_FDIR PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD
PKT_RX_FDIR_ID PKT_RX_OUTER_L4_CKSUM_UNKNOWN 

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