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 0999B43B0F; Wed, 14 Feb 2024 23:17:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8C7B42EAA; Wed, 14 Feb 2024 23:17:38 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2111.outbound.protection.outlook.com [40.107.93.111]) by mails.dpdk.org (Postfix) with ESMTP id 737CD42E10 for ; Wed, 14 Feb 2024 23:17:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cuyaxoYo4xt1fKwNc4Bn//cMDq+0XO6L9cD+k4av4UNHt+ZGxAzpUWseQZ6wq3SJBxhx3Nmnhh6DrpqnJmsUt1EvB8o2WrdSLwQvB8J2C4vaUB1aNRpuya9qR6jkeSocLq2/z9l0niba+o8iQOH4rWyj8qXiRSbQs660Y843F8P0Z1xM6L2o85v3al9nHLeEoVrIyHYskm0vIPe3zY7CzGJOmoVpPWVVXxBhwCoOta2ZxOqXY/jSjQOY9em/bwGdqsIhimec4ClU5NApzqFiLy4e+XgxE6YufveizsUYwH61Zo+TTt8I85f0QFRzbNoDuHZ4ugENdSCj75KrUIiKxg== 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=LH8CbEbMrf1esZLFlQVCeOhiMumoJCfDZqM/nOPOQN8=; b=irbXM0bR80Is8MzITwhvlax58Ynir/5eAKjIC8Jt0yet1Dd0Uz3hc91lh02t2YxGljBKUdK6NZlMkvvr92vAvx0kLpskrNovRnvvgPyAiJaLLjje+ALRU7+NlQRRkCMOqqrXCLTPIcv4wtjwK4xETOBPfah1tT2XR3vdSK8xUeP2pet33VVFNbgVWN0Y2GJtZ9M84a93d3ttdBp7GANNW/0wbx2o1mrCozq61y6D71bUhudQS762qCdUI37SuHHBHu1Ga9vAX3Mm/famDy+6xi9qUJtOAtkQWBNRwFlC4WTi0cvnjrXlawbu+oqifXkzAUpj8TQOblgMn3bYgW8QMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LH8CbEbMrf1esZLFlQVCeOhiMumoJCfDZqM/nOPOQN8=; b=d3HSlfjN+7hVtwwuHCdtLJeK8z2Uqvr/U4IIXIBYYvCoNK5M6JXIF3CsMJd+gsFxUrLTg/1IRRjS8jOBik/kA1RVBJZS3HrLG0jYGPl268iGHWa1s+IyjVhYQwH5LgmuJgTpufrZATR9jK8i5ROv7joYmFc8ILMSGjMkaeElgxU= Received: from PH7PR21MB3263.namprd21.prod.outlook.com (2603:10b6:510:1db::16) by SJ1PR21MB3744.namprd21.prod.outlook.com (2603:10b6:a03:454::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.11; Wed, 14 Feb 2024 22:17:34 +0000 Received: from PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::d1ac:9334:3cd9:f655]) by PH7PR21MB3263.namprd21.prod.outlook.com ([fe80::d1ac:9334:3cd9:f655%6]) with mapi id 15.20.7316.001; Wed, 14 Feb 2024 22:17:34 +0000 From: Long Li To: Alan Elder , Ferruh Yigit , Andrew Rybchenko CC: "dev@dpdk.org" , stephen Subject: RE: [PATCH v4] net/netvsc: fix parsing of VLAN metadata Thread-Topic: [PATCH v4] net/netvsc: fix parsing of VLAN metadata Thread-Index: AQHaW2/EBKdi0WcqC0ejn80OInHE4LEKbzXQ Date: Wed, 14 Feb 2024 22:17:34 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=56178cb2-c070-454c-9d7f-d5fa4a8e41c0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-02-08T14:59:43Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=microsoft.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR21MB3263:EE_|SJ1PR21MB3744:EE_ x-ms-office365-filtering-correlation-id: 10c7410d-065c-4697-285f-08dc2daabe57 x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UddZ2bhttmrz0yvrGNDyvfR3LBocztxC0rxAitzFUDNNhSUhIWFQGsYXwOR/syE+1qjL14/9VlRPWynXNM2rH8YmJgPiAMd6HkO9/b11aAt1QqvxMHNkVNdF3gSMCmMHofzNqb7IZk5DD4+kxL1aWbzJdgLKifgF9gf8/C9M6VMkLWqmv0oN5Wl+nV6BT5R3f0HOlvSKkBsehCqGarMGpis50emkIC+Z2852Vlq/XgJmaURA9a8Hs97rDTuJGkeFXS1ECj+894//9naGvPB1zZ0dojtNO1S2uI5nozR2DPbfMG9YrIwIHDpXd74Q7CRWa/MSxwuR9KXXuuegTX+iGobwCtrIntK8Fg+AnGwSvxFRmTSl+EQb3MA6B0st9/KgDanvSMCqFnCtR0ERw12IO27YkiBljcADoLCe9E+VE/PhcwIFrw+5GUN3X7RcDDP/hmm7X6gGgDk/rbgcDWfdH4NmyGvvjNn9wF7UaY+lzQAeIZC5r8oMQ65yL/ny6sRj/krVdBgEyaLNJGNoEuHaMjVF5YLkVT+wwgalTwL8ejgaq60g6DsVMQ+kh0JAvBv7Rv4flcCfVLQ/UDmvGTDEsGJaKOwSL6glYsYFG/kWN1QSK+Hz6pt1VSJ0zYu91BFZ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR21MB3263.namprd21.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39860400002)(376002)(346002)(396003)(136003)(366004)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(82950400001)(86362001)(82960400001)(10290500003)(38100700002)(71200400001)(110136005)(76116006)(478600001)(7696005)(54906003)(6506007)(316002)(9686003)(26005)(33656002)(122000001)(38070700009)(5660300002)(41300700001)(4744005)(2906002)(8990500004)(66446008)(4326008)(52536014)(8936002)(8676002)(66946007)(64756008)(66476007)(66556008)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6dmyctpF4MwMRzsQbsXl8+lWUfup0sok5H3/IDm/3UViTNO4NhsjUidgJvPl?= =?us-ascii?Q?EqUnV+mUWLR3uwQu9cm/YIO9uv7osgcyeAhaxid2TjXWRvosB8OX25T9jB2S?= =?us-ascii?Q?g0YarjvndgO50yBCrG+un40SXSo3s7PiDhYVVpYUTazyHuTaPL5dr6JDk1jP?= =?us-ascii?Q?ttAgDNxtoFaCGG+NVzy6vkcKLBCJtlKdkYaPtBXrTpb1f3p9C95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jHAGhMsM6ycY7z0p/+aqkEyrGoL7tmwr+n0/mFOB1Goc?= =?us-ascii?Q?WZfiUb6DIaZYeSkh9vt5B77LsxDnquEG+rD8cwqzG5Alccmk9r8NyO122cYM?= =?us-ascii?Q?oycwGhKhlelZriu7zaHF3YllQZY5gtIQDjY/1qwBYYo6s+BD3YyQNsUGZRTe?= =?us-ascii?Q?BXfA6PoJOjBR0bsIICTCORN6rf8v/Fai6aqIMzhYNqh64U5OodZQa4K5CRuj?= =?us-ascii?Q?qy/2NocvuFVpENVaZCHyQ9+3ynLL8I2l6iuWZJwBgqDBsU1ITf/lqf5bF07L?= =?us-ascii?Q?ythZyp3ppmP0MxFsgAVXQZczaF619vrTFfq+P5AxU0Q1y7DDbVROskWA/qb7?= =?us-ascii?Q?2IFJZktjs5KG1VTIY93Zlcw2Dk7xpX9RZ+bR432PxGzFZXcd+JMz9CrSKE02?= =?us-ascii?Q?evrJFAwwqX4MgdRODoAOCA58cpvvXtcoZmoH64AQmwEQyEx19IrWORWTB/H5?= =?us-ascii?Q?SxJJ46dZUprHPkYkUnA70JWrRoLShdHwaoEbg1cN?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR21MB3263.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10c7410d-065c-4697-285f-08dc2daabe57 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Feb 2024 22:17:34.0458 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4XJmTcZqhnh4jaFAMAzZdhiQ8tbcmpV4Wh+sRMExg9vh6kQW/uS4M91rDROWIaTKQkt7j9VocDWgOxME4aTjqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR21MB3744 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 > +#define HN_VLAN_CFI_SHIFT 12 > +#define HN_VLAN_PRI_SHIFT 13 > +#define HN_VLAN_PRI_MASK 0xe000 /* Priority Code Point */ > +#define HN_VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator / Drop > Eligible Indicator */ > +#define HN_VLAN_VID_MASK 0x0fff /* VLAN Identifier */ > + > +#define HN_VLAN_TCI_ID(vlan_tci) ((vlan_tci) & HN_VLAN_VID_MASK) > +#define HN_VLAN_TCI_PRI(vlan_tci) (((vlan_tci) & HN_VLAN_PRI_MASK) >> > HN_VLAN_PRI_SHIFT) > +#define HN_VLAN_TCI_CFI(vlan_tci) (((vlan_tci) & HN_VLAN_CFI_MASK) >> > HN_VLAN_CFI_SHIFT) > +#define HN_VLAN_TCI_MAKE(id, pri, cfi) ((id) | > \ > + ((pri) << HN_VLAN_PRI_SHIFT) | \ > + ((cfi) << HN_VLAN_CFI_SHIFT)) > + The patch looks good. It seems HN_VLAN_TCI_ID, HN_VLAN_TCI_PRI, HN_VLAN_TCI_CFI and HN_VLAN_TCI_M= AKE could be useful to other drivers. (at least to MANA) Ferruh, do you think we should define those common functions in ./lib/net/r= te_ether.h? Thanks Long