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 D8868A04AF; Mon, 4 May 2020 09:51:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4F70A1D17E; Mon, 4 May 2020 09:51:10 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150083.outbound.protection.outlook.com [40.107.15.83]) by dpdk.org (Postfix) with ESMTP id AF8EE1D15D; Mon, 4 May 2020 09:51:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HhpNoUudqvyJNZy1/a9qPeGajqmGEmgxL+aJC51U1amhB4c62iy0afGtj6ft5YgJd4C9Ob3g4k+MriSBlNTGQpE3ESNsQ7jOPzPN6tonWtBjoO8nFt6eghCqx4q26F9stXokyDMQzDKM7rdws57bqlA75777QJBl+P8ojRvoh1+aFCgOWZtHHyk2P9I/bb3XDs0UKBCGKqH3Gs+9uk1yVok9QGEANaQe2v+L7hmoeCsy3+MjQzpnrr2J66LS+YadO4R8JAqqdlzXygeATyp/wvE6Trev5yCz5FAlZZ6v61eS9y7QcGE6V2JBLIPma/KYCJP9S0EKRPV38UDwz+Yi4g== 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=+Y8T962wCFa86G+VWCp6uP8KDexpe6+c4rOKfRDtQzs=; b=VBAiwhdGydWlVicEplI5/2CCTj/eIHHPBGbYJK4fDjsKK4hpJFTbTQCdj60KBhBaIJPOZxpDFC+IXUyN+Ocev41EnhhuwUyJvexYxfft6XnixfZIySL2yTKsJy0qU2JkIyYG1kyFZmgp07+3Qo/xtUiG7Hz9ggWgjzUrkx5xpaAdnCCZTcfCJpd8e808pQzqA/WWco97fycTZR/7ve/cE/Yjz20De9Lp//kfmx9aCpjbSzilslyIPzGAd/DxbZIG155mKBO/NmHCArVRiVjYGuxroLHhmrCqfy8djrq5Ibg4MVrFHTu5B2xyMYXyZYKuY2vDfsUZtN76ZsTrH6Ph3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+Y8T962wCFa86G+VWCp6uP8KDexpe6+c4rOKfRDtQzs=; b=o2bOUgbJE+/Zz9tOBLV8XNN7o+ByV+319AD1E8aRHwY8KkNQbYRrQLTpBI6bhaIFfJnOpk5mohOD/JiGtOAbzZbnuRx1263NH8bHcW2ZNr1lf8HiyXmD+OZ6O0iWUK+B7a9UQGhBb7KqJ8X36rQrTAw/i0E4G3TBLXvI5snrS3g= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM0PR05MB6243.eurprd05.prod.outlook.com (2603:10a6:208:12f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Mon, 4 May 2020 07:51:03 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e%5]) with mapi id 15.20.2958.030; Mon, 4 May 2020 07:51:03 +0000 From: Raslan Darawsheh To: Wisam Monther , "dev@dpdk.org" , Dekel Peled , Slava Ovsiienko CC: Moti Haimovsky , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix set VLAN vid size check Thread-Index: AQHWHsm74tCKhcI89kSXI4FZfl0MTKiXk9mw Date: Mon, 4 May 2020 07:51:03 +0000 Message-ID: References: <20200430083103.10320-1-wisamm@mellanox.com> In-Reply-To: <20200430083103.10320-1-wisamm@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [188.161.230.216] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 7d8ce4fa-8ba4-4557-0d80-08d7efffe50d x-ms-traffictypediagnostic: AM0PR05MB6243:|AM0PR05MB6243: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2399; x-forefront-prvs: 03932714EB x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Up+KT3Q5q8x7tJbQSBvJnQic60Muxklkqy3TFZ45d3oAv7OYc+f5tKNpAwb5jq7v3tgMm197PoTtQ0bb0yxdwPm6vA9LFxkx8B3MVnBz7rihs655nJxs8nci8emodn9SLJnwUUKHrFifibW0X+8Tb/j/2RzWKR4C9Hui/NPOGyooTntO3AnfVDpod7GgEd+h4iS7oMMa//a6ylGv4CtRAWGOTvSu/5IfbKHlLEw2WA3cQ3B6UQafJOVcn8T/rgg+gsIXkObrhaZqagoY4UKGQYEy2jzSvGsRmAs82BqGO28iNcqB+fP8KqlD1jibYV5bKaTt9lCjGfrZnzIIZomT/xSkPz5sJ7hzM4vFpZrWbFVI6V6sN/YeOfvhDZHbsvQC9ZhpgTM3j01CXYcb7Xu+UCgrD3zLNEiK3SdNlHJXRaxTaE84+fbyVyB4qG8Q9nJG x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(366004)(39860400002)(346002)(396003)(136003)(376002)(66476007)(110136005)(6636002)(64756008)(66556008)(71200400001)(8936002)(54906003)(66446008)(76116006)(316002)(66946007)(8676002)(478600001)(33656002)(86362001)(5660300002)(52536014)(26005)(55016002)(6506007)(53546011)(9686003)(2906002)(7696005)(450100002)(186003)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: lgP6V36EMZbn44chRFIZQOAmiw+/CYXU1BrYWviKRWMV0yXJdM1cofoLxoDpRKz2ca880eDg4QVKh/ClzrhxOZqr8o/JgCxjBPUUIPi6HYNNyRtxRztXcsu/7edPBbeq8DnaP+xpf00IS9RLs6iTV81NyH+VzsrN217D1+YbqDb2gUlhM4pSOmFCW8qBisa5HUHePbV41YaPllb9hji59FDFN65zAgTRnOjjyf+jQOeQ1QjLiNAPctv4jiJr2rw50JpahINYhh0YhYbM/9vJ+rA3LteWPc/MeC0ZrlrPB3XCQ9iIdgvATYtdcn4XbYdZprCgBDAJx+lbNC8JHMgkiHwMd4G5NLfsqwl4i6IvoCWlArvz0wOf/jitiqx/Nl3DDkZDQWAUeC/F0gbhEgXd4uyqDZZTpsuyTOsxwf2Idllv4fNT0dsOFfzBt7NusU/TRKi5nzCKQ4qNttOOoZYanWvbpEn/QanyqU9DZVu/NRM7PnOoAvWRLcoRQUsLkXChYs+i+EO2S0Z23WhoArdnukW4MfOmeStWNtiR4I6+XeOhEgmefva/HwENpBkyPM/r7+pYUsY1IgVv+rTGTOsjHHdOKO/LPVLTk6+dxdEAJedvsiDkkA/vCxIr1uADaT3d8zrTzL3L8iB9FoxRI1dOwCKYib3Y9gic9inNglTw/GT/EJgIShoLgY2uTeUqY7v6fpsEgYg+1ZauYmJSczl6Yc/Hjqi1jkuEgIUvtv63ccTT9e8Gv4NAYQIQyLqBaE8Vmx+PGNBi/P/sRRoG2JPZ7JSgdUU8RkenyX4y/hD3B9728ekxYNStKT9EdSMcp+eA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d8ce4fa-8ba4-4557-0d80-08d7efffe50d X-MS-Exchange-CrossTenant-originalarrivaltime: 04 May 2020 07:51:03.3397 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: GE95FtYmkPpiun2nfbx5s6X0uxIyfWUhsgMLPrhHuGA/3qmLVI2glvNlmJG6u0pgK+iaTIBmJNbkH4bJCHZ7HA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6243 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix set VLAN vid size check 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, > -----Original Message----- > From: Wisam Monther > Sent: Thursday, April 30, 2020 11:31 AM > To: dev@dpdk.org; Dekel Peled ; Slava Ovsiienko > ; Raslan Darawsheh > Cc: Moti Haimovsky ; stable@dpdk.org > Subject: [PATCH] net/mlx5: fix set VLAN vid size check >=20 > All comparison should be done in CPU endianness, otherwise > it will not give right results. >=20 > for example: > 255 after converting into RTE_BE16 will be biger than 4096 after > converting into RTE_BE16. >=20 > Fixes: a5f2da0b816b ("net/mlx5: support modify VLAN ID on new VLAN > header") > Cc: motih@mellanox.com > Cc: stable@dpdk.org backport >=20 > Signed-off-by: Wisam Jaddo > --- > drivers/net/mlx5/mlx5_flow_dv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index 6263ecc731..2b88e85248 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -1965,7 +1965,7 @@ flow_dv_validate_action_set_vlan_vid(uint64_t > item_flags, > const struct rte_flow_action *action =3D actions; > const struct rte_flow_action_of_set_vlan_vid *conf =3D action->conf; >=20 > - if (conf->vlan_vid > RTE_BE16(0xFFE)) > + if (rte_be_to_cpu_16(conf->vlan_vid) > 0xFFE) > return rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, > action, > "VLAN VID value is too big"); > -- > 2.17.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh