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 45A2CA052E; Mon, 9 Mar 2020 14:12:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 628F31C069; Mon, 9 Mar 2020 14:12:40 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140071.outbound.protection.outlook.com [40.107.14.71]) by dpdk.org (Postfix) with ESMTP id 9F2911C02E; Mon, 9 Mar 2020 14:12:38 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k86+VXc6k2WZTmRUhmWnqYfbhgBclalAQDkoSjMukVp3/zsiYvJOTIjUtADBzepqfc80yU2SoQMEAD/T+uv7XHsE3XzPIKHye8H0/V7z6YR0Sn92iBsGZSviAXYnIRzGHDR6sS6W5YxzsfD2oP8gJjqGhb0rh1jYeNysytKh+qcTf5tDCmFLNDvtnRYRRyokNi4TaxtED4z6Q1BxKGP+Nd9/4ZxoZjUrVL2EuMK0TCXWNL4Rp4rJ129VXwh1W4sycfdXp4Og3CQ/jgbI8jXwlNooMZSubR5lO4GR0cT3PuI8uyO0Nkyur6aJ4sYkymUBZIVvdKzMoWbC9hsqMCN9ew== 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=NhkeCxpeVJKtWAUW0sZ0NCVEgAqHDWd/z1ZihEF17vA=; b=LwCR/yQAzkhmL5HQH/igGS47PFQ2Lfj8FgLCcctsE9kuunjoWL+4cfb6gH9vv8J3R8uYgek4TkACt2OQtkkMxuSad7XgDYPFhdomOqLeTtjBkJqYgPHzNwc64O6CmevhNwU8aGBtMiDzkEub7K2K6+5iZn19/40baPV2ABAMHNKdVarpSqnawH/KLUaVVdezLU7MsPGj9KY3bCUuBtjuIZRHjDKA9TMVBxmjv9Tb1SP5+m1IAXLLPYfvuCjNqjPUK8y95IdshPeWFrDm2qHyX3r144ss01fmcA9J+3W/rZ4+RDqP3iIwzinCstsn/MEDAS9NwrgRbEXOmwcURQ1h6w== 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=NhkeCxpeVJKtWAUW0sZ0NCVEgAqHDWd/z1ZihEF17vA=; b=eiuj7lxbfxpLXo2sCMbwhzfRSShyzNC7vGmRjWyJWp0/lwZe3GTuAqMQgPV0FvaZbQ/+5XCg7wQZq9z5sdr+j3twyVSltrPpNbB2Kl6OQKDNfK4QzApst/K1depCMCmh7yAiEA5/VyFn/xVPCmMVliPGGgqFi103Lli1xpU3FFA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=wisamm@mellanox.com; Received: from AM0PR05MB6610.eurprd05.prod.outlook.com (20.178.202.18) by AM0PR05MB6740.eurprd05.prod.outlook.com (10.186.175.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.16; Mon, 9 Mar 2020 13:12:37 +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.013; Mon, 9 Mar 2020 13:12:37 +0000 From: Wisam Jaddo To: dev@dpdk.org, rasland@mellanox.com, matan@mellanox.com Cc: viacheslavo@mellanox.com, stable@dpdk.org Date: Mon, 9 Mar 2020 15:12:03 +0200 Message-Id: <1583759523-25392-1-git-send-email-wisamm@mellanox.com> X-Mailer: git-send-email 2.7.4 Content-Type: text/plain X-ClientProxiedBy: PR3P193CA0055.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:51::30) To AM0PR05MB6610.eurprd05.prod.outlook.com (2603:10a6:208:12f::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (37.142.13.130) by PR3P193CA0055.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:51::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Mon, 9 Mar 2020 13:12:36 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [37.142.13.130] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b2bc643f-c88f-4d2f-3bba-08d7c42b89a1 X-MS-TrafficTypeDiagnostic: AM0PR05MB6740:|AM0PR05MB6740: 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:1468; X-Forefront-PRVS: 0337AFFE9A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(366004)(39860400002)(346002)(376002)(396003)(189003)(199004)(66946007)(81156014)(81166006)(8886007)(186003)(4326008)(16526019)(8676002)(66556008)(66476007)(26005)(450100002)(36756003)(52116002)(7696005)(6636002)(86362001)(5660300002)(6666004)(2906002)(2616005)(956004)(55016002)(4744005)(478600001)(316002)(8936002)(21314003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB6740; H:AM0PR05MB6610.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; 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: JyjpMni3jcvoPao3Ocfqp0DWBA/Os1FxE+fDllZ0Lq+ge/J1cQ76dGW7BFnWoOE3DbYHh3dHVUjuOUkVZCiT7fJWz1c9X4M0pYfTday+kNzPWir+A7STepfOWtPQZ6C+fIwyKLWDdiw+IycKhdcOWyWkGyssmcuCuQh7qBD1q8DI0XvUiqxsbqI9+iEiOYSiq3hOOLAFDtfvTZouGKr/oOYxlFJNcYuT/MXdbRMIoyA9743xlOTi7KBlIMeFKENWmPy4FQ3brIBby8sMvvlab3pCJXRZuZHD5Fv9K8eg1zut09Ae3e44Jz2ONgaCJKgIfkeo68iDutQYGIePMqPAdVJLNQMpK8gC2o6JlymMF0eY08xAWrsBsao2mBc5s6vssGJHoinrMcP+2dXpM3zE046sFHE7kRLgzue58ugLFQjC8xc8UIIVoi6C4OAppoDuE27JNxjMwf/WoCdwKh/mDgnr3xvOmIeIHvp86GMXOFZWc8buGaEphzl+7cSf7BrR X-MS-Exchange-AntiSpam-MessageData: i5lsbpH/kSWEUgYtG2D9EXC9tehN+RhCPMEO9hqFJL4KPWKQDwGfxUudRaKTlnG9WHfrGvVW5fCqtjk0sU6iimg3rDEYaubqa9xPF2Iw9o/fbMn+7lpY6CV7TMe1OOr2Z6VPwzAtLOtI5P9Oy9MNTQ== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2bc643f-c88f-4d2f-3bba-08d7c42b89a1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2020 13:12:37.0546 (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: OcfdtPixroaf4MT10u17u7KSxCWrSkyoP5nC8scnxQjxFR0hGLV9eryP8gYKzJXn8aKCrRT9RRj59/+hF1OBMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6740 Subject: [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" If we allow to have data and mask <0x0> we might hit a zero data value 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_dv.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 = mlx5_flow_get_reg_id(dev, MLX5_APP_TAG, conf->index, error); if (ret < 0) return ret; -- 2.7.4