DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 402] i40e: cannot add rte_flow with ether_type = ARP
@ 2020-02-20 17:25 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2020-02-20 17:25 UTC (permalink / raw)
  To: dev

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@dpdk.org
          Reporter: maxime.leroy@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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-20 17:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 17:25 [dpdk-dev] [Bug 402] i40e: cannot add rte_flow with ether_type = ARP bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).