From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 816251B78F for ; Wed, 7 Feb 2018 09:59:50 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 36D2020DD9; Wed, 7 Feb 2018 03:59:50 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 07 Feb 2018 03:59:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/xS/6sdmxXdVMqiQm zawyk+9mRwo0pgkc+3g3zEe4cc=; b=uFcRChTDNY+s+VTwWKrVWxDSk/dcAoD8M wUcYss4Y8uhOhvMPx79d3XxxfFXNokUtnSWcIflZbQiaVPoeRRjEr/CaxKIY7yfX /TLVu8R64zEjIIyd49Ibv9/ZLMB94kgFcZshZ35T7ov7ZG9xyhg+plTVJdr9XSRu qvXJo01zHtwOHBTYGvKjKfYt7jzjV2KBIMOOFUYmh9hCqTagsbEoxwE8kgS0uJBW ZNnUvivf6079WGtS2ePSiaaPDEny/Ma0xWzGVapN4GuEuLQEvBc7VFndy6HhbC5U dFj772ZB8BoE8bD/CNpsC+ClEn3C+5ROKS05bpu6KRXp/NQ5c46Pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=/xS/6sdmxXdVMqiQmzawyk+9mRwo0pgkc+3g3zEe4cc=; b=cKmV/dn3 3MjDE3GI2cVGF944edDBq0ycmD9DzTr+CdajhtHgGE+I6/rj7Pc1drD1XjVY7ynS Cvg/LZSohFlb9pwhD76mztJITR85/GokM9bnWEt8xekYLv63nTtycS6k+1G+Gg31 iUGhibEjNbMiKsw6Pj/YBuNMot+62zN/o3SxuS3LwrB9wFRxdSBPZMUmeiunxBRA imf71zYOG1dXQvH0efOMO6UszV2sANPJfGqF97wxrdJezIZvJ9kT0TFIXbs+pxv+ l6oKp3pO47SugXK+bV6dtSgve4kb5cijzuN4/mOvgk24C2hjiZGjm0VH07X5+PPi 7c1TF3cspqLaWQ== X-ME-Sender: Received: from localhost.localdomain (unknown [182.84.161.100]) by mail.messagingengine.com (Postfix) with ESMTPA id 9AAB824636; Wed, 7 Feb 2018 03:59:46 -0500 (EST) From: Yuanhan Liu To: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= Cc: Yuanhan Liu , dpdk stable Date: Wed, 7 Feb 2018 16:57:05 +0800 Message-Id: <1517993838-26692-11-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517993838-26692-1-git-send-email-yliu@fridaylinux.org> References: <1517993838-26692-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/mlx5: fix flow RSS configuration' has been queued to LTS release 17.11.1 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: Wed, 07 Feb 2018 08:59:50 -0000 Hi, FYI, your patch has been queued to LTS release 17.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/09/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 5c35c2f5c9d12a5835759a36d1fbe3e0e02d0269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= Date: Tue, 6 Feb 2018 10:22:15 +0100 Subject: [PATCH] net/mlx5: fix flow RSS configuration [ upstream commit 1f30a22358f1ce5bfb70691faf38fdc9d7467992 ] An RSS configuration without a key is valid according to the rte_eth_rss_conf API definition. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Reported-by: Yuanhan Liu Signed-off-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_flow.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index d49aed8..50b052e 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -563,7 +563,8 @@ mlx5_flow_item_validate(const struct rte_flow_item *item, } /** - * Copy the RSS configuration from the user ones. + * Copy the RSS configuration from the user ones, of the rss_conf is null, + * uses the driver one. * * @param priv * Pointer to private structure. @@ -580,21 +581,25 @@ priv_flow_convert_rss_conf(struct priv *priv, struct mlx5_flow_parse *parser, const struct rte_eth_rss_conf *rss_conf) { - const struct rte_eth_rss_conf *rss; - + /* + * This function is also called at the beginning of + * priv_flow_convert_actions() to initialize the parser with the + * device default RSS configuration. + */ + (void)priv; if (rss_conf) { if (rss_conf->rss_hf & MLX5_RSS_HF_MASK) return EINVAL; - rss = rss_conf; - } else { - rss = &priv->rss_conf; + if (rss_conf->rss_key_len != 40) + return EINVAL; + if (rss_conf->rss_key_len && rss_conf->rss_key) { + parser->rss_conf.rss_key_len = rss_conf->rss_key_len; + memcpy(parser->rss_key, rss_conf->rss_key, + rss_conf->rss_key_len); + parser->rss_conf.rss_key = parser->rss_key; + } + parser->rss_conf.rss_hf = rss_conf->rss_hf; } - if (rss->rss_key_len > 40) - return EINVAL; - parser->rss_conf.rss_key_len = rss->rss_key_len; - parser->rss_conf.rss_hf = rss->rss_hf; - memcpy(parser->rss_key, rss->rss_key, rss->rss_key_len); - parser->rss_conf.rss_key = parser->rss_key; return 0; } -- 2.7.4