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 5CE69A0524 for ; Fri, 5 Feb 2021 12:23:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E19D1606D5; Fri, 5 Feb 2021 12:23:42 +0100 (CET) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mails.dpdk.org (Postfix) with ESMTP id 3CD4C1606D5 for ; Fri, 5 Feb 2021 12:23:41 +0100 (CET) Received: by mail-wr1-f42.google.com with SMTP id q7so7218275wre.13 for ; Fri, 05 Feb 2021 03:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RXLndbobGQBGWpWTtzMuTTmgM7uCS1G0/ga5XvXeuFU=; b=uzO5e7hJqlBTqYFlk89T3PRX8CBj6rjXHDmWVKX+5zBOUaR882ZPGRQJge6307o9eH Ba5krmw4g7VDAW1DrAANj+LyYDM0w+AqckkEjf3rinqgD1jkaOm79zsEPxG6LGvkQ5vd CQ4u83LwBjShsKPeLMGPUXUWm+0t4y/3r+b2VV3GvsY19SWBh6VCgl5sBsaL7R9uV4DI O70MTHp7nZpOuXYrqBhbtmlKQkuoMWQ989IQVmVqqJ3swhtN0kzkvMSlzVFw+2UVVc+f P/XnIvK6OTclcC0JcqexFW3zMCa5OmOft8FjRmL1tbwL3Fagfj3LuMislJVk3STZ+YJ4 lQFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RXLndbobGQBGWpWTtzMuTTmgM7uCS1G0/ga5XvXeuFU=; b=SKPwkEVUJhZnerPhx/rU3WPr3zphDgoNbJm0Aqm/xEfNCEltSqb4dZgmvtG7SaoLEY OeOAZQLSEmOaD7TnaurVQJYTsv4vJDcupoP3Kvk/XGLOLTUSRYQY0YUMKqHvP7pTgNVA u/PLMaVL4wTsaPok5WC0M9Qiq1TwlfQvlvrpejEhcd6kOLte6KFYVG0YScvq3SrMJmG7 wRF6z+IRyS2iJcFxua44LDBrxs8oLGGrKirsHs9NosnvdAAZsqYS4JKhwZuNW6+CSbGh 1JHnGmC1NY7A3eGwPyMS+hnB6kHOuhz2zbfdJ3pYfEcA5UXOnmfLBzwJpjKn8JUMNgV/ ZZTw== X-Gm-Message-State: AOAM531kAA6YIz6IiFlPgVjaBbprWTmPW25LTpt5qUAOiGMNKhG2RRgQ FAxPRvTkYjJFUVWpgxBdJF7Bu13GXtWMREbt X-Google-Smtp-Source: ABdhPJypmZr6azawKeR+G21P1W6lwUHSapRtJkT2suMtiw1LL4LTZ/1dXRi9a5OXK9b6PEpdtjgK0g== X-Received: by 2002:a5d:654f:: with SMTP id z15mr4561643wrv.46.1612524221064; Fri, 05 Feb 2021 03:23:41 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id r12sm7288452wmg.44.2021.02.05.03.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:23:40 -0800 (PST) From: luca.boccassi@gmail.com To: Ophir Munk Cc: Matan Azrad , dpdk stable Date: Fri, 5 Feb 2021 11:16:05 +0000 Message-Id: <20210205111920.1272063-79-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix flow operation wrapper per OS' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/6cb2325330a3468535094b469cc9c1c1288c4f64 Thanks. Luca Boccassi --- >From 6cb2325330a3468535094b469cc9c1c1288c4f64 Mon Sep 17 00:00:00 2001 From: Ophir Munk Date: Mon, 28 Dec 2020 14:32:50 +0200 Subject: [PATCH] net/mlx5: fix flow operation wrapper per OS [ upstream commit 880197231387ce597a1b3d3d6ae50d7eff052870 ] Wrap glue call dv_create_flow_action_dest_devx_tir() with an OS API. Fixes: b293fbf9672b ("net/mlx5: add OS specific flow actions operations") Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_flow_os.h | 26 ++++++++++++++++++++++++++ drivers/net/mlx5/mlx5_devx.c | 7 +++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.h b/drivers/net/mlx5/linux/mlx5_flow_os.h index a6bd2c01e1..73ed62655e 100644 --- a/drivers/net/mlx5/linux/mlx5_flow_os.h +++ b/drivers/net/mlx5/linux/mlx5_flow_os.h @@ -350,6 +350,32 @@ mlx5_flow_os_create_flow_action_drop(void **action) return (*action) ? 0 : -1; } +/** + * Create flow action: dest_devx_tir + * + * @param[in] tir + * Pointer to DevX tir object + * @param[out] action + * Pointer to a valid action on success, NULL otherwise. + * + * @return + * 0 on success, or -1 on failure and errno is set. + */ +static inline int +mlx5_flow_os_create_flow_action_dest_devx_tir(struct mlx5_devx_obj *tir, + void **action) +{ +#ifdef HAVE_IBV_FLOW_DV_SUPPORT + *action = mlx5_glue->dv_create_flow_action_dest_devx_tir(tir->obj); + return (*action) ? 0 : -1; +#else + /* If no DV support - skip the operation and return success */ + RTE_SET_USED(tir); + *action = 0; + return 0; +#endif +} + /** * Destroy flow action. * diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c index de9b204075..33213a3df2 100644 --- a/drivers/net/mlx5/mlx5_devx.c +++ b/drivers/net/mlx5/mlx5_devx.c @@ -23,7 +23,7 @@ #include "mlx5_utils.h" #include "mlx5_devx.h" #include "mlx5_flow.h" - +#include "mlx5_flow_os.h" /** * Modify RQ vlan stripping offload @@ -942,9 +942,8 @@ mlx5_devx_hrxq_new(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq, goto error; } #ifdef HAVE_IBV_FLOW_DV_SUPPORT - hrxq->action = mlx5_glue->dv_create_flow_action_dest_devx_tir - (hrxq->tir->obj); - if (!hrxq->action) { + if (mlx5_flow_os_create_flow_action_dest_devx_tir(hrxq->tir, + &hrxq->action)) { rte_errno = errno; goto error; } -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:32.803648251 +0000 +++ 0079-net-mlx5-fix-flow-operation-wrapper-per-OS.patch 2021-02-05 11:18:28.878692483 +0000 @@ -1 +1 @@ -From 880197231387ce597a1b3d3d6ae50d7eff052870 Mon Sep 17 00:00:00 2001 +From 6cb2325330a3468535094b469cc9c1c1288c4f64 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 880197231387ce597a1b3d3d6ae50d7eff052870 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 7706b3be48..6f3b7324ff 100644 +index a6bd2c01e1..73ed62655e 100644 @@ -22 +23 @@ -@@ -366,6 +366,32 @@ mlx5_flow_os_create_flow_action_default_miss(void **action) +@@ -350,6 +350,32 @@ mlx5_flow_os_create_flow_action_drop(void **action) @@ -56 +57 @@ -index 84a5c55ee0..aa8ca7f401 100644 +index de9b204075..33213a3df2 100644