From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f67.google.com (mail-it0-f67.google.com [209.85.214.67]) by dpdk.org (Postfix) with ESMTP id 502B8F11; Tue, 4 Sep 2018 15:27:30 +0200 (CEST) Received: by mail-it0-f67.google.com with SMTP id h20-v6so4742420itf.2; Tue, 04 Sep 2018 06:27:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:sender:from:date:message-id :subject:to:cc; bh=DF5L5Na2sxHgoDYuJIkKj1KW3bM7B4XP6s5ZuRQS7ZE=; b=WtobIRCaoLtSfxfsurcyGEuE4mprp9qhXNfNcdzexux4+KCILNtC5NQkg7wDK43Vk1 aPAid4Z55ziKeEALNBJAGCOM+1/hFPcMl332ysYsIKZKEZlJMxRwt4qLuSxWR+zc+Ggb B5ZWBb+yzUxc4OZ1ehAUBaP1Hw3G/Iw/yfQGXa7ORtK06AucuL6+JrEj9hCzg4yDWhg1 qw9n60fFWfUwbg3pzrqF9EyGqgGzyu8o8va1dF8tqJNy4KID4KxzMYH5BffuDp8vDTHE drm5QLIXPwt5xiNXLoZofcJ2QP18xrvh6D2pscy5SMg6+xAjiPxwg4f8DieEk0wls3bh l6og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:sender:from :date:message-id:subject:to:cc; bh=DF5L5Na2sxHgoDYuJIkKj1KW3bM7B4XP6s5ZuRQS7ZE=; b=PqPM/98xAk6lfVdO0X51gN1wcwM4JdlXE5PxlfTskl7758TjQY02VtE29zbCvcfhg1 aZzVZxrNKY8Bb7rFvXmQDNYvffqjPtTtgqam+mMvamAbhFL4Fe870Dyl2pn0n55A1b1/ +XbwsH9NMx18JU+/qD4KstAaQVDwUqR4RIoNTroCS/Nsh/MmohP/1fzySyej9grXPQ/2 9+dNG5sd7LXBVy8euEdEyCjv4sYqXjdOfeiMB2ypsoH2RHxjm+b7EZ9NzFTc0SqaIG0r NyMhlp0YdC5GxhCcQxu33OQ/ydhjhfSuysZwVBUsw8oJJvzIpKZ2QcTIuy4xxzQozq8w ebIw== X-Gm-Message-State: APzg51D8Ps+HRxNzd+jWb9NDjpT9XJAKJHIbC/xrUr8XJe0zJ9/KyBah dteh16uDPv3Dg70Ph8n9UJ7+NQxU0URPy8RL7gU= X-Google-Smtp-Source: ANB0VdZz67RVfHabcsDxp1pcHz6gJXFP5M7WoAdkiN8+UVb4Dqf0gU4cc7Ue5mppJ4uJ4XDJKmqWKYm3OECDZttjh0A= X-Received: by 2002:a24:9c84:: with SMTP id b126-v6mr7343677ite.152.1536067649663; Tue, 04 Sep 2018 06:27:29 -0700 (PDT) MIME-Version: 1.0 References: <1535529084-5947-1-git-send-email-arybchenko@solarflare.com> In-Reply-To: <1535529084-5947-1-git-send-email-arybchenko@solarflare.com> Sender: chasmosaurus@gmail.com X-Google-Sender-Delegation: chasmosaurus@gmail.com From: Chas Williams <3chas3@gmail.com> Date: Tue, 4 Sep 2018 09:27:17 -0400 X-Google-Sender-Auth: bNkHnGt_6JKfF4BAZ9eXFg48XYg Message-ID: To: arybchenko@solarflare.com Cc: Declan Doherty , Chas Williams , dev@dpdk.org, igor.romanov@oktetlabs.ru, stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/bonding: don't ignore RSS key on device configuration X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 13:27:30 -0000 On Wed, Aug 29, 2018 at 3:51 AM Andrew Rybchenko wrote: > From: Igor Romanov > > 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") > 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(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c > b/drivers/net/bonding/rte_eth_bond_pmd.c > index b84f32263..ad670cc20 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, > > /* 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; > } > @@ -3284,11 +3283,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.17.1 > >