All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 402] i40e: cannot add rte_flow with ether_type = ARP
Date: Thu, 20 Feb 2020 17:25:47 +0000	[thread overview]
Message-ID: <bug-402-3@http.bugs.dpdk.org/> (raw)

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.

                 reply	other threads:[~2020-02-20 17:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-402-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.