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 F337243B12; Thu, 15 Feb 2024 12:46:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6859402DF; Thu, 15 Feb 2024 12:46:37 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2060.outbound.protection.outlook.com [40.107.223.60]) by mails.dpdk.org (Postfix) with ESMTP id CCBD24029A for ; Thu, 15 Feb 2024 12:46:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ow6Rc2iOu4h5d/OSj/0zkS4mQrkCNZIlS9H+TB8e05H1rU9abHrPEupjkZQRZ4LL1D17s0MILnR/b5q2QdQSbKitu2Py6TfwSALMV+s/Hbi6H6Bu/7mTihVDN9+ekQhzk/SVS67L69moVghaMtjMi0MpyEslHzKkZ33oRPH6kGKxgGQUcxtlw5ihrU3Wy/MMT89Z0+KBJRN9+ppU7+kS65QwisuV5JZbtKwMxusHr3MkgIpUecLggvIcZoudaFzCdtI2B/1mJtWJ3hV+q6bEiywtDISwIEP80toXM7nGIDX4y9kk/AuaA1AyDfDRETaOQevLIxq0W1J1nOk0hYQvKA== 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=Ww95AeU2VWPLZLX7DVpY+PjClFc0X28X3BA0N7rXFQM=; b=btqossV9sH3dDx4oPlOJBO2EH7zKDOrx1dFK/2VZX6o+5MvJbqXHpMVr2iPuyAr1DocHgLFPJqGs1edLg4muApD4aUR6UbN+8DvVnquZUtXyUOqXuDT56g1iwyRsQih/dxw+8teNdi5NQg5e+7blhukcaptvlWQR+QzC73xhnLxd5dELkkpkfu+5CGk7VlxET2uGHM0ruQJiCIQltkJWOwg480J1hiQBX5MnIz1cTPdjsJ3rYcSA0iII2IHSHC2oiV9p80VDlIn7PxEKglFYgWb0Q4Fj6SgB8agWvCxGSg5x7loLdZRiRBP5KkPOjhlUrbd98XZS2SoacWM8UyJ6jg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ww95AeU2VWPLZLX7DVpY+PjClFc0X28X3BA0N7rXFQM=; b=RvZZDdtHfNZq2GQqhikt20j1ENMRmAt/BMSD40NaJx9+/LKGcYVd6cpNqhOpc9VGhC9nhA0zs7rQ361DBN1mdH0u4Kp2nwzRJ43GAH3L+vvmi9qPHGUnQLJNCoRSCGU28pfsS8qUFdjoHZOqsqL8xXBDXbNe3KB50iu5GdVR4uk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by CYYPR12MB8940.namprd12.prod.outlook.com (2603:10b6:930:bd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.12; Thu, 15 Feb 2024 11:46:33 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%4]) with mapi id 15.20.7292.028; Thu, 15 Feb 2024 11:46:33 +0000 Message-ID: Date: Thu, 15 Feb 2024 11:46:29 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4] net/netvsc: fix parsing of VLAN metadata Content-Language: en-US To: Long Li , Alan Elder , Andrew Rybchenko Cc: "dev@dpdk.org" , stephen References: From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km/6UdcP/0/kEp49aIUhkRnQfmKmNVpcBEs4NqceNCWTQlaXdEwL1lxf1L49dsF5Jz1yvWi3 tMt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ETnr ANrbg1/dJyDmkDxOxVrVquTBbxJbDy2HaIe9wyJTEK2Sznpy62DaHVY+gfDQzexBXM10geHC IIUhEnOUYVaq65X3ZDjyAQnNDBQ4uMqSHZk8DpJ22X+T+IMzWzWl+VyU4UZXjkLKPvlqPjJk 1RbKScek5L2GhxHQbPaD76Hx4Jiel0vm2G+4wei8Ay1+0YRFkhySxogU/uQVXHTv63KzQMak oIfnN/V2R0ucarsvMBW+gwARAQABwsF8BBgBCAAmAhsMFiEESbtpiOmzlcaw8cISVFM+0Ioq b/oFAmR3IPsFCQTeZ44ACgkQVFM+0Ioqb/qINhAAtcor9bevHy22HvJvXX17IOpPSklZJAeQ Az43ZEo5kRlJ8mElc2g3RzYCvL/V3fSiIATxIsLq/MDtYhO8AAvklxND/u2zeBd7BkRZTZZX W1V1cM3oTvfx3LOhDu4f2ExQzCGdkzbXTRswSJIe1W0qwsDp+YPekbrsKp1maZArGeu+6FuW honeosIrWS98QJmscEhP8ooyJkLDCCOgEk+mJ/JBjzcJGuYn6+Iy/ApMw/vqiLGL1UWekcTA g18mREHqIR+A3ZvypIufSFB52oIs1zD/uh/MgmL62bY/Cw6M2SxiVxLRsav9TNkF6ZaNQCgn GqifliCEMvEuLZRBOZSYH2A/PfwjYW0Ss0Gyfywmb2IA990gcQsXxuCLG7pAbWaeYazoYYEQ NYmWatZNMAs68ERI2zvrVxdJ/fBWAllIEd0uQ4P05GtAHPdTIDQYp545+TPV7oyF0LfXcsQs SFVZE6igdvkjfYmh+QOrHGZvpWXLTmffVf/AQ81wspzbfxJ7sYM4P8Mg5kKOsaoUdyA/2qVe cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0608.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:314::8) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CYYPR12MB8940:EE_ X-MS-Office365-Filtering-Correlation-Id: 4aee8135-8fdf-4c35-f63d-08dc2e1bc1be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7M0fDOsUAECf/KvNLGOsPuBBV8mFImi4e2r5tu+WrYPAl1wScw8Jesw4SL2V8TQ1IepTHqsTVOSQdUYs7u37tQjhOPDXkBOtk2xRtay1oVWqB1JgMLSv7RXNRPzBk8ABZxqpqgDSJryRBK8kJlc/B8+Hqdn/AXYwdZVnCzBZhJFh6UcnbMI0tb4Ntm1k2Fr6YPEVvI6GuGOMZkdnlFM2JQX4IStUZNpehNDsw3IznHTQyb4KpFFPcq3ybX9TYLCSyuj84IycSwtSiNn8+QSy2gzNEicYy5Btsx6oHcMuIcUP9Z8U08XuyQ+45JF4Sq+K92i5c2zp6+nScrdVV4nt6c+Jqbx3WgqKtrG0Mjlhho6gZflH9HwgplyB83UgjwRiAF2JuXNnCA+ILIIR3JQ2FoEDeo1FKeT3wVecQ2eEwabpTG2GuVxd16WlHEicdOyRbH8uvynV/yrz8YMR0tbtgnHRv8nDGFeKTXH69rAZ8JtmLH/TTNkld8iVvSzRaCKF4mriM6HUblaUfvuH/sGQ2kX1AmeFM2jlM/rmGwpqi3krZC9/d4Z6PbcWjRbC5wsv X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(346002)(366004)(136003)(396003)(39860400002)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(2906002)(53546011)(26005)(6512007)(6506007)(36756003)(6486002)(478600001)(38100700002)(6666004)(31696002)(86362001)(4326008)(8936002)(66946007)(66476007)(5660300002)(8676002)(2616005)(44832011)(66556008)(110136005)(54906003)(316002)(31686004)(41300700001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eWkvNWdkSzRwR05STEZQMkFENHc1cEtGOEF0RUkzRjJwajlJRkNJaEJxa2ty?= =?utf-8?B?VVVPcXpMbEpmUWVaTTNBV29aWUNjN1lkR2Q0Rk45Tk9NVXR6a3gxRTNUS0cw?= =?utf-8?B?Z3BxTldFcTNic3VvZFVTRlF3aGU2UVJ3RWh4akZVV0VKejg4NmhHZXlLVy9B?= =?utf-8?B?V0NWdytLM0VRaGEvZ2VRREpMaktXWTkvdTVuTzRlU0dyOEJocy9YcHBOU1Zl?= =?utf-8?B?dDhmTko4cGh6RkVPS29FZ2VsVkVoNkhBMGVzWHRic0xLZ0c2TjlaRTd4ZEEw?= =?utf-8?B?amdoVWRWejN1d1VqcjR2Uk8yWFRTb096d0lWZ2J5NGFKSmNXdmlvWFRrT3Rw?= =?utf-8?B?MHA0NGFpMWJxVGZucGRSbi9IbFBqakFRbTZ4bmhMRWtFemZOamMxcXB2MlFn?= =?utf-8?B?c2JkcXBuSGZUVDMyWnhwQUhsdzF5c0FzWjNQeWdpTnNLM1Z5aExkb2ZpdEZW?= =?utf-8?B?M1ZyS2lCTUNFNDlKS2hTbzZxY0dyc0xzc213eUdXNkF3d3NoVENMeGpTR2JQ?= =?utf-8?B?SUlibkRPY1hUNWE0emw4NTkwb1JvTXFGM2xjbE95NG5PbmJNT2ZpazZUMmIr?= =?utf-8?B?Qno1M3RTR05EaHQ5SThKcy9WSk1qN0cvY0dFcjAwRUpjNU9Kbyt4RG0zcHUx?= =?utf-8?B?M0w5ZWozZFpndnowaEFjem1EdjJMWGc2bVhwVmdXZThy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WZ2Q2VCL3NEanpYa29MQWJn?= =?utf-8?B?dUdSWS91bUwrL2c4S2VTeEY1Nk90RUVDbjZyN0Vpcy9DV1NTbDRMcDZ4bEM2?= =?utf-8?B?OUcwTUszVlkyZXc2QWR1Y0E1SU1EZUorSzJpNExsRjVGbkdHcVpTN211VUl2?= =?utf-8?B?ZERiTnhmdWlLbXE3SGZNdjNqZFVRSEdiTFd1TlhsL0d4RDVnODR2ajczUURs?= =?utf-8?B?emVNeHpaTExwZTdzeDdKQWY2eGtzZStMMGpJTG1xTzJoQUxhRFloekI0U2VC?= =?utf-8?B?WHBEM29OQTZPd1BiNkJCVzFVb3lBWkwvWlRvNWkwcEhobUV4angzMk9vYmpZ?= =?utf-8?B?T2ZUZ2RPanJaZUNxOHJ0UFY1dVcrWGhOWDFJaDFwVmZNVjhXM1gxVm52NHd4?= =?utf-8?B?YTdBSW5jczJDbG1hdmtFbnY3TnJNTGNRR0hybTNvcjRLYzRLNUdtaHpDZXlT?= =?utf-8?B?Q3RuVW5qTDB1d3hMbW16empZc3lONGdNdWpnOGVmcWt5Z3pER2VxMmZrSlVo?= =?utf-8?Q?c9WpPeTYbefDKWUz1Rg5a3Xee?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4aee8135-8fdf-4c35-f63d-08dc2e1bc1be X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2024 11:46:33.2872 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1/Ji6m8R46v/pPc/UEFIj72xM4skTzB2oDZ20fMzZ5doxYmdRSIM6J2pJ/ocQEhs X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8940 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 On 2/14/2024 10:17 PM, Long Li wrote: >> +#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_MAKE could be useful to other drivers. (at least to MANA) > > Ferruh, do you think we should define those common functions in ./lib/net/rte_ether.h? > Hi Long, That is good idea indeed, so others can benefit from them. Thanks. @Alan, can you please move above macros to './lib/net/rte_ether.h', with RTE_VLAN_ prefix? And use them from net library in the driver. Btw, CFI seems renamed to DEI (Drop Eligible Indicator), perhaps can be good to go with that acronym.