From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 79CD5A0556; Thu, 20 Feb 2020 18:25:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C13881BF98; Thu, 20 Feb 2020 18:25:48 +0100 (CET) Received: from inbox.dpdk.org (xvm-172-178.dc0.ghst.net [95.142.172.178]) by dpdk.org (Postfix) with ESMTP id 35FA91BF95 for ; Thu, 20 Feb 2020 18:25:48 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id 03847A0557; Thu, 20 Feb 2020 18:25:47 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Thu, 20 Feb 2020 17:25:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: maxime.leroy@6wind.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 402] i40e: cannot add rte_flow with ether_type = ARP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" https://bugs.dpdk.org/show_bug.cgi?id=3D402 Bug ID: 402 Summary: i40e: cannot add rte_flow with ether_type =3D 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 (2= 7.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=3D1 --txq=3D1 --total-num-mbufs=3D10000 .... 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 m= ark 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=3Db565280d45= 022292e566cf98f8ccf926d8048d2c#n2649 Let's try to patch this conditional test:=20 --- 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 =3D=3D RTE_FLOW_ITEM_TYPE_VLA= N || ether_type =3D=3D RTE_ETHER_TYPE_IPV4 || ether_type =3D=3D RTE_ETHER_TYPE_IPV6 || - ether_type =3D=3D RTE_ETHER_TYPE_ARP || + //ether_type =3D=3D RTE_ETHER_TYPE_ARP = || ether_type =3D=3D 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 --rx= q=3D1 --txq=3D1 --total-num-mbufs=3D10000 testpmd> flow validate 0 ingress pattern eth type is 0x0806 / end actions m= ark id 0x86 / rss / end Flow rule validated testpmd> flow create 0 ingress pattern eth type is 0x0806 / end actions mar= k 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=3D3C:FD:FE:A2:7D:E0 - dst=3D3C:FD:FE:A2:80:F8 - type=3D0x0806 - lengt= h=3D60 - nb_segs=3D1 - FDIR matched ID=3D0x86 - hw ptype: L2_ETHER_ARP - sw ptype: = L2_ETHER - l2_len=3D14 - Receive queue=3D0x0 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=20 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 = =3D arp (ipv4, ipv6).=20 The following commit introduces this conditional test: 42044b69c67d ("net/i= 40e: support input set selection for FDIR"). --=20 You are receiving this mail because: You are the assignee for the bug.=