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 779DAA0C4B; Thu, 14 Oct 2021 19:42:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6878140041; Thu, 14 Oct 2021 19:42:46 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2050.outbound.protection.outlook.com [40.107.94.50]) by mails.dpdk.org (Postfix) with ESMTP id 2BB154003C for ; Thu, 14 Oct 2021 19:42:44 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gim0y0f5cquYPN2ejAfmxbQajki39zCjVFcFi32E4c1OOFxpX7mYWPx9i/PMjbJMadNpZPTmOr3r3nYiCG81QhpqOQsbdXj2q1j335wuRe+qcDoudZeVB/Y3Do8Z4TNqSMpNO2bb7K4qx4WL4AE05LThQf2I5B619ejLF1wtxImQnIEfYsiUK0AfNdqCVLV5pf/3j1yZbckUF6h7G+kxyBrOd87R7T6rOmqBUkFlks7sPEGaJy3vcpogvmw4Xa/cX6XZeFw/gmj++QPvokenP2FmIXmpd2F1QhPJfE8tY5+dbttrUcdUFjb5WImeVu5U10zxJ3hIxpt7XMGrNgkJlA== 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=fwQqO7O9G9asgUcoIcUlFyqcdVcTJMK0a2jm697JziE=; b=eYW+Z6pGMNp8DBsKqJTp/HvtdjqDILeH+x/iuwHlK+4gHCmji3NZol3OkSIiPjpycokzP7ds3kmWfUnfEZlhnTOOR85ozprue/AHFYUqaJlYMdZc4zTGU0lZuMdyV2+wt047o/zboXnGTjOhzsHVtea3U1GKJBFnwOIyy2msrM8i4ZMQlHAygZdQ0HfKaZZCtiIAULI7cd40WXBrrvpgeswU3xySdEfzpTx25wdQ3LcCBNzAwlIArAgpdeE6NJspObzvoHWEm/uI4Oi09HM9kKlxeiR78xq/gHFwITIBDi2m741Yqld1NCoRn04xuovWaGfIg12npReSvp2STIMFGw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fwQqO7O9G9asgUcoIcUlFyqcdVcTJMK0a2jm697JziE=; b=HoV2gBmVxwIda6rQsu6GRjTeAHYYk/EQhXL5nE8uhRK7aVA7jBIsx1EJjwWasMBokF7IiMR7612k/qh3E4VNy1bydEnH56euDnBRlUx/7vU0YtZwxTpPmIAtbSb8FW4J7oIDl07Jm9AniM2i0JRSqFJJh7AU6bfh5W9lRqCfCbMgxRacFoxI9uAwvTqfG65EA9xv7ayyRihGljmctnabOKaQL556JhtDa5PgFYt4SjNoyqLAhagKE2shBw75VKj+FKUlJNIIUHEYdG+4DkGw77NsNPzJ0MQEHqhIQaK6Ol0bVmVrelFBFngTuVhB8oLKpWTKMjfqMuaDHr2W0vhdHg== Received: from BN6PR1201MB0227.namprd12.prod.outlook.com (2603:10b6:405:4e::7) by BN6PR12MB1858.namprd12.prod.outlook.com (2603:10b6:404:fe::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20; Thu, 14 Oct 2021 17:42:42 +0000 Received: from BN6PR1201MB0227.namprd12.prod.outlook.com ([fe80::e98f:7bd:1d91:3e9c]) by BN6PR1201MB0227.namprd12.prod.outlook.com ([fe80::e98f:7bd:1d91:3e9c%5]) with mapi id 15.20.4587.030; Thu, 14 Oct 2021 17:42:41 +0000 From: Gregory Etelson To: NBU-Contact-Thomas Monjalon , Ferruh Yigit CC: "dev@dpdk.org" , Matan Azrad , Raslan Darawsheh , "olivier.matz@6wind.com" , Ray Kinsella , Bernard Iremonger Thread-Topic: [PATCH v6 2/2] net: introduce IPv4 ihl and version fields Thread-Index: AQHXwFXG9M/fcfZ1LEuGf25BzpSJJavSmskAgAAO2wCAABtEMA== Date: Thu, 14 Oct 2021 17:42:41 +0000 Message-ID: References: <20210527152858.13312-1-getelson@nvidia.com> <20211013171354.27817-3-getelson@nvidia.com> <84a9b713-4b1d-fb46-5b7d-da8af9411171@intel.com> <2579877.6F7bSuhg24@thomas> In-Reply-To: <2579877.6F7bSuhg24@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0ba09e59-d1b3-4c52-fc4b-08d98f3a05e7 x-ms-traffictypediagnostic: BN6PR12MB1858: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1247; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SzzMKLDhmJnXFdMrtgtvbRyDA+W/+DN5sctJDAsigOxf/dN5ZNOdNTOrCuOBPbPXOyIrJ0uETm5dR7MO3GjGi6OMYeJL+MKZY/PwhsB+f7wP6s8RCAJX6uu3x93G45xeH3BIDCfMx31r/kn0h2KNcbtaAQFmsH1n/oDETsVA7q+ruycKwUq7raS9b44BkNevBG+mPq/6pxaFwE2pBBqmQsYHd7bgz1VxFAYFV8CoZYRQfJ4c9w1fZArFlJV6P+63j+0kcqmDNH8b8O7vypRqMphxLf+2oU0RDqi91PnznhL2Pxf1QE4/3B0Fat0SxqfQEgN4wB/8jUYd3+OpHaUpAVZNLO0diJxSpX87REHBGynVm+J0DsYuA6QqhDquIxyvaXBAccSfboDUN3ZY04gvm3iQOCbfPNm71fWDRLpiTGKDbga88kn/y/JMHBVZA9OMKjrkzryeBUxFG1f/v101hYUNs1XD6aTMZ4LnnhJP5L3k/PRltCr8gwMXH3O4OrY0l2l3hmFXbxUEs52bJEbn9MnJKw2LeXPgInvzxwk7BvLux4ESR5046Z6W0rT/DanvbZ56bXMKGQl4u8f3/ftwwVDOQT62QWrbOkPVO6g9uFrVMx0egIT3tLuN8dxW31lwwievydnqQgNT/J8rySsyk4pXZ0n979JAPMnlwM4Xpln154tbW0Tpl5d1mODmut34lBuG/Lb+vOpmP44fTzJgiA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR1201MB0227.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(6506007)(9686003)(186003)(86362001)(54906003)(7696005)(316002)(26005)(76116006)(33656002)(66446008)(2906002)(110136005)(8676002)(66476007)(66556008)(64756008)(5660300002)(508600001)(52536014)(4744005)(4326008)(38100700002)(71200400001)(122000001)(83380400001)(66946007)(55016002)(38070700005)(8936002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?emPMP6ophX7jtxsMaWp70VezTfhaOsIXi23AiXVhvBpZyj5hTQ+iPZEPnlxr?= =?us-ascii?Q?M/IKd0gge9c5QQtkkfzDVE5je2aafx03T1LvZDKuxIpU0snMkFhgd3F/Rc1S?= =?us-ascii?Q?3oqLlfBDUqZ9rdVoSTUzuCeqS+EnAeppzrWW1PcU8jqhs0B9HXL2ScCxpaiX?= =?us-ascii?Q?Jvy/Lm723AXiv/IZv+UVlMTPXhRo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XaJwD+6E0uivWJ325T+TiSYNuCY6dNs89EngIsTfvF+pqp?= =?us-ascii?Q?1509Go1nszjQy6G41qScrX2YyfcfgCGdGAbk45HVDTKuxRXNDb6OF+yyyJAL?= =?us-ascii?Q?zHN7GPkPXAD1LA22CYCefbYsQfXP5FIvwt6Txi9t8eJXeCGRE0vORgP1DF9b?= =?us-ascii?Q?T2Ri7Ni6kPEZ9APas6bxTXRguGVh5J+yI/WCpS3n1miyDERQ/v6q5qebvNyP?= =?us-ascii?Q?uWHNLeq6QxOfzU9vznigwySK?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN6PR1201MB0227.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ba09e59-d1b3-4c52-fc4b-08d98f3a05e7 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Oct 2021 17:42:41.8750 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: r+c9ek9cdDKjZAy/3oWphZ9+AJpR+Zr70H5vtNp3hJAfK3dmuGKEF1qMzJw8+XcTYYKkMgIqm//DC6ExH14cqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1858 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" Hello Thomas, > > > 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 =3D=3D > RTE_LITTLE_ENDIAN > > > + uint8_t ihl:4; /**< header > length */ > > > + uint8_t version:4; /**< version > */ > > > +#elif RTE_BYTE_ORDER =3D=3D 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. >=20 > In lib/eal/include/generic/rte_byteorder.h we > already have > #if !defined(RTE_BYTE_ORDER) > #error Unknown endianness. > #endif >=20 > So indeed we don't need this last else part. >=20 >=20 I updated the patch in v7. Regards, Gregory