From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 0AA0A1B10F for ; Thu, 27 Sep 2018 10:44:24 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id l10-v6so1654329wrp.3 for ; Thu, 27 Sep 2018 01:44:24 -0700 (PDT) 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=6ygio43hnNeDgvXDhSd6TzV9Ot4JpBkBf51lOAhvHB8=; b=ChidROL9KVPHmJIQMsxpIBAGrlUFS4i0ltoa3MUr77fA+rLcV64q6CuG9nFn+/6NoI x2x12kLhuP+9NoNR4eGBFNVdjwnjhgg3hAh33PwxIP7ovVKyEk1xgeNfAxa09sN3rkFo M90wvmUnn8s9rg0C0OBtrCwKYztlIKNilF/VhOMpIyAGoiPtuB6qCKAhkAfZbNrQ2HBT NaaqSERfZo/P3HlvJ2FW7d+r1cZzOylp9w7y4KbwqLQLQWT3MfSa5ALLBIBmFjBMjeTU yUQf/KLb+aDR/wPumq3tFmoi6O5kZ/10RY08T1IzYaKnPze5K8OACOP9ldllrMD6Pzuk RPUg== X-Gm-Message-State: ABuFfoiCCKznzjB8CazDUGmy5fo/9WyDKjFRIzv6TwMenYQ2BaWiVSHP XJv7o3tMFch9/DwD0n8WE4o= X-Google-Smtp-Source: ACcGV61FU5cwueDJa0O/CuNYaPIS33eTcXhnsmNfx/iD5e9cUIptJorq2z2Ydn2+TJc1QTtdPs3l2w== X-Received: by 2002:adf:e50b:: with SMTP id j11-v6mr7758695wrm.111.1538037863655; Thu, 27 Sep 2018 01:44:23 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id b22-v6sm1593453wme.48.2018.09.27.01.44.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Sep 2018 01:44:22 -0700 (PDT) From: Luca Boccassi To: Igor Romanov Cc: Andrew Rybchenko , Chas Williams , dpdk stable Date: Thu, 27 Sep 2018 09:44:02 +0100 Message-Id: <20180927084403.19646-7-bluca@debian.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180927084403.19646-1-bluca@debian.org> References: <20180927084403.19646-1-bluca@debian.org> Subject: [dpdk-stable] patch 'net/bonding: do not ignore RSS key on device config' has been queued to LTS release 16.11.9 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, 27 Sep 2018 08:44:24 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 09/27/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. Luca Boccassi --- >>From c1fea1e942b08365d5279ba2df428a4bf11cd17b 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 | 30 +++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 1fe0c179a1..c672f0560b 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1325,6 +1325,9 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, int errval; uint16_t q_id; + struct bond_dev_private *internals = (struct bond_dev_private *) + bonded_eth_dev->data->dev_private; + /* Stop slave */ rte_eth_dev_stop(slave_eth_dev->data->port_id); @@ -1334,12 +1337,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; } @@ -2372,11 +2374,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.18.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-09-25 13:26:56.926173608 +0100 +++ 0007-net-bonding-do-not-ignore-RSS-key-on-device-config.patch 2018-09-25 13:26:56.783424705 +0100 @@ -1,8 +1,10 @@ -From 83cf204a982918fd56b15f9d458d1dfb1e724b5f Mon Sep 17 00:00:00 2001 +From c1fea1e942b08365d5279ba2df428a4bf11cd17b 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,20 +14,29 @@ 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 Acked-by: Chas Williams --- - drivers/net/bonding/rte_eth_bond_pmd.c | 27 ++++++++++++++++++-------- - 1 file changed, 19 insertions(+), 8 deletions(-) + drivers/net/bonding/rte_eth_bond_pmd.c | 30 +++++++++++++++++++------- + 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c -index 0f5ab09e38..7814258f23 100644 +index 1fe0c179a1..c672f0560b 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, +@@ -1325,6 +1325,9 @@ slave_configure(struct rte_eth_dev *bonded_eth_dev, + int errval; + uint16_t q_id; + ++ struct bond_dev_private *internals = (struct bond_dev_private *) ++ bonded_eth_dev->data->dev_private; ++ + /* Stop slave */ + rte_eth_dev_stop(slave_eth_dev->data->port_id); + +@@ -1334,12 +1337,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 +52,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) +@@ -2372,11 +2374,23 @@ bond_ethdev_configure(struct rte_eth_dev *dev) unsigned i, j;