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 8F835A057B; Thu, 2 Apr 2020 11:21:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0A2DD1BDAC; Thu, 2 Apr 2020 11:21:33 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 0AD551B91B for ; Thu, 2 Apr 2020 11:21:31 +0200 (CEST) IronPort-SDR: bC3qsw7tWqp6Djnixz7SkDtgditB9N8FcETiUYXggd7iShUXJMVdmiOhb7uKqruy0fKi8N2cLy Iek3xO7/dlBw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2020 02:21:31 -0700 IronPort-SDR: mE5yaUAd+CxEGfNjyCehBWiDu/eEqUxOwEqLO+aQPg3qt/Z28AYfranKftxLHweF7UdEz34zbU V1naIZ4Q4rOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,335,1580803200"; d="scan'208";a="267967034" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 02 Apr 2020 02:21:30 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Apr 2020 02:21:30 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 2 Apr 2020 17:21:28 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Thu, 2 Apr 2020 17:21:28 +0800 From: "Lu, Nannan" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Peng, Yuan" , "Fu, Qi" , "Wang, Haiyue" Thread-Topic: [PATCH v2 04/13] net/ice: add support for MAC VLAN rule Thread-Index: AQHWCL1o+3dXXL2Bx0ugZ/CmBQJ6RahljofQ Date: Thu, 2 Apr 2020 09:21:28 +0000 Message-ID: <41bfd705081d43fe94098f27b0f979f6@intel.com> References: <20200313020806.21654-1-wei.zhao1@intel.com> <20200402064620.47668-1-wei.zhao1@intel.com> <20200402064620.47668-5-wei.zhao1@intel.com> In-Reply-To: <20200402064620.47668-5-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 04/13] net/ice: add support for MAC VLAN rule 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" Tested-by: Lu, Nannan -----Original Message----- From: Zhao1, Wei=20 Sent: Thursday, April 2, 2020 2:46 PM To: dev@dpdk.org Cc: Zhang, Qi Z ; Peng, Yuan ; L= u, Nannan ; Fu, Qi ; Wang, Haiyue ; Zhao1, Wei Subject: [PATCH v2 04/13] net/ice: add support for MAC VLAN rule This patch add support for MAC VLAN rule, it enable swicth filter to direct= packet base on mac address and vlan id. Signed-off-by: Wei Zhao --- drivers/net/ice/ice_switch_filter.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_swit= ch_filter.c index 4edaea3f5..ed02d9805 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -29,6 +29,9 @@ =20 #define ICE_SW_INSET_ETHER ( \ ICE_INSET_DMAC | ICE_INSET_SMAC | ICE_INSET_ETHERTYPE) +#define ICE_SW_INSET_MAC_VLAN ( \ + ICE_INSET_DMAC | ICE_INSET_SMAC | ICE_INSET_ETHERTYPE | \ + ICE_INSET_VLAN_OUTER) #define ICE_SW_INSET_MAC_IPV4 ( \ ICE_INSET_DMAC | ICE_INSET_IPV4_DST | ICE_INSET_IPV4_SRC | \ ICE_INSET_IPV4_PROTO | ICE_INSET_IPV4_TTL | ICE_INSET_IPV4_TOS) @@ -107,6= +110,8 @@ static struct ice_pattern_match_item ice_switch_pattern_dist_co= mms[] =3D { {pattern_ethertype, ICE_SW_INSET_ETHER, ICE_INSET_NONE}, + {pattern_ethertype_vlan, + ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE}, {pattern_eth_ipv4, ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE}, {pattern_eth_ipv4_udp, @@ -149,6 +154,8 @@ static struct ice_pattern_match_item ice_switch_pattern_dist_os[] =3D { {pattern_ethertype, ICE_SW_INSET_ETHER, ICE_INSET_NONE}, + {pattern_ethertype_vlan, + ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE}, {pattern_eth_arp, ICE_INSET_NONE, ICE_INSET_NONE}, {pattern_eth_ipv4, @@ -179,6 +186,8 @@ ice_pattern_match_item ice_switch_pattern_dist_os[] =3D= { =20 static struct ice_pattern_match_item ice_switch_pattern_perm[] =3D { + {pattern_ethertype_vlan, + ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE}, {pattern_eth_ipv4, ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE}, {pattern_eth_ipv4_udp, -- 2.19.1