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 D4448A04C7; Mon, 14 Sep 2020 17:54:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 498681BFC4; Mon, 14 Sep 2020 17:54:27 +0200 (CEST) Received: from us-smtp-delivery-181.mimecast.com (us-smtp-delivery-181.mimecast.com [63.128.21.181]) by dpdk.org (Postfix) with ESMTP id 7EF392BAB for ; Mon, 14 Sep 2020 17:54:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rbbn.com; s=mimecast20180816; t=1600098865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Dznz6ajo9ZHgVtT8PCvzetX2vSLH82Kmo0Axq+OuNg=; b=HRWZcxzoUk4CHBGNmDq8h5wxuvyAFHAbqFwatqDRR1I8YtF/YB5S1tEhbiV4GdIvJVYbmV WhorKXfuI+2/GgjlxG0uE2qZU6paR06B+N0AI9+03OkCUli6j6ZXS/uScRDaU3rRJDLcrz LFzR+LHOMofsizOv8jsaSB69fen+ICk= Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2102.outbound.protection.outlook.com [104.47.70.102]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-512-ua1pFvQ4MbC2pFeVYMgeIw-1; Mon, 14 Sep 2020 11:54:20 -0400 Received: from DM6PR03MB4777.namprd03.prod.outlook.com (2603:10b6:5:18b::26) by DM6PR03MB3883.namprd03.prod.outlook.com (2603:10b6:5:4f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Mon, 14 Sep 2020 15:54:18 +0000 Received: from DM6PR03MB4777.namprd03.prod.outlook.com ([fe80::2196:3be:8122:7b98]) by DM6PR03MB4777.namprd03.prod.outlook.com ([fe80::2196:3be:8122:7b98%4]) with mapi id 15.20.3370.019; Mon, 14 Sep 2020 15:54:18 +0000 From: "Dey, Souvik" To: "beilei.xing@intel.com" , "qi.z.zhang@intel.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH] net/i40e: issue with ADD VLAN from Guest Thread-Index: AQHWEqf0Y8Ukw9A8wkGsh8ICKf7ztqlpOLiQ Date: Mon, 14 Sep 2020 15:54:18 +0000 Message-ID: References: <20200414215847.3156-1-sodey@rbbn.com> In-Reply-To: <20200414215847.3156-1-sodey@rbbn.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [72.70.55.110] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bae53dfc-7536-4a29-bae3-08d858c670a3 x-ms-traffictypediagnostic: DM6PR03MB3883: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PwVjMnjYd8D3yFKa3Ucv2FKqmjf+j8Nk6OOvDz1liYp7ZnaR61cygsO+d9K0kbE11AHjl7G0joonsifEYmh79XudSgSlTSlHruCqtpQuwymJiQRFFEUD1v73OW0J+ZTm+5nagPxYD6CZqW63Sc3uznqgISwFk+MQggDFdCP/YSLB04JO5RJ2D46qZRzQnsD2nmiBqtUqckA3/TyRfYSaMPCjS44Nnb0edh18xmRWdkiVkEUCVEk1+Ko5r4D0TMCM5G0CE5yzQHpWRHQZaC9d/uVgtQYV+W7/zeRxGEu3ICCA1lVaATSbSbjnDNEDXy6rdVZj+FLm7GCwB+HaR26ytw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR03MB4777.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(39860400002)(376002)(366004)(396003)(136003)(66946007)(52536014)(4326008)(64756008)(66446008)(71200400001)(66556008)(55016002)(66476007)(76116006)(186003)(9686003)(2906002)(7696005)(6506007)(110136005)(8676002)(478600001)(53546011)(33656002)(5660300002)(26005)(316002)(8936002)(86362001)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: wRhE6IMmjFtPIIoJJWDECnXHOXTwiIwTJFBVGmrNmY3KhDHzDmogjOUlrfMziLGFpMm+whu7CAMy9DOhGC/A8Uo12kGUhkIYg6ojF3QY/lmuVGMhEkeXJ/K6TrAMsZ9aEnbSn88l1KbPhbVFV+Gtw4JATP2f0JMPDj9jf+RKgnnxu9N1lE/n3wQIUkb/uJB2hxZKKHEQIWTV6C26m3nrdfvqML+pMwXKAiUCUkkZ+gH0pfxVlAM31Vj7a0Ni7U7O8BCAxHn2ojU8JhgKQH5p0yRZ6mW5auTWduAzv1+Xs40rDkWlgP12kLJwkYgr+Mivhv2B1Cx+NBf3WkltFYjl+VIJ3w0TrALTI15XT8gzdd7InFdV9eJY2yHFKDxeF0SkfPWD7u+77FQf9QuPEFi+WljSuFu5H8PKJv3WORdxNUzm+k2NqM2lpXJxt75YvDXA+0zi93L4njR9Ag9lIyxz8It6Z8bHgkdkftftZiUpOPi1tCWvsl3G+r5f8+AnJKrxOc+RBMpbk286f3iTQUhsmGViD2Me+3Jctz0vt+52haph8X0XYQM5gXrawK/SPqAKnxIrab7BS1K9rcHoO+E0DsyqKJjqzLPuGQHuFXx47gOJ/5HIhJpQ/V6ISTXrZRgE+7/BXsd0zg7D3mNTs7FPuw== x-ms-exchange-transport-forked: True x-mc-unique: ua1pFvQ4MbC2pFeVYMgeIw-1 x-originatororg: rbbn.com x-ms-exchange-crosstenant-authas: Internal x-ms-exchange-crosstenant-authsource: DM6PR03MB4777.namprd03.prod.outlook.com x-ms-exchange-crosstenant-network-message-id: bae53dfc-7536-4a29-bae3-08d858c670a3 x-ms-exchange-crosstenant-originalarrivaltime: 14 Sep 2020 15:54:18.8593 (UTC) x-ms-exchange-crosstenant-fromentityheader: Hosted x-ms-exchange-crosstenant-id: 29a671dc-ed7e-4a54-b1e5-8da1eb495dc3 x-ms-exchange-crosstenant-mailboxtype: HOSTED x-ms-exchange-crosstenant-userprincipalname: xGEuHaZplWWufOrFKOyuiB5OEvWiBO/mhESA/+lQTsSRKTJNfw9bETjgY5AbhgMt x-ms-exchange-transport-crosstenantheadersstamped: DM6PR03MB3883 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA81A106 smtp.mailfrom=sodey@rbbn.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: rbbn.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH] net/i40e: issue with ADD VLAN from Guest 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" Hi Zhang, I have submitted this patch way back in April and I see the patch has been = deferred. Is there any particular reason behind that. As I have not receive= d any communication about that was just wondering if there is something wro= ng that I might have done in the patch submission process to cause this. Thanks for your help. -- Regards, Souvik -----Original Message----- From: Dey, Souvik Sent: Tuesday, April 14, 2020 5:59 PM To: beilei.xing@intel.com; qi.z.zhang@intel.com Cc: dev@dpdk.org; Dey, Souvik Subject: [PATCH] net/i40e: issue with ADD VLAN from Guest From: "Dey, Souvik" In case of i40evf pmd, when ADD_VLAN is sent down the linux i40e driver, al= ong with add the vlan the kernel driver also enables the vlan stripping by = default. This might have issues if the app configured DEV_RX_OFFLOAD_VLAN_STRIP as o= ff at the port configuration. The app after adding the VLAN will expect the= VLAN to be coming in the received packets but, due to VLAN_STRIP enabled a= t the PF, it will get stripped. This behavior of the Linux driver causes confussion with the DPDK app using= i40e_pmd. So it is better to check the state of the DEV_RX_OFFLOAD_VLAN_ST= RIP flag in the dev_conf and disable the vlan strip after sending add_vlan = if app configured the VLAN_STRIP as disabled. Signed-off-by: Souvik Dey --- drivers/net/i40e/i40e_ethdev_vf.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethd= ev_vf.c index 244397e..b8b6c57 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1044,6 +1044,7 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vla= nid) { struct i40e_vf *vf =3D I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct virtchnl_vlan_filter_list *vlan_list; +struct rte_eth_conf *dev_conf =3D &dev->data->dev_conf; uint8_t cmd_buffer[sizeof(struct virtchnl_vlan_filter_list) + sizeof(uint16_t)]; int err; @@ -1060,8 +1061,21 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vl= anid) args.out_buffer =3D vf->aq_resp; args.out_size =3D I40E_AQ_BUF_SZ; err =3D i40evf_execute_vf_cmd(dev, &args); -if (err) +if (err) { PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN"); +return ret; +} +/* + * In linux kernel driver on receiving ADD_VLAN it enables + * VLAN_STRIP by default. So disable it if app confifured + * it that way. + */ +if (!(dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)) { +err =3D i40evf_disable_vlan_strip(dev); +if (err) +PMD_DRV_LOG(ERR, "fail to execute command disable_vlan_strip " +"as a part of OP_ADD_VLAN"); +} return err; } -- 2.9.3.windows.1