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 E10E2A0518 for ; Fri, 24 Jul 2020 14:05:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D58E21C039; Fri, 24 Jul 2020 14:05:24 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 6AF421C0BD for ; Fri, 24 Jul 2020 14:05:24 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id o2so8061656wmh.2 for ; Fri, 24 Jul 2020 05:05:24 -0700 (PDT) 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=y5MQWpTMieVtpprP32+IAWOJ9RXBQbTM2REwiTn9b2g=; b=eWmY/1pAmVWkS2ro7cRgIgnIGvVylAfeWCyKvcTMx0+4RwKdS2HsAxX9p2zCaHHD6A mQ7bfvxQ6heF85uDbfGV0j+az0NR77/56Lf35mHpGC1qjlZ6eYlf5avPRFKozoDf7l1R +E7umX8njTaU+cCVs55fqhiYHtWSQ9UbcDOQZ0RKWdtCIk3iSUBqB30V+QbToJcHLpVW HBNbp9zi+0KZfgEND50W+L6kOw+s8iL8QmxmU4/1JOKwjf2A3l/nBEtLViD7mNx6dhaA MONdVjUKsQD0/uQDySBFFUqmXYr5cR55ie15XZCma40vbNjRsQWMjkdW4+or6z702CZh 91kQ== 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=y5MQWpTMieVtpprP32+IAWOJ9RXBQbTM2REwiTn9b2g=; b=YsJz9dd/k4tZ4YdKOKQXXO6tQ1wuFu50cGr3B/WFoXKcdhSMnzYSA/gGS7WQIJ01d9 vAIvaK2rV7vRk5d969hOYafIbauCTbGpio0glsmiRSbBORqVY+x6HCoUsjJ+nrWRd3vm lnUmdNXHWvXMeNrDQvyPWZXahtnLwvppi+2LwkSKyFME1Yya25Ve+qxDg3GxL9TeTrva TH6lxxYjCAmmIg0OwoJ8I2ahSXBOwIze1fZDY0H2se2fA9/aOYFQ6t28oAZcuA8OGuYH zaMIIF1NSrHehtpKsi7o2yEl37tZ5e9W0gZOQ1VrEq8CjJl0fa6W38X0aJBizbVpr6BK lFbA== X-Gm-Message-State: AOAM5334ocCdMsFJwVUg8WrutVLrcGJL4vrBLDUmD9kKTsjE7KvrgH7o Lz3uFN/xuD5Lc/WV/7jqy1/oNitiEG9QaA== X-Google-Smtp-Source: ABdhPJz4qxCfGQgLgqenL9ozuAJkFO0lb3Rl2SiHLjaa8294RCZGn/EZOfO6allo8QesXiF4SfY9wA== X-Received: by 2002:a1c:984d:: with SMTP id a74mr9034551wme.140.1595592323706; Fri, 24 Jul 2020 05:05:23 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id r11sm6690099wmh.1.2020.07.24.05.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:05:22 -0700 (PDT) From: luca.boccassi@gmail.com To: Michael Baum Cc: Matan Azrad , dpdk stable Date: Fri, 24 Jul 2020 12:58:26 +0100 Message-Id: <20200724120030.1863487-68-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'common/mlx5: fix code arrangement in tag allocation' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/20. 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. Thanks. Luca Boccassi --- >From dac5398ff22718581c4b564325aa87fbca645ac3 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Wed, 24 Jun 2020 13:20:31 +0000 Subject: [PATCH] common/mlx5: fix code arrangement in tag allocation [ upstream commit ed5d23656e925ea8b271d4a84eec8e4046f66fa9 ] Flow tag action is supported only when the driver has DR or DV support. The tag allocation is adjusted to the modes DV or DR. In case both DR and DV are not supported in the system, the driver handles static code for error report. This error code, wrongly, was compiled when DV is supported while in this case it cannot be accessed at all. Ignore the aforementioned static error code in case of DV by preprocessor commands rearrangement. Fixes: cbb66daa3c85 ("net/mlx5: prepare Direct Verbs for Direct Rule") Signed-off-by: Michael Baum Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_glue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c index 44f63116a..65b63bd60 100644 --- a/drivers/net/mlx5/mlx5_glue.c +++ b/drivers/net/mlx5/mlx5_glue.c @@ -754,7 +754,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag) #ifdef HAVE_IBV_FLOW_DV_SUPPORT #ifdef HAVE_MLX5DV_DR return mlx5dv_dr_action_create_tag(tag); -#else +#else /* HAVE_MLX5DV_DR */ struct mlx5dv_flow_action_attr *action; action = malloc(sizeof(*action)); if (!action) @@ -762,11 +762,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag) action->type = MLX5DV_FLOW_ACTION_TAG; action->tag_value = tag; return action; -#endif -#endif +#endif /* HAVE_MLX5DV_DR */ +#else /* HAVE_IBV_FLOW_DV_SUPPORT */ (void)tag; errno = ENOTSUP; return NULL; +#endif /* HAVE_IBV_FLOW_DV_SUPPORT */ } static void * -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:51.213459854 +0100 +++ 0068-common-mlx5-fix-code-arrangement-in-tag-allocation.patch 2020-07-24 12:53:48.291006534 +0100 @@ -1,8 +1,10 @@ -From ed5d23656e925ea8b271d4a84eec8e4046f66fa9 Mon Sep 17 00:00:00 2001 +From dac5398ff22718581c4b564325aa87fbca645ac3 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Wed, 24 Jun 2020 13:20:31 +0000 Subject: [PATCH] common/mlx5: fix code arrangement in tag allocation +[ upstream commit ed5d23656e925ea8b271d4a84eec8e4046f66fa9 ] + Flow tag action is supported only when the driver has DR or DV support. The tag allocation is adjusted to the modes DV or DR. @@ -15,19 +17,18 @@ preprocessor commands rearrangement. Fixes: cbb66daa3c85 ("net/mlx5: prepare Direct Verbs for Direct Rule") -Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Matan Azrad --- - drivers/common/mlx5/linux/mlx5_glue.c | 7 ++++--- + drivers/net/mlx5/mlx5_glue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c -index 62c4cc74b..048207eb7 100644 ---- a/drivers/common/mlx5/linux/mlx5_glue.c -+++ b/drivers/common/mlx5/linux/mlx5_glue.c -@@ -752,7 +752,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag) +diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c +index 44f63116a..65b63bd60 100644 +--- a/drivers/net/mlx5/mlx5_glue.c ++++ b/drivers/net/mlx5/mlx5_glue.c +@@ -754,7 +754,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag) #ifdef HAVE_IBV_FLOW_DV_SUPPORT #ifdef HAVE_MLX5DV_DR return mlx5dv_dr_action_create_tag(tag); @@ -36,7 +37,7 @@ struct mlx5dv_flow_action_attr *action; action = malloc(sizeof(*action)); if (!action) -@@ -760,11 +760,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag) +@@ -762,11 +762,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag) action->type = MLX5DV_FLOW_ACTION_TAG; action->tag_value = tag; return action;