From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4BEDAA0524; Sat, 28 Nov 2020 04:55:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D206C96A; Sat, 28 Nov 2020 04:55:53 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id B4CACC930 for ; Sat, 28 Nov 2020 04:55:49 +0100 (CET) IronPort-SDR: v6xy+xrO/mr7aBcCeEaVhmynGPjTtaDlURvPkdK1dGL+VWQOj1+DVMvZH3/n7OZsPxTXVBVNrJ wiLdrGOjeBwg== X-IronPort-AV: E=McAfee;i="6000,8403,9818"; a="190618446" X-IronPort-AV: E=Sophos;i="5.78,376,1599548400"; d="scan'208";a="190618446" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2020 19:55:45 -0800 IronPort-SDR: vcoWZgx5wG0yNInsMsmbsYmiGj6ZS/HHo5VJRoRJ0WFHRac0XVmaFhe3q/lbqmw+xIVHcxL1uk b+N9G5If/nBg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,376,1599548400"; d="scan'208";a="363372016" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga004.fm.intel.com with ESMTP; 27 Nov 2020 19:55:45 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 27 Nov 2020 19:55:45 -0800 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 27 Nov 2020 19:55:44 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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.1713.5 via Frontend Transport; Fri, 27 Nov 2020 19:55:44 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) 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.1713.5; Fri, 27 Nov 2020 19:55:44 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grPiK222UoBaRr3WLjA+0knLnW9SbMXYanQyeJuW40D9SYP1j660ol1XKZ1wUC19lgcRZcL1aW/anik1+Wllw26GZkx+1xHHbGdwhpqDAz+82rO11Njc/5CCNiFob+M9FFcvuI0Mag7QHJTcZGIJQMk+uxnKW9DiBVvuVkYV04v4zTlNkYxa/gKitOlsrLcP2oD96wEjkaO3Xyf8QiyaQy2orrfhHElmGEvkSADaGw+7vU2yDDIgxXftV1fw+Dcy3jorWlGXtUG4PCsfaOBMgaE+o5BQZqbfjuJrF82jooB6IgR0RnOZA1CoiIk6eFE3x0xhQVbxE3MtGo72Uj57pA== 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-SenderADCheck; bh=JGTgcPsY913hDrQ5iislHv0l4bd36TdW4v8hYSobMKg=; b=OmBvdpf/ITVNOvu/q3nbjTuNWFTnSSmxjv3vRHP+ktsC24KCqKBr8fDSFQGxf56tX4UV+yLLzTbQsLMR9HBWM00zkWI42v3seUGhq2Jm240bMN3FKrO2zpImU5+s0pdl6vm+Ti2Orha4h14AVTZMNccDpAS6815CU/WMLE8zim5qGLxD2DPHzBZk6UIRwOLSi51uKZuE4L9qs7DQpzcGkKGMpcr8MTaRHsMPEStIlkH/YQkTglcj/RbIrPMu7lJ0/73KFSxkZyG25bY4N90lZSDlrd2Ntay69QZsMgT5w5lSp3T11R67rxVnH+Z429EW8R24O+Q+VrFSdg2+lpDMVA== 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=JGTgcPsY913hDrQ5iislHv0l4bd36TdW4v8hYSobMKg=; b=LUOuhqqnJ53mpxQiGdDdXcGfK42tlXUySBPME/LObJae5S3GR3/y8Jfx46ZjY/xrJ9tKrhyZuHC4JcvGWS1zAnjbQg0iTyteK+byQZiWsUCGVyuT+BObn0xvxIDkOwK93CB9hWi430ADJA/a0oVnCiSLMGtwu5Qat0Mhj2cb7DU= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN7PR11MB2820.namprd11.prod.outlook.com (2603:10b6:406:b5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.22; Sat, 28 Nov 2020 03:55:38 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::6023:fb44:aa7b:cf29]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::6023:fb44:aa7b:cf29%7]) with mapi id 15.20.3589.030; Sat, 28 Nov 2020 03:55:38 +0000 From: "Wang, Haiyue" To: Bing Zhao , "Yigit, Ferruh" , Olivier Matz CC: "dev@dpdk.org" , Stephen Hemminger Thread-Topic: [RFC] net: make eCPRI header host network order Thread-Index: AQHWxPDW9J3k1kFpHUakKwbI7pbU1anc4GKAgAAKBbA= Date: Sat, 28 Nov 2020 03:55:38 +0000 Message-ID: References: <20201127190920.3312280-1-ferruh.yigit@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.0.76 authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.204] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 32a0c503-a29b-4112-f48a-08d8935177f8 x-ms-traffictypediagnostic: BN7PR11MB2820: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:117; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YpBUJwb+EKNQM07OJ3HWwL0zovzru3z6UBvlMm16momX1p4AEfXufcEGq0CBoe0ffKiF2XypZO8fjILYhCGO+q85aiO1MO3c1PhDPMRJmWtT98oEMKCm0FAMKvujOZz4KV4m36fiCblnNVeA6waAuRZmRUE9DupPDLpaxGie0I5SDL4W2/Tn02r9gEgzma5IXob3hGP/jucZDY+uhlrtMBeAGi/etR2Vc3r//UKxIkgCPUp3xvxVBIk0KSc+Pr2JqOoT8lRCZu3yfTUKTZn4SOKQvObM9hR93LPMsMuNs5niDiXIphyZkdZclNs85mQk06QXMEzyPORTlJrGwzlBHg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(346002)(136003)(39860400002)(376002)(55016002)(86362001)(66446008)(66476007)(83380400001)(76116006)(2906002)(66946007)(8676002)(54906003)(8936002)(5660300002)(52536014)(9686003)(4326008)(64756008)(110136005)(66556008)(53546011)(316002)(6506007)(71200400001)(186003)(26005)(33656002)(7696005)(478600001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?CxVE5ov3s05OyXOfDCGJX4JqC8fPw1u9Kgo45EHw6AdQa85iC0gzg2PN9kEN?= =?us-ascii?Q?N8I5cLZeGX00kyFnmbmCrT80FFfuzx1WUaGsxw/bb1XLvQO5LaT8uWMRP0e2?= =?us-ascii?Q?7mq0Ovu+qci1wozA3OhCVbhtJq5aqzHKFWV95ORa6OINE16hEoMsgk/jeY1c?= =?us-ascii?Q?VOSYLT5kcm3/wCDY2Q5GXRnk75sUkvHF+jgOyOQ2uAvYPTpPBNQ7iDFray0c?= =?us-ascii?Q?9ZdzmIQaB21tMT4MZmMvNvkdrGLt16Cllt/ERs3cD7QjMaQSMXX+0WA+Ehqo?= =?us-ascii?Q?Ia6BPuSM0DeubD76m4o+IoE27VK1Z45m4Vef144xgTuKbCCU247rBxnTo+b8?= =?us-ascii?Q?sv6VQ89/XsZvkk6whD81PriZWU8Zng5uGLJXDxZVp17O8desn2woDC8I1eF4?= =?us-ascii?Q?8F1cTp8cqHKL85uIy9Bj02VW/BIjpEDGCrOcG8IrQZHuDRwmMPj4h27XYzBJ?= =?us-ascii?Q?IvIgiq2rW8f4RyXFpFg5jZE/skAOUlG/nDhhUXmjXr2Jj+xXdjp4DViW1GPk?= =?us-ascii?Q?ZqNY0Sk6qMqjgC/OvABF8PgMaaWv853ToYzGv+f2K6G5sk/ifZ+lNRC95+uJ?= =?us-ascii?Q?vu0uXIpuo45g1sadePOtjYH2Tco5Zz4OwgeB9n7/wcgvz4ygYUYj4DUNp6oj?= =?us-ascii?Q?M0sC4BoJ4k+XGpU+PnvBR2s4j0yRP48aGQV8Vw4F+I/sjJnTwQfbuBr+2Ark?= =?us-ascii?Q?xz9e1C8J8cXeK0JHEboqGJE0/lxZHPVTS69kmsZZu6jYE/wotxzkMf2uDlH4?= =?us-ascii?Q?SC35JdFBavutBuKN7uST5E4BfseNvokhHdSVsOH0MaF0Cg+qmak0d/EE27iZ?= =?us-ascii?Q?oBFiHFhAZirHtjCbcYD2TvguBgj+7UrPEcfAtIoQC/fXq6SVCpUvaHjVeFmZ?= =?us-ascii?Q?IlylApMx5NCrhaqozehTyGTMPgUK/nMn4C2XwJ0AFblsYjPGVvZDMwbrABE+?= =?us-ascii?Q?8pWtZhCXtmPO4BHFS2YDj0CyEHtzXaWdvM5T7j6Lj98=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32a0c503-a29b-4112-f48a-08d8935177f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2020 03:55:38.6503 (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: Zf7Xx2xyfSuhPHRZNf8nF1xhUkJJawT2q5YVMz1NqOG97mCAQxNIAYWRjpTPINBc0gn3P7Syh/pkaI1iPG48CQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2820 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [RFC] net: make eCPRI header host network order X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Hi Bing, These definition just use the basic data type, not use the bit field method= . BR, Haiyue > -----Original Message----- > From: Bing Zhao > Sent: Saturday, November 28, 2020 11:18 > To: Yigit, Ferruh ; Olivier Matz > Cc: dev@dpdk.org; Wang, Haiyue ; Stephen Hemminger= > Subject: RE: [RFC] net: make eCPRI header host network order >=20 > Hi Ferruh & Haiyue, > Have you checked other headers? Like: > rte_ipv4_hdr > rte_ipv6_hdr > rte_tcp_hdr > ... >=20 > Also > [ITEM_UDP_SRC] =3D { > .name =3D "src", > .help =3D "UDP source port", > .next =3D NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param), > .args =3D ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp, > hdr.src_port)), > }, > [ITEM_UDP_DST] =3D { > .name =3D "dst", > .help =3D "UDP destination port", > .next =3D NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param), > .args =3D ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp, > hdr.dst_port)), > }, >=20 > Or did I get sth. wrong? >=20 > BR. Bing >=20 > > -----Original Message----- > > From: Ferruh Yigit > > Sent: Saturday, November 28, 2020 3:09 AM > > To: Olivier Matz > > Cc: Ferruh Yigit ; dev@dpdk.org; Haiyue Wang > > ; Stephen Hemminger > > ; Bing Zhao > > Subject: [RFC] net: make eCPRI header host network order > > > > External email: Use caution opening links or attachments > > > > > > Other protocol structs are in the host byte order, having eCPRI in > > network byte order is insistent and error prone. > > > > Making eCPRI protocol header host byte order. > > > > Signed-off-by: Haiyue Wang > > Signed-off-by: Ferruh Yigit > > --- > > Cc: Stephen Hemminger > > Cc: Bing Zhao > > Cc: Olivier Matz > > --- > > lib/librte_net/rte_ecpri.h | 7 +++---- > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/lib/librte_net/rte_ecpri.h b/lib/librte_net/rte_ecpri.h > > index 1cbd6d813363..67bf9186ff6f 100644 > > --- a/lib/librte_net/rte_ecpri.h > > +++ b/lib/librte_net/rte_ecpri.h > > @@ -60,21 +60,20 @@ extern "C" { > > RTE_STD_C11 > > struct rte_ecpri_common_hdr { > > union { > > - rte_be32_t u32; /**< 4B common > > header in BE */ > > + uint32_t u32; /**< 4B common > > header in host byte order */ > > struct { > > #if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > > - uint32_t size:16; /**< Payload Size */ > > - uint32_t type:8; /**< Message Type */ > > uint32_t c:1; /**< Concatenation > > Indicator */ > > uint32_t res:3; /**< Reserved */ > > uint32_t revision:4; /**< Protocol > > Revision */ > > + uint32_t type:8; /**< Message Type */ > > #elif RTE_BYTE_ORDER =3D=3D RTE_BIG_ENDIAN > > uint32_t revision:4; /**< Protocol > > Revision */ > > uint32_t res:3; /**< Reserved */ > > uint32_t c:1; /**< Concatenation > > Indicator */ > > uint32_t type:8; /**< Message Type */ > > - uint32_t size:16; /**< Payload Size */ > > #endif > > + uint32_t size:16; /**< Payload Size */ > > }; > > }; > > }; > > -- > > 2.26.2