From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 88B2E1B512 for ; Fri, 30 Nov 2018 00:12:55 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 30 Nov 2018 01:18:46 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id wATNCW7B032075; Fri, 30 Nov 2018 01:12:50 +0200 From: Yongseok Koh To: Igor Romanov Cc: Andrew Rybchenko , Chas Williams , dpdk stable Date: Thu, 29 Nov 2018 15:10:05 -0800 Message-Id: <20181129231202.30436-11-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181129231202.30436-1-yskoh@mellanox.com> References: <20181129231202.30436-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/bonding: do not ignore RSS key on device config' has been queued to LTS release 17.11.5 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: Thu, 29 Nov 2018 23:12:55 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/01/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From 8d3a03504e71fd71cb739433e15a18faeae6bd24 Mon Sep 17 00:00:00 2001 From: Igor Romanov Date: Wed, 29 Aug 2018 08:51:24 +0100 Subject: [PATCH] net/bonding: do not ignore RSS key on device config [ upstream commit 83cf204a982918fd56b15f9d458d1dfb1e724b5f ] Bonding driver ignores the value of RSS key (that is set in the port RSS configuration) in bond_ethdev_configure(). So the only way to set non-default RSS key is by using rss_hash_update(). This is not an expected behaviour. Make the bond_ethdev_configure() set default RSS key only if requested key is set to NULL. Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration") Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko Acked-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 2f90451a6..9ff898724 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1689,12 +1689,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, /* If RSS is enabled for bonding, try to enable it for slaves */ if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) { - if (bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len - != 0) { + if (internals->rss_key_len != 0) { slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len = - bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len; + internals->rss_key_len; slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key = - bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key; + internals->rss_key; } else { slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL; } @@ -3017,11 +3016,23 @@ bond_ethdev_configure(struct rte_eth_dev *dev) unsigned i, j; - /* If RSS is enabled, fill table and key with default values */ + /* + * If RSS is enabled, fill table with default values and + * set key to the the value specified in port RSS configuration. + * Fall back to default RSS key if the key is not specified + */ if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS) { - dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key = internals->rss_key; - dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len = 0; - memcpy(internals->rss_key, default_rss_key, 40); + if (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key != NULL) { + internals->rss_key_len = + dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len; + memcpy(internals->rss_key, + dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key, + internals->rss_key_len); + } else { + internals->rss_key_len = sizeof(default_rss_key); + memcpy(internals->rss_key, default_rss_key, + internals->rss_key_len); + } for (i = 0; i < RTE_DIM(internals->reta_conf); i++) { internals->reta_conf[i].mask = ~0LL; -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-29 15:01:45.783646661 -0800 +++ 0011-net-bonding-do-not-ignore-RSS-key-on-device-config.patch 2018-11-29 15:01:44.980961000 -0800 @@ -1,8 +1,10 @@ -From 83cf204a982918fd56b15f9d458d1dfb1e724b5f Mon Sep 17 00:00:00 2001 +From 8d3a03504e71fd71cb739433e15a18faeae6bd24 Mon Sep 17 00:00:00 2001 From: Igor Romanov Date: Wed, 29 Aug 2018 08:51:24 +0100 Subject: [PATCH] net/bonding: do not ignore RSS key on device config +[ upstream commit 83cf204a982918fd56b15f9d458d1dfb1e724b5f ] + Bonding driver ignores the value of RSS key (that is set in the port RSS configuration) in bond_ethdev_configure(). So the only way to set non-default RSS key is by using rss_hash_update(). This is not an @@ -12,7 +14,6 @@ requested key is set to NULL. Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration") -Cc: stable@dpdk.org Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko @@ -22,10 +23,10 @@ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c -index 0f5ab09e3..7814258f2 100644 +index 2f90451a6..9ff898724 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c -@@ -1778,12 +1778,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, +@@ -1689,12 +1689,11 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, /* If RSS is enabled for bonding, try to enable it for slaves */ if (bonded_eth_dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) { @@ -41,7 +42,7 @@ } else { slave_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL; } -@@ -3284,11 +3283,23 @@ bond_ethdev_configure(struct rte_eth_dev *dev) +@@ -3017,11 +3016,23 @@ bond_ethdev_configure(struct rte_eth_dev *dev) unsigned i, j;