DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chas Williams <3chas3@gmail.com>
To: arybchenko@solarflare.com
Cc: Declan Doherty <declan.doherty@intel.com>,
	Chas Williams <chas3@att.com>,
	dev@dpdk.org, igor.romanov@oktetlabs.ru, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/bonding: don't ignore RSS key on device configuration
Date: Tue, 4 Sep 2018 09:27:17 -0400	[thread overview]
Message-ID: <CAG2-Gkm5P6vXXh1wQB3ibz_mUyMwevX0phciFoetbpqbn157tA@mail.gmail.com> (raw)
In-Reply-To: <1535529084-5947-1-git-send-email-arybchenko@solarflare.com>

On Wed, Aug 29, 2018 at 3:51 AM Andrew Rybchenko <arybchenko@solarflare.com>
wrote:

> From: Igor Romanov <igor.romanov@oktetlabs.ru>
>
> 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 <igor.romanov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>

Acked-by: Chas Williams <chas@att.com>



> ---
>  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
>
>

  reply	other threads:[~2018-09-04 13:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29  7:51 Andrew Rybchenko
2018-09-04 13:27 ` Chas Williams [this message]
2018-09-13 15:23   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAG2-Gkm5P6vXXh1wQB3ibz_mUyMwevX0phciFoetbpqbn157tA@mail.gmail.com \
    --to=3chas3@gmail.com \
    --cc=arybchenko@solarflare.com \
    --cc=chas3@att.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=igor.romanov@oktetlabs.ru \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).