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 BEAA1A00C5; Sun, 30 Jan 2022 10:17:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3D39410E5; Sun, 30 Jan 2022 10:17:34 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2083.outbound.protection.outlook.com [40.107.220.83]) by mails.dpdk.org (Postfix) with ESMTP id CA1DB40041; Sun, 30 Jan 2022 10:17:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I+tBkihO4vFCEu5cnp22Gt/JwBWelTiT9RgpK+9xBM0p9YCEORX9rBvRhsTZWXeSTrZGME+zCgNQ444GxKd70BYI0NOOkBQUVb4+U2PozGbzCXTMsTpu2WKcFssD+RghoytARWDBmHpNFwJhpfPkSqMs5KzN25qTuB+LZCqnsN6OGqvndSB9LlkjqrEduhRBW8u6Ojr6Y6peG02M2mz18h8cn+U2xbh+wZ0VyRcTvpoYnl8tyK9EPgYGWBPhu2xdTEidagrLP4LaLGS2+IJEy0/XMiB5oWg3LtlNJEAGtxdZgGcOICaz1VcTofh1ImNmv6HesnyxnX2YTqteMrIMGw== 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=z+6hsLG51qHPshS7U+Ibp60RJ6oaFVThNHp5YHbey0A=; b=gdeJldjG9Cp5+J0nYN7Gvum4s+KvbzkE5wpwwTAaLOXmG3SvDyUn8TGA91bHvWDVi/bT6GLZbJg3BkLu1WyAM7T0rWQpxmhKyxGVlU8IfMyDY5O/7ezVep6B/jIcLDSMeKgyyz8K15QjUatGP+Sav4LBBYFTGQTMLvHp8D7aCVykmqB/6Zr7kmk4F5PTLCFvYzFt4IlrP2os922cp6Ztr0A041baMd11B51Uo8xJaIXjXkuQx6G5kwkCfP/QnTKXkN2lZxYgOf6g+AryC45xFnsjhkRfrOYdEjfnwTH/EXfPqHw1VClCHOacfj8n62kyzZ0vM5m2Hho1T1xqM4wLVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=z+6hsLG51qHPshS7U+Ibp60RJ6oaFVThNHp5YHbey0A=; b=CAiSh3G4qM703wmPSMbx/Ezo4Ud5rlE5DnLLFtHPNFR0PrBHL2sAJEp22E2+8GWHsA8C62CYd9MUm1nTPSmgCVABPGLw8l8EDRA6yICLlS1W2fIMB5cPMG+tvhu099GIbR4GhJZx5+QF3ElMSXaHP5mrgFGWluH8yPaHFcHcDOfu2FUwQWmaUfp0WbLrXe+9J2YQ5J6J5qUSunAhDuGrOSOUkI9xiyXI2UgI2Q6vwB/yO7aDcGL0qRQ6neNRkVVYRayRjiln3yMsHoPGVNUKP7S43PzQaUT6sDnw83u9trv9BRZnjOBmzBR/aRNyMBQP72UerHnk7kNLGp/Q/lfbyQ== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by MN2PR12MB4389.namprd12.prod.outlook.com (2603:10b6:208:262::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15; Sun, 30 Jan 2022 09:17:31 +0000 Received: from MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::1869:1984:7899:8cbb]) by MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::1869:1984:7899:8cbb%4]) with mapi id 15.20.4930.018; Sun, 30 Jan 2022 09:17:30 +0000 From: Ori Kam To: "20220126063016.2384393-1-jie1x.wang@intel.com" <20220126063016.2384393-1-jie1x.wang@intel.com>, "dev@dpdk.org" CC: "stevex.yang@intel.com" , "aman.deep.singh@intel.com" , "ferruh.yigit@intel.com" , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "andrew.rybchenko@oktetlabs.ru" , "jingjing.wu@intel.com" , "beilei.xing@intel.com" , "qi.z.zhang@intel.com" , "olivier.matz@6wind.com" , "stable@dpdk.org" Subject: RE: [PATCH v3 2/6] net: fix L2TPv2 common header Thread-Topic: [PATCH v3 2/6] net: fix L2TPv2 common header Thread-Index: AQHYFNkJIyh95+7CH0O6vauDfNZynax7Sqxw Date: Sun, 30 Jan 2022 09:17:30 +0000 Message-ID: References: <20220129062434.2455711-1-jie1x.wang@intel.com> <20220129062434.2455711-3-jie1x.wang@intel.com> In-Reply-To: <20220129062434.2455711-3-jie1x.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b263a9f2-76c7-4bc4-c7bb-08d9e3d157c6 x-ms-traffictypediagnostic: MN2PR12MB4389:EE_ x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:66; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JnlcXA49A7+qubaO6srxiDWsKU4GSNIMK0mtFKm7OScu1XJgfkhdOxqLESkjhqBscOt/CjmwVhn0iGXyzfX+UCundIAx9LzzPhlSEcf0w2XGsiedyg6DaIP+n+W178EMiiM7hODQiiihVFS4rtG/JirxJ7Q2BSffF/TEbkOHpd/MLtLr5eshyeCSo48lnL+pJDNkYMM7dLNWzmmjVb0VrBIwLLM08mEF1rmBZ/fCJfcISIAe7V9mRLYBNH2cL1X7nSzVyxdKH6BmJDFcSgwUVQaS048o9PJok+LiBE5l/3MpAdkNpNE1fc9BoYMLvY5wAb97LqX8n+4hfIcAINYYOdk8cqq1a7Yh83XnD7kkDhxzv0tqVgq3LzYIhVYFdor8TMy6YmS0+LMfCLCtGEaypj52p3rhILEO8Iiwao/njvJ6KgC0dCWkP2klGLXA7neb2CvQOvAUnUjqkF2LDqtsQ9+Ew+lLabo7L3ek5q4GGJbHGB/qlnXII6Rx111wVZiXejYwh8KWVuwRqtMm3HtHfNiJuU0i7si2KEtutsI/YJykiD69Nq4ODb0c6jR3Nl8fDxVDZUt28vMkNaHlR3+cvW7tZBzRBU4Nh8lT8QrbJSmkkp4sQpzmybNODoov+yaZ7Q2iR7IJ76aofiFzNiFMcR71M9ErGROHFAnoq2IIIVpvJOcfqCHcuvZmYgbwMiN472+f6cQzhsREezqm250kQQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB4666.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(71200400001)(38070700005)(508600001)(38100700002)(122000001)(26005)(186003)(33656002)(86362001)(4326008)(64756008)(66446008)(66476007)(8676002)(76116006)(52536014)(66946007)(5660300002)(7416002)(83380400001)(55016003)(8936002)(53546011)(7696005)(6506007)(316002)(110136005)(2906002)(66556008)(54906003)(9686003)(20210929001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?j3ABqPDhDj0EQxQkEXcIpjtMOqnUDX8qal7Vbo+Xz1M6g1UXgn4TYTk3lHej?= =?us-ascii?Q?OAuEyg4wWxi4lMuieg4e/rOzVkT4hyLv2QLf88nfvX9bfwrhD5YqIqJKm/UI?= =?us-ascii?Q?ZUHucsPCwBX6ehnrruYzPc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us-ascii?Q?oF3gYTNuEgbk9sYOozRsD16sJIkjxq5EedOH7/OcC+VwxTwug17L1CdnVFBW?= =?us-ascii?Q?QSqb7sr3DSawJme0uEBFw9HKXGEive0+gjsVqZnvec6sEFjm/KJOMNU4Ihos?= =?us-ascii?Q?1sp2qmesvai0lkePAEbjJ/dsZ5txJASih1601ak7ciW5SyMuFwUKVw+eHCsh?= =?us-ascii?Q?HvNgFkUCzyVar1L4JwjkC1KSZGZK5e+bWVZjsJtoMoDUb+xiLgMN+yc/Sbh5?= =?us-ascii?Q?gPFGKhXSX0IQ/A6uBoJE1D0dN/g9mlMQ+mizCTZ3KzQLdTPpc3pJ6iilKdKh?= =?us-ascii?Q?XBAibqsDXiD97KFd2ir4vbOIbsNbAgFvkjslhp63EEiv57OFwoFvP0xQNVHJ?= =?us-ascii?Q?p/uti13LndkCr9wDiibzINtZHdWrg9tlS/6FvU5L9tMbPYkmTE0FC+2S7ka6?= =?us-ascii?Q?LCWghQYKGh386xW+tcmMUPoNIBjRgt8FH72ej8G1qt54HQJa1D3dgSzDICe9?= =?us-ascii?Q?xf/EjPJr8uinfp50g2cvB96r3m1jLn/ajSCYBe0w/zxb7HDcpyGlMPSgD/5d?= =?us-ascii?Q?5apX2wnu73rKdJ1ui1VL0MLWjIdKrp3S3RURCMxLCMQ0wpQacpz3CDlSOYea?= =?us-ascii?Q?IA=3D=3D?= 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: MW2PR12MB4666.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b263a9f2-76c7-4bc4-c7bb-08d9e3d157c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jan 2022 09:17:30.9169 (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: ngWGvYavANWCIBfXi7W0DZgp34aJ832BI+0RDj4PH5zoLTiBN2aAv3A0IUJZ41Pe5FTsFNbgw3e3RI7czzPiYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4389 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 > -----Original Message----- > From: Jie Wang > Sent: Saturday, January 29, 2022 8:25 AM > To: dev@dpdk.org > Cc: stevex.yang@intel.com; Ori Kam ; aman.deep.singh@in= tel.com; > ferruh.yigit@intel.com; NBU-Contact-Thomas Monjalon (EXTERNAL) ; > andrew.rybchenko@oktetlabs.ru; jingjing.wu@intel.com; beilei.xing@intel.c= om; > qi.z.zhang@intel.com; olivier.matz@6wind.com; Jie Wang ; stable@dpdk.org > Subject: [PATCH v3 2/6] net: fix L2TPv2 common header >=20 > The fields of L2TPv2 common header were reversed in big endian and > little endian. >=20 > This patch fixes this error to ensure L2TPv2 can be parsed correctly. >=20 > Fixes: 3a929df1f286 ("ethdev: support L2TPv2 and PPP procotol") > Cc: stable@dpdk.org >=20 > Signed-off-by: Jie Wang > --- > lib/net/rte_l2tpv2.h | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) >=20 > diff --git a/lib/net/rte_l2tpv2.h b/lib/net/rte_l2tpv2.h > index 938a993b48..1f3ad3f03c 100644 > --- a/lib/net/rte_l2tpv2.h > +++ b/lib/net/rte_l2tpv2.h > @@ -89,16 +89,6 @@ struct rte_l2tpv2_common_hdr { > __extension__ > struct { > #if RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN > - uint16_t t:1; /**< message Type */ > - uint16_t l:1; /**< length option bit */ > - uint16_t res1:2; /**< reserved */ > - uint16_t s:1; /**< ns/nr option bit */ > - uint16_t res2:1; /**< reserved */ > - uint16_t o:1; /**< offset option bit */ > - uint16_t p:1; /**< priority option bit */ > - uint16_t res3:4; /**< reserved */ > - uint16_t ver:4; /**< protocol version */ > -#elif RTE_BYTE_ORDER =3D=3D RTE_BIG_ENDIAN > uint16_t ver:4; /**< protocol version */ > uint16_t res3:4; /**< reserved */ > uint16_t p:1; /**< priority option bit */ > @@ -108,6 +98,16 @@ struct rte_l2tpv2_common_hdr { > uint16_t res1:2; /**< reserved */ > uint16_t l:1; /**< length option bit */ > uint16_t t:1; /**< message Type */ > +#elif RTE_BYTE_ORDER =3D=3D RTE_BIG_ENDIAN > + uint16_t t:1; /**< message Type */ > + uint16_t l:1; /**< length option bit */ > + uint16_t res1:2; /**< reserved */ > + uint16_t s:1; /**< ns/nr option bit */ > + uint16_t res2:1; /**< reserved */ > + uint16_t o:1; /**< offset option bit */ > + uint16_t p:1; /**< priority option bit */ > + uint16_t res3:4; /**< reserved */ > + uint16_t ver:4; /**< protocol version */ > #endif > }; > }; > -- > 2.25.1 Acked-by: Ori Kam Best, Ori