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 785E4A0C41; Wed, 17 Nov 2021 11:13:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21FAF410E4; Wed, 17 Nov 2021 11:13:06 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 75A4B40040 for ; Wed, 17 Nov 2021 11:13:04 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10170"; a="232641055" X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="232641055" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2021 02:13:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="494859526" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP; 17 Nov 2021 02:13:02 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 17 Nov 2021 02:13:02 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 17 Nov 2021 02:13:02 -0800 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 17 Nov 2021 02:13:02 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DqU3roxd8hogJSRvbwfPqZ9FulGSBeZl23xyM1dfxXAxdxAJcvjjjwKCdLncCJVGvtYnSzsMKpISUn0ilGuLOc3CpkVdqh/ow1QKxD3bMJYuT3CCLk67ScaDyZMxBcz/erx7+LbqrW8lr+BGneUzz2fLlPTBsYhDq3R7F9MOIAIpXCAlp0wTOjbEFe515NvJxhuae0oWHuq9R5UBNX0f8abPLobmAuvodtJkd6mXT+XRVU68hzfrLs9/44THUaovlX6107UaUJhWcrPKXCo91+riODfHmiGE33XsHBe0/XDpsx9zQ3SXp0Ry5U79ybcjjANid/LQeM0En44lrMqFWg== 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=i1hBkzxbXtO35RPty9kROdbFT3e+cdNy/B7N/R/iVBE=; b=gyPmO19no6gqIU0J4QllD3okJmq30H+VLP9jS9h4fGwpkA3eOuHkzZLdcgv1NLW67y6/iLVag8vvnavAzQ/Sx5EBdo6vVcLzfLcBCcDhJozIghiI5qvtToKMlyOtIB6q9DNDNt3/TZglPeywHhHlTPc/ucgjKIHnAzt1n0Dr3XF1ti9jtSL2eEyzebwcNMqGtQbD59cVi2lk/2aNUtL4ZZLgs6vu2mADFWf2pFM39+gnaCP/8e16fZqMaflgOLMJj/rMdvuzwg7dyI5n7SFjsJh/g9sIeHXgsu4p3VXzk3D4DSlL3e6jbvcGzQ3OTad3cYg/7OUUP7lf6MqQLL/+OQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i1hBkzxbXtO35RPty9kROdbFT3e+cdNy/B7N/R/iVBE=; b=KdPfqIcSpj/zJIvyeUZ7kHW0l903xVaa+giiLjtn27qyksQ8b9zNmErQB9TbctDSXD7tLiULGLnaZls0Eqq0pefox8YX3wT2C7gqx+kYnkMYuJQPjW4u/XXoCKj4dwWEHHnpL/S40yVRqXIhb4LmpCf0fVzZMqOZc1okQ211fDY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4838.namprd11.prod.outlook.com (2603:10b6:510:40::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Wed, 17 Nov 2021 10:13:00 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bc5f:31a7:10ad:443c%5]) with mapi id 15.20.4690.028; Wed, 17 Nov 2021 10:13:00 +0000 Message-ID: <3e31e7a7-98b0-cc04-dd19-8f26f281d9e0@intel.com> Date: Wed, 17 Nov 2021 10:12:52 +0000 Subject: Re: [PATCH] net: add macro for VLAN header length Content-Language: en-US To: Thomas Monjalon CC: Rasesh Mody , Shahed Shaikh , Rahul Lakkireddy , Qi Zhang , Xiao Wang , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou , Beilei Xing , Jingjing Wu , Qiming Yang , Rosen Xu , Haiyue Wang , Jiawen Wu , Jian Wang , "Maxime Coquelin" , Chenbo Xia , Olivier Matz , References: <20211110174029.614449-1-ferruh.yigit@intel.com> <7652023.1kbqhHN0E7@thomas> <5199283.magWtXZHGd@thomas> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <5199283.magWtXZHGd@thomas> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0252.eurprd04.prod.outlook.com (2603:10a6:10:28e::17) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0252.eurprd04.prod.outlook.com (2603:10a6:10:28e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Wed, 17 Nov 2021 10:12:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c5f5eba-9a47-4c32-337a-08d9a9b2d55d X-MS-TrafficTypeDiagnostic: PH0PR11MB4838: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7X20w4+W+m/ltR4cD3yWWmNA+3zEh4LVnyriMLJa2JzPsW4ARA71lORpU0rcqlMxgaSWXoKoa7gGzaxW21NnEZOLpzi+XHnR4wfffd3Wcsb38DEMpc7hI4ZcUVvgHlpv8JbFcUe1D5Sv8131WVgxPzCPEhEX6abvQ+DPEknwgANrBS1XXxU10oIbKd7yt6q+sBaxHQNoGi1sFz6hocspCKsxJ9NuroRBe4LgMKXTdfrTxZUHbPQBu3vl1cvC1esRz+OYtJwwX+jbpLGbt1hetAzVSx7b5OgODwpwvgu1JagQ2kpOg8htumvNu/g3EoqvxMYt2Hlc9+0NNfgGxyOdr9JKH4+i4FjURfqkza9TMAz94EnTNpvbOH5Uk63KaUPistMJ5TlyCHe6lHL7+sF0g3UT9ljaMRaIwvVcMS8Klx8Wq/JtJGOqkVGeaAFf23rXZZnvbMPIFcug/GdliDKWeqBWm9GZjWpd7/liH3rGnfL4hiV+s6NyGAfgJny8tp3S0UmyGwb7kIMDhPMZyhGP/iMtMKXm77e9EQ7F2+YycYHfS8gQUKvP3/TKdTmHi7bSUqz1ITHuXQ/D03Ptf3AJMzmHOi+clZwEiyQHVCvje5UNJmLOYlzYvAsdejzYNBM7YnWXYnz7zCVvRDIF0Dt76OLYjiilX+CmkwDTGSWefgQWrcNnEIYw4sy0M4AAiGQ9XMhlmEWoLEUDEyAN24de0g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(4326008)(186003)(316002)(5660300002)(36756003)(6916009)(54906003)(31686004)(8936002)(6666004)(38100700002)(44832011)(26005)(86362001)(53546011)(956004)(2616005)(8676002)(66946007)(7416002)(508600001)(31696002)(16576012)(66556008)(66476007)(6486002)(82960400001)(2906002)(83380400001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?enVaT2dXZ1h4SEVvejYrMWZPRmpDTHlubUszczRRV2YybHVGWUNHN0xVUFNx?= =?utf-8?B?NDRxc3A1UzhBTTVVbUN4ckZTOHNGUFEvUUdRRFhUTHF1cW5kSFJrZE51SUZ5?= =?utf-8?B?Q3U5cTVJeVhHODhTeWdOVStQR3pYTEQveUhIS1FjMHowRDRnWk1xM1ZqWDY3?= =?utf-8?B?T092U1htalJUWFVrV2UrdVB6bUtRVndpRy9sRnNlK2dmSVdNWWRqOHhqaDhl?= =?utf-8?B?M2RrZ0VKL2xzemREV3lXQStBRnc4ZUY3OWFYWTdOY3gyNHJ6ZHFSai9NMGls?= =?utf-8?B?bEhYekl2aWE2elZCN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xS0VzOWtvRzRTWUJzWW0zTUhiRWpR?= =?utf-8?B?YzBFMzRjNVlVWXBDbFRxUHFYUzhCL3ZlVUdwalp3UDQ0TTlPejhRclZxRXMv?= =?utf-8?Q?49nmx0SaPQQWh8DUmKCGPKQ=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1c5f5eba-9a47-4c32-337a-08d9a9b2d55d X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2021 10:13:00.2108 (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: 5XvpabJk6JFq3lJp7WA6gL82arfxVP1tNrDquXOPFbG15BVcFgwZD28eUxj0Z+DzbFLHVKPJhjgbbQk7B6Ax8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4838 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 On 11/17/2021 10:02 AM, Thomas Monjalon wrote: > 17/11/2021 11:00, Ferruh Yigit: >> On 11/16/2021 11:14 PM, Thomas Monjalon wrote: >>> 10/11/2021 18:40, Ferruh Yigit: >>>> Multiple drivers are defining macros for VLAN header length, to remove >>>> the redundancy defining macro in the ether header. >>>> And updated drivers to use the new macro. >>>> >>>> Signed-off-by: Ferruh Yigit >>> [...] >>>> --- a/lib/net/rte_ether.h >>>> +++ b/lib/net/rte_ether.h >>>> +#define RTE_VLAN_HLEN 4 >>> >>> Please could you add a doxygen comment for this constant? >>> >> >> ack. >> >>>> +/** Maximum VLAN frame length, including CRC. */ >>>> #define RTE_ETHER_MAX_VLAN_FRAME_LEN \ >>>> - (RTE_ETHER_MAX_LEN + 4) >>>> - /**< Maximum VLAN frame length, including CRC. */ >>>> + (RTE_ETHER_MAX_LEN + RTE_VLAN_HLEN) >>> >>> What about QinQ? >>> >> >> I am just replacing hardcoded value with macro in this patch. >> Changing 'RTE_ETHER_MAX_LEN' may have unexpected affect, and >> may not be good thing to the at this stage. > > Sure > But can we take this opportunity to note that this macro > does not take QinQ into account? > Just a comment update? > Yep, a can put a brief note. > Same for RTE_VLAN_HLEN, it is only one VLAN. > >