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 0C6F7A0524; Sat, 28 Nov 2020 04:18:36 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6BC4FC958; Sat, 28 Nov 2020 04:18:34 +0100 (CET) Received: from nat-hk.nvidia.com (nat-hk.nvidia.com [203.18.50.4]) by dpdk.org (Postfix) with ESMTP id 5C62498 for ; Sat, 28 Nov 2020 04:18:30 +0100 (CET) Received: from HKMAIL103.nvidia.com (Not Verified[10.18.92.100]) by nat-hk.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 28 Nov 2020 11:18:29 +0800 Received: from HKMAIL104.nvidia.com (10.18.16.13) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 28 Nov 2020 03:18:28 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.171) by HKMAIL104.nvidia.com (10.18.16.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 28 Nov 2020 03:18:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BbrvmEdptbo0Fm1MVU1V8EtGbQ7cpZ2S335xNj0ExK9t19bxB4WcFytUI3AKHloVO0LeMYmgHrd9xBPcm5otLr5yOyXj5vSFLhuaHu5Pl8bjniaxDW/xMPQNkEyvHm073nF701BuTW8jVe5QhftP8/bBYx0CYx2a4Xhi90OREDoIK3yvqQ91bv7sQNhQqYnVHftFDt+PUubJ9FNmVV+phdf2Fe6z5UOUztY9gNRale+gT//8No60Jk5uks6nKSrynSCns22zs4XNrjS7JMZOfXTwpad5SQYy4bp6RtX4D3/V6SF0g4dOfZqsaasRm2bjIcQdp2clWPtZtINGVrGbYQ== 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=XLVJKc7C+iMRy0fGa+o5FWDv71j/AVZOBG/7CkPLx7Q=; b=P0JJ0IWnrkcAY8ZfbvJZOMFqJAP1j/7jZqFGHH9u3ozPl9Eky9E4WWu58jhRLdWWA5mafAQX0noR4TJgVQUpt48dCXK4ZJ7oUFhHZ606ZVq0NEfCAocZw7KvQAoJcS21m5G6ekTf3prelpXuddUN/LPiG4YylFugAMBzusCe5v/tn/8cN+FQTwnNQV2NUiya0vZ5vGTH0MjRNHpUM1Pcw76+/4I68TdlQ33OPHsA2zCbnuNpXPan8/GUxMCHnm4LAeV5RQYkOn6tzq8AsTbo6T8Buw4lbBxg0b0aY7gZD7JB7lvYSFMS0gYnKZGsvhDJcROIOH0YpVavthMQ4lBQJg== 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 Received: from CY4PR1201MB0072.namprd12.prod.outlook.com (2603:10b6:910:1b::19) by CY4PR12MB1734.namprd12.prod.outlook.com (2603:10b6:903:121::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.28; Sat, 28 Nov 2020 03:18:25 +0000 Received: from CY4PR1201MB0072.namprd12.prod.outlook.com ([fe80::ade4:b300:381d:fe5c]) by CY4PR1201MB0072.namprd12.prod.outlook.com ([fe80::ade4:b300:381d:fe5c%10]) with mapi id 15.20.3589.032; Sat, 28 Nov 2020 03:18:25 +0000 From: Bing Zhao To: Ferruh Yigit , Olivier Matz CC: "dev@dpdk.org" , Haiyue Wang , Stephen Hemminger Thread-Topic: [RFC] net: make eCPRI header host network order Thread-Index: AQHWxPDaJa8fWgdDEkC0+ME+afPXM6nc3g6w Date: Sat, 28 Nov 2020 03:18:25 +0000 Message-ID: References: <20201127190920.3312280-1-ferruh.yigit@intel.com> In-Reply-To: <20201127190920.3312280-1-ferruh.yigit@intel.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [183.159.157.249] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e6b0d9bf-4d29-4b17-9ef7-08d8934c44f3 x-ms-traffictypediagnostic: CY4PR12MB1734: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:67; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /n+A5Buku0OT80ezfUF7vDuClFw9uThaUWm7ut2c6H4sSVEc7Z5TOuY2sAXrXFbA5/gQk1X2ZQDDN4Q5oxEuCZO14HefXsk3UmakZrz/zH7ZmGEn/ARYNCFA3IavgpK3mU52CW8naOlgcWE8uccVE+8/RYLt5935zqhtyAzXA1YhBpjQPbAKqCN+PLvsiGleTGZiqqtd/SH/1z/EN6M3W260uRY9MdZVnnUY96MDhgV5zeSd1E4J1A/uL9ls6z+2mHU0CIkQCBqAgXhHduhjJ/hInDKRgzWf741QiAvSk14u+sqzLiem70eMnnfFRv5pj7odtZ7DASWxEasc6JcAWg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1201MB0072.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(396003)(39860400002)(346002)(366004)(136003)(66556008)(186003)(5660300002)(66446008)(4326008)(66946007)(8936002)(64756008)(66476007)(26005)(76116006)(316002)(2906002)(33656002)(7696005)(110136005)(8676002)(52536014)(54906003)(71200400001)(55016002)(478600001)(6506007)(83380400001)(86362001)(53546011)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?BrZfjz4nxg1Dmo1Q+pZA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XoSi7N?= =?us-ascii?Q?oZVLvoT7DIyZGbDi6jNOdMEh8WhZlS7iJIy/PeWzTnps6xwxu0a+4zZKHut/?= =?us-ascii?Q?ylZs103Sq+4YWr0uZYqrh+kcU6wQpcO7peSaqto/suk=3D?= x-ms-exchange-transport-forked: True 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: CY4PR1201MB0072.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6b0d9bf-4d29-4b17-9ef7-08d8934c44f3 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2020 03:18:25.5859 (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: PDtc1AR8WuvMNX+y1m+sN0tBmkKfV792PbJaJyVOrVk+p+CJcwxQGEU1wJz39szxV20y7A3mwNs3of+fxLn7UA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1734 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1606533509; bh=XLVJKc7C+iMRy0fGa+o5FWDv71j/AVZOBG/7CkPLx7Q=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: x-ms-exchange-transport-forked:Content-Type: Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=dIW/bzDLCs7d1ldvZ+EffMcSgM/wVy4hRf5b23hkcA6JV6lBILcRj/kc4IiTCoIrW /liolgzjtFy8GUdnHJBTWZDuhIrGc778MHc38O2NO8Rut8FdN5cyLygu3i/j0iXM7Y Gm1tU3V9f0WDrRwd+qybWRxK0kcK4hP529KM9D6Xu+OdK/HRukW54O2Niz/7vLaE9H Zc436FPWxEEW/fuGEuK4tVlAYSatBM9umoi2fzi+75+npghInD448qael2NE52cArr pTGs/SQpLb2TpmT+WWLQxnhpPCi1/5byEN1oe+xxEJJ1KNrruDj7+a6L4sYzmlj3Yo rxIQkNbBolKZg== 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 Ferruh & Haiyue, Have you checked other headers? Like: rte_ipv4_hdr rte_ipv6_hdr rte_tcp_hdr ... 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)), }, Or did I get sth. wrong? BR. Bing > -----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 >=20 > External email: Use caution opening links or attachments >=20 >=20 > Other protocol structs are in the host byte order, having eCPRI in > network byte order is insistent and error prone. >=20 > Making eCPRI protocol header host byte order. >=20 > 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(-) >=20 > 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