From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 30D47F64 for ; Mon, 30 Apr 2018 16:07:16 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id j5so14472289wme.5 for ; Mon, 30 Apr 2018 07:07:16 -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; bh=zviDEWyj4jBOFCKR3rrT1mnJR/afhuuT2DyNdDAPMEI=; b=q8KVF6r3vBPc/1gZmeXlyI2S/qXQmreqD4EFnPCa15z+j3w/BKUS0AgdiYdfU+h4iI z9KOeP2JVMPfvh+/NVdzQzIuLJsJKPVFETIWfwsCw8JT2TMGn6r3cJQ05oho/9zlF8Qj U4zj1AlntlEMubuEu0FycRc08XVp9UutHwEI/fGf1Wr1348cUG0NJNRFpSNzL1hkNPar n4csoFgtyLF9YJU1LXVUWX2fYa/o2Qqz9bwx7Ib8hocC+xCj8MjXWmcqEs58O3CurT2S GFslZMkIavLpjqAzay9tLdMvU+AX+60wA1WteLTI+/PE8pm169Z5de+LjXRyVFtgEOpv S8Xg== 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; bh=zviDEWyj4jBOFCKR3rrT1mnJR/afhuuT2DyNdDAPMEI=; b=BPz30RfP1AHB6AyNCGjFJYKJ1KfthfFMYA7mi0M26ZTiFUXphls0RJXqtZP0Lb2u6C ajLR9z428xk2/cjmWq2hYP9CXtqn7PdwROdudJCc/ezoWMbSktIBhpdqEurX+uIzSEvC yTK0MAlWMC915Vj6eyIRCb1Vq8o7Vc57lWy5WgVGCOs/yl+7N7E85zdl3+Lx9AMgw+1V gdngMCGYTZ9t6ISfbEFalzOIpdfi8PJ22Q2skx41Nzm9PhYqZm2OaReTw0AJIYWKe2a+ H75mRb7MZbclhEalz9v4OwyOR5HKmItvQSZMhbcHQny4SEu1zwoS2XCrgEw5EtSW/zPW e5lA== X-Gm-Message-State: ALQs6tAZZzT2RIkZxtmyf04kxA4e5ccIhtun1cUHo8sysjiewCTs5WoT hvLFWoapW9JPc1H1SqO/e/mxc65kBrY= X-Google-Smtp-Source: AB8JxZo7iSAYxh3un6q02SVbsxE6RpRwKyp+i6ktB21IQDy1U8pWqLvYNF8CSo5wVeWs0xjyh6f1sg== X-Received: by 10.28.215.208 with SMTP id o199mr7246961wmg.61.1525097235904; Mon, 30 Apr 2018 07:07:15 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id f6-v6sm1180670wrj.66.2018.04.30.07.07.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:07:15 -0700 (PDT) From: luca.boccassi@gmail.com To: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= Cc: Adrien Mazarguil , dpdk stable Date: Mon, 30 Apr 2018 15:03:10 +0100 Message-Id: <20180430140606.4615-32-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/mlx5: fix flow creation with a single target queue' has been queued to stable release 18.02.2 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: , X-List-Received-Date: Mon, 30 Apr 2018 14:07:16 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 2663203645f63219610cf2ed0001155768cfbd7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= Date: Wed, 14 Feb 2018 16:04:45 +0100 Subject: [PATCH] net/mlx5: fix flow creation with a single target queue [ upstream commit c55a1667950f43be515c976269749a2a00c7268d ] Adding a pattern targeting a single queues wrongly behaves as it is an RSS request, ending by creating several Verbs flows rules to match the RSS configuration. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_flow.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 26002c4b9..bf718f894 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -912,6 +912,16 @@ priv_flow_convert_finalise(struct priv *priv, struct mlx5_flow_parse *parser) unsigned int i; (void)priv; + /* Remove any other flow not matching the pattern. */ + if (parser->queues_n == 1) { + for (i = 0; i != hash_rxq_init_n; ++i) { + if (i == HASH_RXQ_ETH) + continue; + rte_free(parser->queue[i].ibv_attr); + parser->queue[i].ibv_attr = NULL; + } + return; + } if (parser->layer == HASH_RXQ_ETH) { goto fill; } else { @@ -1758,6 +1768,7 @@ priv_flow_create_action_queue(struct priv *priv, { int err = 0; unsigned int i; + unsigned int flows_n = 0; assert(priv->pd); assert(priv->ctx); @@ -1782,11 +1793,17 @@ priv_flow_create_action_queue(struct priv *priv, err = ENOMEM; goto error; } + ++flows_n; DEBUG("%p type %d QP %p ibv_flow %p", (void *)flow, i, (void *)flow->frxq[i].hrxq, (void *)flow->frxq[i].ibv_flow); } + if (!flows_n) { + rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE, + NULL, "internal error in flow creation"); + goto error; + } for (i = 0; i != parser->queues_n; ++i) { struct mlx5_rxq_data *q = (*priv->rxqs)[parser->queues[i]]; -- 2.14.2