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 726EBA0569; Thu, 12 Mar 2020 10:35:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B3F981C010; Thu, 12 Mar 2020 10:35:50 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10042.outbound.protection.outlook.com [40.107.1.42]) by dpdk.org (Postfix) with ESMTP id 2450C1C001; Thu, 12 Mar 2020 10:35:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HcahBce6Xq3czQoRxKKmksfqqoJFhITj9k3U0IJk/35vxIkjsdZaqig6GQRYZGVmT11iSq/xuJeJfQBYrTIuLI/fxN9bJYk2wAHw75hwJRZtvuDMNT6JHfosZxsrl4FFMGX+e+8QuuQg8zksfsCmdwFWtbLQqXh95EG2Tw2v+xOMNum7iRfAa/+o5UDZiiAykka8cJZqdObIcue7ImCrO6wF4HwMGsgUkIovyoj1zKAxRCE5apSpzf2GzBWlTtZr3pZRasGp9xkvJvYpAClZ0w+mjSOEyhG35pVm1hpKb1xInSDux+RP5YeLY12zxv6atcaUEqIcn5bX4MW/3RmCnw== 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=mxe3x/qkOTG0ittn68gCKTMgQndQHAUFERFMub7cIGw=; b=hP1zVClSTYU7QHL1C4GBFVt877Hp3RYpBRkGSA7BZqCYm72eD2aRjarzY6x/ClS3Zyv6SvJphkoYCHSTrbOUPuHY9AFunxsNQfITKUk7B/sd7uBygLkoL5HxYX4ErP2ACpH9qPtNWSWEBmPD/EUSjO1lEm8b1TzUGxLIkRtwzoJbKPZf0JgMQvHcncg1FTRXDV/S6zKFaoI5MdOZCG5aK0B0H4z/ik0nEmmeirTyKLWT9/dlg5CrxFSglX/ApLlDBnjOJeUBOiKbxyFHjkt/979Pt3eqLy5BzesiXjpmmEBm9bDkvqQ4UJREd3nsy17fM9/yczfwn+5KxPt0B4tTDg== 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=mxe3x/qkOTG0ittn68gCKTMgQndQHAUFERFMub7cIGw=; b=EjxHGjx7wB3WfWXcUgugHGplj5r9kzV19MGxcygeaN5nhNyCxEuXdj/H67HsUVxLmV1bQiZ0z6o6GYod9GEZCKxgYtnb4FdWj/79Gas6VT2cYwoDJuphtp3COImfBdsu3i0a22XpQCXOV/w3MXL9iQCjAOswFIEcy1i7GlnkhBg= Received: from AM0PR05MB6610.eurprd05.prod.outlook.com (20.178.202.18) by AM0PR05MB4387.eurprd05.prod.outlook.com (52.134.93.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Thu, 12 Mar 2020 09:35:47 +0000 Received: from AM0PR05MB6610.eurprd05.prod.outlook.com ([fe80::f9b0:5b27:21a3:c758]) by AM0PR05MB6610.eurprd05.prod.outlook.com ([fe80::f9b0:5b27:21a3:c758%3]) with mapi id 15.20.2793.018; Thu, 12 Mar 2020 09:35:47 +0000 From: Wisam Monther To: "dev@dpdk.org" , Raslan Darawsheh , Matan Azrad CC: Slava Ovsiienko , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix zero value check for set tag action Thread-Index: AQHV9hRnnwPiLH1HjUiYSsTmcq/T96hEttGA Date: Thu, 12 Mar 2020 09:35:47 +0000 Message-ID: References: <1583759523-25392-1-git-send-email-wisamm@mellanox.com> In-Reply-To: <1583759523-25392-1-git-send-email-wisamm@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=wisamm@mellanox.com; x-originating-ip: [84.242.49.134] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: c1d36dbe-1a44-4b59-6e8d-08d7c668bee0 x-ms-traffictypediagnostic: AM0PR05MB4387:|AM0PR05MB4387: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-forefront-prvs: 0340850FCD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(376002)(346002)(366004)(396003)(136003)(199004)(6636002)(9686003)(186003)(54906003)(55016002)(71200400001)(7696005)(33656002)(4326008)(110136005)(64756008)(86362001)(450100002)(8936002)(26005)(478600001)(52536014)(6506007)(81156014)(2906002)(81166006)(66476007)(76116006)(66556008)(66446008)(66946007)(53546011)(8676002)(5660300002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4387; H:AM0PR05MB6610.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PaNuiVXZV7TQbCNlkNokkYcXlHysMzbJ7nyTgl94Rom/9TgE2q7PdD62wJBBF55rtnUFKZKtVY5Vm/ObQpU3FTDDaDd/W5BNU6OXPoxchs+wu0Zgg03vH/yg5IqwHVwOQiuHcarRlUBIYONDDNItjUd2c1Qq+82C1dMMZ2hkEJtcnBwVjIm34bCbbHDc9HpPWrjKYbo3ScVGNjFePmJ4OVugBEQhTUYWfjhvoY/1RGqB66+u+Fng1KW54naqdeEpg5O+Rmgy6uIlKGWBPacDb2TRbpykvTkdXI6tokKtk5tHkyJ/dAj8h1c6miSgopuOkGKYWEUX3gw0Aaeihn0ujBPRffGDiolKGxOkM2uOh977ZyNrNkutL5PBS0dxvXdfROWiRfSShBdVTzeIV8WXBU9ppvrUI0kM9aMjGVRMfpTJ4M8TL8SAHcVnlGCr+bY7 x-ms-exchange-antispam-messagedata: fBcegctr5PMSCG/O79hUft90bbvZqnun/I0ay1JZF3E3By5KQbs05LX3obZRI/A6uL+OGnQP5k55d4tzoFeKpf1Iu648/O/0GATxsUXyRYQzaj0NdEwLwakQ09oTYJdlWtM07rTlkf6yqFdX3lO1YQ== 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: c1d36dbe-1a44-4b59-6e8d-08d7c668bee0 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2020 09:35:47.7172 (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: ixbHqPT1WeWC6Np/f4PcnlIpmnOWgBWaXLZ18GuMFguD2PED4ifUDc7WfURtdwbu4/sdicLYzU7b5jqQmPP43A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4387 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix zero value check for set tag action 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 =20 Sent: Monday, March 9, 2020 3:13 PM To: dev@dpdk.org; Raslan Darawsheh ; Matan Azrad Cc: Slava Ovsiienko ; stable@dpdk.org Subject: [PATCH] net/mlx5: fix zero value check for set tag action If we allow to have data and mask <0x0> we might hit a zero data valu= e that will not do any effect Fixes: e554b672aa05 ("net/mlx5: support flow tag") Cc: viacheslavo@mellanox.com Cc: stable@dpdk.org Signed-off-by: Wisam Jaddo --- drivers/net/mlx5/mlx5_flow_dv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_d= v.c index e7278f0..edd0065 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -2160,6 +2160,10 @@ flow_dv_validate_action_set_tag(struct rte_eth_dev *= dev, return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, action, "zero mask doesn't have any effect"); + if (!(conf->data & conf->mask)) + return rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, action, + "zero value has no effect"); ret =3D mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, conf->index, error); if (ret < 0) return ret; -- 2.7.4 Hey Guys, This patch not relevant anymore Thanks, Wisam Jaddo