From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 60B0BE72 for ; Tue, 9 Jun 2015 18:17:23 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 09 Jun 2015 08:40:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,581,1427785200"; d="scan'208";a="505565694" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by FMSMGA003.fm.intel.com with ESMTP; 09 Jun 2015 08:40:50 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 9 Jun 2015 23:40:48 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.246]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.168]) with mapi id 14.03.0224.002; Tue, 9 Jun 2015 23:40:46 +0800 From: "Qiu, Michael" To: "Chen, Jing D" , "He, Shaopeng" , "dev@dpdk.org" Thread-Topic: [PATCH 3/3] fm10k: update VLAN offload features Thread-Index: AQHQnOAluwY/Hh1PMkGp4a+E18hDHg== Date: Tue, 9 Jun 2015 15:40:46 +0000 Message-ID: <533710CFB86FA344BFBF2D6802E60286046949A6@SHSMSX101.ccr.corp.intel.com> References: <1433213937-21690-1-git-send-email-shaopeng.he@intel.com> <1433213937-21690-4-git-send-email-shaopeng.he@intel.com> <4341B239C0EFF9468EE453F9E9F4604D016FA28F@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 3/3] fm10k: update VLAN offload features X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2015 16:17:23 -0000 On 2015/6/9 11:27, Chen, Jing D wrote:=0A= > Hi,=0A= >=0A= >=0A= >> -----Original Message-----=0A= >> From: He, Shaopeng=0A= >> Sent: Tuesday, June 02, 2015 10:59 AM=0A= >> To: dev@dpdk.org=0A= >> Cc: Chen, Jing D; Qiu, Michael; He, Shaopeng=0A= >> Subject: [PATCH 3/3] fm10k: update VLAN offload features=0A= >>=0A= >> Fm10k PF/VF does not support QinQ; VLAN strip and filter are always on= =0A= >> for PF/VF ports.=0A= >>=0A= >> Signed-off-by: Shaopeng He =0A= >> ---=0A= >> drivers/net/fm10k/fm10k_ethdev.c | 22 ++++++++++++++++++++++=0A= >> 1 file changed, 22 insertions(+)=0A= >>=0A= >> diff --git a/drivers/net/fm10k/fm10k_ethdev.c=0A= >> b/drivers/net/fm10k/fm10k_ethdev.c=0A= >> index 4f23bf1..9b198a7 100644=0A= >> --- a/drivers/net/fm10k/fm10k_ethdev.c=0A= >> +++ b/drivers/net/fm10k/fm10k_ethdev.c=0A= >> @@ -884,6 +884,27 @@ fm10k_vlan_filter_set(struct rte_eth_dev *dev,=0A= >> uint16_t vlan_id, int on)=0A= >> return (-EIO);=0A= >> }=0A= >>=0A= >> +static void=0A= >> +fm10k_vlan_offload_set(__rte_unused struct rte_eth_dev *dev, int mask)= =0A= >> +{=0A= >> + if (mask & ETH_VLAN_STRIP_MASK) {=0A= >> + if (!dev->data->dev_conf.rxmode.hw_vlan_strip)=0A= >> + PMD_INIT_LOG(ERR, "VLAN stripping is "=0A= >> + "always on in fm10k");=0A= >> + }=0A= >> +=0A= >> + if (mask & ETH_VLAN_EXTEND_MASK) {=0A= >> + if (dev->data->dev_conf.rxmode.hw_vlan_extend)=0A= >> + PMD_INIT_LOG(ERR, "VLAN QinQ is not "=0A= >> + "supported in fm10k");=0A= >> + }=0A= >> +=0A= >> + if (mask & ETH_VLAN_FILTER_MASK) {=0A= >> + if (!dev->data->dev_conf.rxmode.hw_vlan_filter)=0A= >> + PMD_INIT_LOG(ERR, "VLAN filter is always on in=0A= >> fm10k");=0A= >> + }=0A= >> +}=0A= >> +=0A= > Update fm10k_dev_infos_get() to configure above options to expected value= s?=0A= =0A= Could it be better to add CRC strip options to expected values by=0A= convenient?=0A= =0A= Thanks,=0A= Michael=0A= >> /* Add/Remove a MAC address, and update filters */=0A= >> static void=0A= >> fm10k_MAC_filter_set(struct rte_eth_dev *dev, const u8 *mac, bool add)= =0A= >> @@ -1801,6 +1822,7 @@ static const struct eth_dev_ops=0A= >> fm10k_eth_dev_ops =3D {=0A= >> .link_update =3D fm10k_link_update,=0A= >> .dev_infos_get =3D fm10k_dev_infos_get,=0A= >> .vlan_filter_set =3D fm10k_vlan_filter_set,=0A= >> + .vlan_offload_set =3D fm10k_vlan_offload_set,=0A= >> .mac_addr_add =3D fm10k_macaddr_add,=0A= >> .mac_addr_remove =3D fm10k_macaddr_remove,=0A= >> .rx_queue_start =3D fm10k_dev_rx_queue_start,=0A= >> --=0A= >> 1.9.3=0A= >=0A= =0A=