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 1DBFEA0C4B; Thu, 14 Oct 2021 17:45:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1307411FE; Thu, 14 Oct 2021 17:45:36 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 6EE0F4112E for ; Thu, 14 Oct 2021 17:45:34 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10137"; a="291190640" X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="291190640" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 08:45:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="716179358" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga006.fm.intel.com with ESMTP; 14 Oct 2021 08:45:29 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 14 Oct 2021 08:45:21 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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; Thu, 14 Oct 2021 08:45:21 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.109) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 14 Oct 2021 08:13:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VGSaj3ogGnG2Arx91c/unLlYcMTYJJmBrp0qRamEA6VMwhFVu1XFs3e677LV5WBbUQUvZqonEUK+yY9sinCkf7YL72qIZ1rdWGh2UsbOzs1yoGMxOG1KH9AxS92R37U2pec1cUUv/L4Wa7WLj1lKPBnTB5UpPXvDZsB0O6q3DxqcPj818H4SMxMYTKI7a5wTV3E+ipoCdJ/YECb/IdlDoH8s9rpxrFCruk9sAZ7PqPkOzEPl+y06dN93REazZavPeDRjP8rTZ226Kv5ktDBhUh1ZpdRD7azFufWcI4eA+v7XgL3eOa3JeDFug9HJE9GXuXaaK6NeLmxe5dpxuP7+xA== 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=9CnVvNCCK7NDcNwSdrMoRedfTJqAB6zm7Ltk9fnSX3E=; b=Z6mkM8ABBcwtNPvr51RXEMBf8rBB9Fljspb9UD17D6KlPupgsmLOOfpr3aGVDaekMtX+UhfIeKS86UCOA54KeA/0d+MZrw0rrAKSApMr+qg0lGD2Dh91Hdck/giecryWCmzRTEDVgP8Tt4+i3nnIUECWzEphxJrB/euWQQw70Ups0nI91k4hZtZhXY9h4WdpeTl0IV9ZHVHaZdc6Hv+vuPUzubSjll0II6knwm+NECZaH/zudv2rBb5tJySM4M0ceIgIvndQXDpE/FKIPGO2soh9mc1jivytbdf9dXfkL9ZGV9aiYmk+vU9rbDHkg6E9uVqPdBTpSjtSX1Klh40SKg== 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=9CnVvNCCK7NDcNwSdrMoRedfTJqAB6zm7Ltk9fnSX3E=; b=lFd+50qWNSZQK1cPoGz+zrEvcFTtQJTiJomicarEGDkIYIuku29G11crYU55j2ySxfWgfnLT/LAvKskdsKMG+0O8+04JUXtGF1KU6bqMvO5dQFBl8LnWF77iycV/llOSX6ONuH91PNrt+A15iTRokEo1XXeFh2uH9tm0gB2Wspo= Authentication-Results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4855.namprd11.prod.outlook.com (2603:10b6:510:41::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Thu, 14 Oct 2021 15:11:22 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%5]) with mapi id 15.20.4608.017; Thu, 14 Oct 2021 15:11:22 +0000 Message-ID: <84a9b713-4b1d-fb46-5b7d-da8af9411171@intel.com> Date: Thu, 14 Oct 2021 16:11:14 +0100 Content-Language: en-US To: Gregory Etelson , CC: , , , , Ray Kinsella , Bernard Iremonger References: <20210527152858.13312-1-getelson@nvidia.com> <20211013171354.27817-1-getelson@nvidia.com> <20211013171354.27817-3-getelson@nvidia.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211013171354.27817-3-getelson@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB8PR06CA0001.eurprd06.prod.outlook.com (2603:10a6:10:100::14) 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 DB8PR06CA0001.eurprd06.prod.outlook.com (2603:10a6:10:100::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.14 via Frontend Transport; Thu, 14 Oct 2021 15:11:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 189c4065-d13f-479d-fdef-08d98f24e20c X-MS-TrafficTypeDiagnostic: PH0PR11MB4855: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:949; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lmdRu9pq/Nk7f91kg0WxZ4goVuGXRyr/pqLmdQdMX27NQhBgyR2mF9fhW+qWIdybEIAY6hn8lsRlbivQFZxCX+AGBCYZxA9azelui9B9Cs03o2UY+FC5c1en/7MuJdYIMpNKi89SNadKxEXMbhqE+2yWDNp86jtVBY/U5CTnKdq+TCVnHhsHswWRKUR/gX/nN8t32SKaduIUGZIsiUnbL21XKg0e5NjODeC4lrGKxC6SXGoLsElmNFp72zGRUaq80cZfXf1kDKLhJTIxBcY9uPhUysSsc57OoGyg+nvvjauH8wmO7bbszGO55IkC4Omt9EuS13w4pTkjEddAyQ/6ncdHINGf36y8CWOVq5RgvODbn2KhScz11K1yg3L+UBtc11zd/M+8gYUP1SZ5j98EDz1T17IFAdy75DZ9yh24qJbBVxDi1OkBKlccvj7Cvzu3p5hkZPkwu23cgxsRvaAsGJmUcAWRdIaXyFI4iVPzciaYUUGG6JBCIK+iKFUOsZ+muNE4FScCoDI4rSNnLz2wENi1hHlIO+saj+efM4dQP/JAEj+inLXfEWthJvf61NzHGKUsVNYj9gjcoMAJ/KQzM+wjxGxl8Cy54gdlcBZVqs2frCak3ByOXowc9Y/pJYC14bZoR1ePAUCtxq6SXhtR2QLAPmfCLy5C5MEYSKPQai2ZWu1pTnoGJslF/ckqToOibYkANrvpgrXRaAKkimFDFQ== 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)(26005)(31686004)(5660300002)(4326008)(66946007)(4744005)(6666004)(956004)(66476007)(82960400001)(2616005)(2906002)(66556008)(8936002)(8676002)(54906003)(6486002)(16576012)(31696002)(44832011)(508600001)(53546011)(186003)(86362001)(36756003)(83380400001)(316002)(107886003)(38100700002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V05LTUh4M0ErRElTcW96YXErSWxZdE0xM1hxV2EzaEpCdkZSM1JDZFNhVTZU?= =?utf-8?B?NXBvcDhyZlhvTFpXVE1qZkJSWjVWOVQrWEZtd2E4b0h2anJOM01VbDNwZDRa?= =?utf-8?B?QUpBbHRWNUprc3ArdnpjOEZqS3B2cUlwWCs3YjhZOWJJWEtpRllhZWlOdGZj?= =?utf-8?B?dWY5UXZBcWM1L3lOQ0hidWowNFAwNWtQU0Z0WFZCdTRzZC91YUthbkNhRzFh?= =?utf-8?B?SXR4Z0EyVzg1MTZtb2o5U2NLZXdMRkVEdS9sZjUxTy9ON0IyWGdBa256aEds?= =?utf-8?B?NFhUVnBFTDhMSm5CVzd5WCtGcnhIS292bDlGb0dnd015NTBYak1IVkNRYlJr?= =?utf-8?B?V2E4cE5sUXFMNGUyeWl4UWhzR3BlY1k3Y3VkbTFjUTRjSUJUV3c1dWcxdksw?= =?utf-8?B?Qm8yWGlHU2J4MXhZdEt1NnJheGJJY3hCODdHQ29RWFdvbXA1eExmZDhaeXVs?= =?utf-8?B?NG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dSaFJT?= =?utf-8?B?eElOY056SlVKUWpnWkI3a1haQmJZSUxHeDBnVFMvMSs3M3JVVFkrOXBYWXNI?= =?utf-8?B?SENralVhdCtqNmJnZjJGRXVZT0VGMHpRZUtZNFU0ZzBNTDBidWFrM3ZvaWZM?= =?utf-8?B?eEJFdFVBSDRQa2hxN2RVN0V4d0lyUTd2UERBTHZKVENkTGFIaEZ0cXNoSmxP?= =?utf-8?B?Szhqak1CZTBaeUMzdEtqTUZhSnpxRGJLU3ZtcU1KaTFNeXp0L1ptRG13NHpv?= =?utf-8?B?MmNsYTZnYXRFWFNpeVpjVE9UTUExa2x4WGNNNzVxb2pNcFp0bjVTbTNUZzF2?= =?utf-8?B?b2llblpOYUN1RVVZS2U4Z2hVMmxsS3VSN2ZTS05ScG9wd0NoaVJ3azY4M0Vk?= =?utf-8?Q?31zgQIRoW7MvyD1TkgIb8ZHI5GfXFBymlICdSAG?= X-MS-Exchange-CrossTenant-Network-Message-Id: 189c4065-d13f-479d-fdef-08d98f24e20c X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2021 15:11:22.6211 (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: ZeiedTfbh7fhsFA0bAh1Umy17yt/f6G3Vq5zxFb9e/JSmwh78rsWjE4PcGx3BJByw+7wqjKhKoWunvnVK1+aug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4855 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6 2/2] net: introduce IPv4 ihl and version fields 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 Sender: "dev" On 10/13/2021 6:13 PM, Gregory Etelson wrote: > struct rte_ipv4_hdr { > - uint8_t version_ihl; /**< version and header length */ > + __extension__ > + union { > + uint8_t version_ihl; /**< version and header length */ > + struct { > +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN > + uint8_t ihl:4; /**< header length */ > + uint8_t version:4; /**< version */ > +#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN > + uint8_t version:4; /**< version */ > + uint8_t ihl:4; /**< header length */ > +#else > +#error "setup endian definition" > +#endif Do we need the last 'else' part? Although it is harmless to have it, other protocol headers for endianness check doesn't have this part, so I think better to be consistent.