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 A517DA00C5; Thu, 30 Apr 2020 10:55:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 858BA1D9E6; Thu, 30 Apr 2020 10:55:32 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140051.outbound.protection.outlook.com [40.107.14.51]) by dpdk.org (Postfix) with ESMTP id E564F1D9C2; Thu, 30 Apr 2020 10:55:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WmSkCGeEB0fZk0T6MtyDHC+Ah30pJXzebBig6VpeITXtDXRcvzzTWLW+URN1b+GN8jaU/gwNHb8nOfrnDEqDrLZ2I6sn7DZqL+xFDbESohHvBANoYWgYGpdDqxnCn8/MfiCNWjgVLFI58S+r8L+rp2YL6SeoqVLFvFirReD5vTTq34FyqmA7v516RZ3PeUzrjxKU3izoANIvYcbXld1PegPpCeSvwSHGhncmW1A1oFsvsM7Rdp3atbobtIzK5/tUiGQ2suaWl4oxeWUaVh8a/uOqObYCHv7SO7tCLgIReYhPIPNM9vB5MGLT36amK21dnydPHxtr1wfp991hTKPW4g== 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=8dRaqv1PPEi/TQABAbyXQ4eeWwX7D5AvUrQXnjFyUz4=; b=W4Pc2gFN7xr6s5pUOIT2jlAKnVsUMDbU3tDVFt14GZdpIDOszK2CcrrwwzTikqETUBZuUdBAB1Yd2VRGZbHRJMGIic9kePU397V1qDwqbOKtwgrw1imqTSZWKrjX76AmWolohjKt1Kwc9Nqc57fmmCp85oQscoP4zdlcKvMmHyxU2g3BIBGIPSeK9AXVpd9wsJTJosFRxgvPDL7IG5+o57PJFRaPNvJHwx3YtUXGgJAk+wj89fQeO46bsBAKum0DkZh46dslNM17YY29DBK7puvNL/qVcFF9UkFK81GQkRWmrDtBN25f+Nim5tj6CoGsvnBiQkYS4m9d9KNnB4k3NQ== 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=8dRaqv1PPEi/TQABAbyXQ4eeWwX7D5AvUrQXnjFyUz4=; b=ATsUkEh1/yrlTznXWZE7Sp2fS+qdMvIROVCPGAjuw616uYT6ihOfhfhdZ2jdMWYAzD8kNLC4rr9DZeQHVN40cKtwn71iCIzU4tACcNVip9T24wpUpqXA20UxvHtQuQpR0OlhXdnwMCZutt3k6Jw83KrGmBQtFu+3kTEXfWtopXE= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (2603:10a6:205:8::26) by AM4PR05MB3473.eurprd05.prod.outlook.com (2603:10a6:205:11::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Thu, 30 Apr 2020 08:55:28 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::bdf0:88a3:3a39:4be4]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::bdf0:88a3:3a39:4be4%7]) with mapi id 15.20.2937.023; Thu, 30 Apr 2020 08:55:28 +0000 From: Slava Ovsiienko To: Wisam Monther , "dev@dpdk.org" , Dekel Peled , Raslan Darawsheh CC: Moti Haimovsky , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix set VLAN vid size check Thread-Index: AQHWHsm7pys7unpbaEeaQtxOKvjHmqiRXI4w Date: Thu, 30 Apr 2020 08:55:28 +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: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 2a7c79dc-6ef1-49d1-0bc6-08d7ece43b19 x-ms-traffictypediagnostic: AM4PR05MB3473:|AM4PR05MB3473: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 0389EDA07F x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM4PR05MB3265.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(366004)(376002)(136003)(346002)(396003)(33656002)(64756008)(6636002)(66556008)(9686003)(66446008)(52536014)(186003)(478600001)(26005)(316002)(450100002)(53546011)(7696005)(5660300002)(54906003)(6506007)(71200400001)(110136005)(76116006)(86362001)(8676002)(66946007)(4326008)(66476007)(8936002)(55016002)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sSddq3tkaoumYIgK4wOWOh3iCQyq9RbbTybktdMgsCOUaKNp8Afqxr56ai8BthWITWO+yDMG6KyGAffEnCXqPfVj+LaSJVkdprx787ZUWRUaiEWtEHudyElDF7oXkG8p3/Ij8+co1owaoK54DOsQj+005nUnDn3upM4F1Q+XxyE1PRmznEOsQhQUykgaCexXgiNv3JitUGDnA1SvNhzT134xqii/kHdefr5ZaFCaG5Z+oxOjQe2seAyS5Ln5/utX0QQh/y+WD2rVpiTtZDY/su3ONOM90uebG0cEhslnRnCLKMX3+vBnJVBHVFAdPulSthrbVa9hV0jLr3xNgpg11mp063hYmuCuihExpkVZ8b6sKh+EXAaDjVU9+cHdPVClB8kc4HYJuUTbx29mB4Mc0ISS/mVhtflwIr7DlN8J6I2/T+5GpB7e+fMVSDbnnNya x-ms-exchange-antispam-messagedata: mnTLE8mISU+jZh/ITmmxGVw80Mxw9ZyRzo5qLoIVZT5lqBYI4r9utV2XBkmW9a8PWvG03tV1yTYSAAcpAWU3TJAr7QD311EKImc1eLZvOBMwAvwQzvv7nvC4WQkTL2BQC3dgnu46HqYvAePPv6UWDovK2iEnY0+pBjzzT1K7moF1VtKmx6YheOgx3YnvFvlrOu5QKLyKD+P2pUlZWIjIX7BTbbrwNXPHYC/LNXf1tQFmPcPStEIz8q9l88OhqotsLWCYWE9GRv1TJWhgywTn0Ggy3N2mTHJ5fWfIYwH9z2dkuAYK/fQQbuAaPPNogLfJ/yNSICmJfqUVHeUFpgiohPO22EwYlDC3RgFhC0ToOV4fgFcYfFg/f4mbGsFeYUeukQOnb8LV24redOU2aT68vSySkOiSHVsOYEUFRh0L0xQ8Mlrb3drOWtD4oXC0AgBWuPAjQKxgfY4HnrKZVuidl8MPCDhx2vtH6Cwqurx3Tm4S+adD28969p77md0YLu4PLDlHwFGsZ5jNMI9uEmQWuej6wFYq32R8r2XRXBthCwgFGTADywp2xIUhBLTJMVlA5/htnxSfDwLYpUd+PTu/I7VtenEOr4jkR5zFahcIkfC3L8UGECr11NmuDNjt1AVJH9y0Clj31/0Ta8S53qGlHUrG0cqAZnMeIcuQS+U39jLpEAacwKFghCOCTJGaPbwRJmvOoUoJHHIn7ZKdqiszYueHxRsFaRysMP+5AawsBaFvYJwx647yLvV61TofwiDzfV+5PP0OxncKqS6IeXEEuqQj2Zcj0I9yRaHeYMy9yik= 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: 2a7c79dc-6ef1-49d1-0bc6-08d7ece43b19 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2020 08:55:28.2741 (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: bPmJwX0hU++q5GxBIJB3Tn7BTNQsYVWotjHInpTGslv18sGICQICRkd1VYTf+hYFdZ01c7Mf/hK0igZJab95nWxSyrTVNWaqE4bfAPC/hr8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3473 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" > -----Original Message----- > From: Wisam Monther > Sent: Thursday, April 30, 2020 11:31 > 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 gi= ve > right results. >=20 > for example: > 255 after converting into RTE_BE16 will be biger than 4096 after converti= ng > 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 Acked-by: Viacheslav Ovsiienko > --- > 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