From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9233F42BAA; Fri, 26 May 2023 12:16:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1146340DDA; Fri, 26 May 2023 12:16:37 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 6682540A89 for ; Fri, 26 May 2023 12:16:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685096194; x=1716632194; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=3KUo++3Fxsy4iEEAQPW+XcjbxP8F1M25hVwm+kAItWs=; b=jGwO+kQjT+8SULs+SM5t/oH9VAXuWl0qKnPrzpxKTC6xMnB5LQ20q8zS 997BB8+sBNqLZsjZmPuwhoJOs9q1TFAEWSZ+dnE0s+29wUW7k5mTaMHS6 uyb/8pUkieQKXFh8mNKk7P2kURFQfl6EjLPmMnZQ1xO7vE9ucnbXRTah9 6zWByIq/DxMjtphpUp/hm83A+P0V4ZcRNBPTkvCu9JLVUro8/EPOmf8ug lIobcLTa70I2ce7Wx059FbV8fX5VdChvtXPUHha06qOQZueiw5/yN4sql mhUUczLACd/JzOYjZG5ImhhA+CoGW7CqIPeii3zx35PasucMhgffMuJ6l g==; X-IronPort-AV: E=McAfee;i="6600,9927,10721"; a="417654988" X-IronPort-AV: E=Sophos;i="6.00,193,1681196400"; d="scan'208";a="417654988" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2023 03:16:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10721"; a="682676001" X-IronPort-AV: E=Sophos;i="6.00,193,1681196400"; d="scan'208";a="682676001" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga006.jf.intel.com with ESMTP; 26 May 2023 03:16:33 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 26 May 2023 03:16:32 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 26 May 2023 03:16:32 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Fri, 26 May 2023 03:16:32 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Fri, 26 May 2023 03:16:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h2BcrvImZegphlD1E+grC47yjrOpF+iIkVuiQlf6FzAknvk/f/pgRirT5wkSqa+bOWctWuhhHNHQJJhq0487NpaiJtrfa9EcfmHhxg7cM/EBdaMGexOhcAVHv7AMf1KOEi8xprJeD0fXucqDdA9pntCfuG5stWXNF+ZEW59meOsD4PC9K4BNIewGA0n/N2/do+4O+GpTzCCcg/CztdKG+MgVERYK8Drq2It5GyJnG4aQbdW2hXdnjlfp3zEZh3OS19JqAEAeoCEqepDUv0hC9bMLwie/FBuFfCdriBaEjMnJnREn/lhfjFz5MIwLRnyXuibWpv1izfVxIovbNyBBDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ydqxS0YK3+CjdwBDXtsIVd1xRd/5CCooTTSPFbX2eb0=; b=PD4IA0CM1xUMWboASZDGm9RkCj09FltEmA0m6nU2mcDofS/hI6iZ/i5CLFiLN9M/jNOtVdl8SHE2yXG0MnHVVxwFVsryWkbmnCiut2l+MP64PLIuQpvv+FLJf0wTePb5Tvr/Xq8aJiXuOhxgLj1xLMkwSPCUoCtG5v3K+YSEslfXPh38/tS/izX53CHiantDXlER5WD2BWDqZRNI+o/DBcSMhziEv/bfWIR/oQng76pSi28xvPp0gv16giXn/73gTNRQyW9q0TJ6wiKt7FwbTO/96+a9kHEzlsKPcA+gSgei/yzaiVf1/tSfjjD7SsYscudzXhCEfHhF0JytBBJbCQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB6056.namprd11.prod.outlook.com (2603:10b6:510:1d4::20) by SA3PR11MB7536.namprd11.prod.outlook.com (2603:10b6:806:320::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.16; Fri, 26 May 2023 10:16:29 +0000 Received: from PH7PR11MB6056.namprd11.prod.outlook.com ([fe80::9852:1ccd:dfb:3395]) by PH7PR11MB6056.namprd11.prod.outlook.com ([fe80::9852:1ccd:dfb:3395%4]) with mapi id 15.20.6433.017; Fri, 26 May 2023 10:16:29 +0000 From: "Xu, Ke1" To: "Ye, MingjinX" , "dev@dpdk.org" CC: "Yang, Qiming" , "Zhou, YidingX" , "Ye, MingjinX" , "Zhang, Qi Z" Subject: RE: [PATCH v2] net/ice: support double vlan Thread-Topic: [PATCH v2] net/ice: support double vlan Thread-Index: AQHZgAMw+jEQJes8vkCdhpK7lo67bK9sc/tQ Date: Fri, 26 May 2023 10:16:28 +0000 Message-ID: References: <20230420061656.140315-1-mingjinx.ye@intel.com> <20230506100443.215817-1-mingjinx.ye@intel.com> In-Reply-To: <20230506100443.215817-1-mingjinx.ye@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR11MB6056:EE_|SA3PR11MB7536:EE_ x-ms-office365-filtering-correlation-id: 539abeec-ffdf-4931-c681-08db5dd2451c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eAXuoD2T3O3QUTyqVlnF1ymFKQJTRAjRWUreS15SSBMvqRqqUAFvrpItSnfO/NA4YXsVlzSOtzus9Mb6hwGtd8ONfMI3rZkxfUwaG6+yqOukXpGDBFJLwA9Bb3e4RYEaGhJ6SsDPuIRKzmkeivC6LV739kM++RRmZFDQ66erUcAt8vZGgSv81c9KznzbeljIYKYnv3gX3gthbCn/QBwJ4gyg5JBBIM9yIZE3w8pTDoamjcmAXNYZ/kFpx1Ezg4y5stgSlsOhNfjbP8xXF6WdgnHA0TGWvt8zC3in8eW8D3arsfIUN9KbxbtiLu+LGjMNJALRtT1a4RYx1G3eN+vJwn0NYHnTMQa5rfeCb9e6K+/7dELQbt7C1GPoYJOz2JSrX+0wnqBqwFXwhYJosdA9oc/gf93WkZtDWIoXQWioeFoFWasCGzwn+MEZbt9ZLJRxnEc3Pt8HS9M4TGfWxbFVFNUDPsmVZ5hza8Ua1nfkNSG2bGwm4JZRr0qI7uJvyEwrJRr0m7bVBy6h6WyqRXGyFKA4Ct2WUR/6j4omBF7Y1wTiMBkM3cCmqgep9nsRrXZL+Z+dv3GF/DC1s6gQY1okj28JZZDbP+gk9TaJJEPnuZ0YmjG4l/H9aEZ7V1Z52dKV x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6056.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(346002)(39860400002)(376002)(396003)(366004)(451199021)(7696005)(71200400001)(41300700001)(8936002)(6506007)(26005)(107886003)(83380400001)(8676002)(2906002)(9686003)(53546011)(5660300002)(38100700002)(38070700005)(52536014)(33656002)(86362001)(55016003)(186003)(122000001)(82960400001)(4326008)(64756008)(66946007)(76116006)(66556008)(54906003)(110136005)(66476007)(478600001)(66446008)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qtqJN0BsfMyo/IVtWzX4/sh29yKZ/aTMuixe+gddl64FditaxP9K3kZZ6F12?= =?us-ascii?Q?V2Zmhl98gD7oNyaF/ZlkaZjAsEf3K/gFuarRVSKfhWHRevXp+pc4jjG2mAWp?= =?us-ascii?Q?oN997dI1sVGEaRb1B2A8/YzA/Ob0PafWIX2wZQiZ901L+yn+h+vOfPlnsMTI?= =?us-ascii?Q?+Znf2JNIkpZMzlqYf+pl9Gqc/2ZxGlVPjecaJ+WjvCTNt6NXYYmArcdxIEse?= =?us-ascii?Q?Evu2m/Bb7QZPkehsd4t2pnRob1kTZEN2H4K44lQxWRl16ydKZZI1dY6ponNr?= =?us-ascii?Q?9pwbGhsCblHeCWxhLn/AlIkSepWbYDF5eg7OJ3MnypWAWeFj4et/koGXxf+B?= =?us-ascii?Q?EfWXryrCx2zM/3ooaogwmpy809tLMqDqv9q0I7IscLsU4jcJjJbWcu66nA7h?= =?us-ascii?Q?4Ep9yn+L7HKYHoIMHsmpege2gdX4acvY+HIncWP2tVnrY04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M0BniTIRZvttTaV/WVf4cAwg1Epu1tXRDGdrqTgcfbEl6?= =?us-ascii?Q?4Ue++g720sVwmlpMz2L0ag+vzJV4drXJHRQAOhEFslnV15UuZZWHtsuW6qDe?= =?us-ascii?Q?4LwdWT5Z4wVfggGcyHdh5UgzqK6sDPfgIhBDRDX3tumRZSMrUZzYs3a4oIz9?= =?us-ascii?Q?+Y2F68Wlr07r47VB56rkdzUz7qhrpOTEviVO52ilbpx5fuI5ZDGRyyDI9w6W?= =?us-ascii?Q?szfLV10SWj1VoBqnI9c=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6056.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 539abeec-ffdf-4931-c681-08db5dd2451c X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2023 10:16:28.6976 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2ID6mRqCy9p0xHWD+RV1JLg5G8pI2uVUNKlbqZPQkOiSGs8tA8824ejkpCTnYPJwrof2Ui4b8xVvlWZFaM8HHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR11MB7536 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Mingjin Ye > Sent: Saturday, May 6, 2023 6:05 PM > To: dev@dpdk.org > Cc: Yang, Qiming ; Zhou, YidingX > ; Ye, MingjinX ; Zhang, Qi= Z > > Subject: [PATCH v2] net/ice: support double vlan >=20 > Aligned with kernel driver, optimized for inner and outer VLAN handling i= n DPDK, > and implemented double vlan insertion and stripping support. > NIC must work in double vlan mode(DVM), depending on FW/SW. >=20 > 1. Adjust vlan stripping > The vlan stripping enable/disable is applied to the inner vlan. >=20 > 2. Support QinQ stripping > The ice outer vlan strip is enabled/disabled by the mask bit of > `RTE_ETH_RX_OFFLOAD_QINQ_STRIP`, and the user can use "vlan set qinq_stri= p > on 0" to enable or "vlan setqinq_strip off 0" to disable the ice outer vl= an strip in > testpmd. >=20 > 3. Support outer tag type switching > Implement the ethdev `vlan_tpid_set` api to enable outer tag support to h= andle > `RTE_ETHER_TYPE_VLAN`` RTE_ETHER_TYPE_QINQ`` RTE_ETHER_TYPE_QINQ1` > outer tag types. >=20 > 4. Support outer port-based vlan insertion Implement port-based outer vla= n > insertion. User can use "tx_vlan set pvid 0 45 on" to enable or "tx_vlan = set pvid 0 > 45 off" to disable the outer vlan insertion in testpmd. >=20 > Signed-off-by: Mingjin Ye Tested and passed. There are several points need to be mentioned. 1. Only Scalar path is implemented, needs force-max-simd-bitwidth. 2. Not supported: StripQ. 3. Hardware limitation: Requires different outer and inner VLAN type. It me= ans setting outer TPID to 0x88a8 before double VLAN insert. 4. Undefined behaviour: VLAN insert and TPID configured together is not def= ined in this new feature. TPID is designed to work with PVID now. Under this i= mplementation changing TPID would not change the TX outer VLAN type of double VLAN inse= rt. Tested-by: Ke Xu > --- > v2: Apply QinQ when initializing vlan offload. > --- > drivers/net/ice/ice_ethdev.c | 422 +++++++++++++++++++++++++++++++++-- > drivers/net/ice/ice_ethdev.h | 1 + > 2 files changed, 408 insertions(+), 15 deletions(-) >=20