patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Gaetan Rivet <grive@u256.net>
Cc: <dev@dpdk.org>, Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>,
	"Stephen Hemminger" <sthemmin@microsoft.com>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH] net/failsafe: report valid RSS RETA size
Date: Wed, 27 May 2020 15:34:33 +0100	[thread overview]
Message-ID: <1590590073-8964-1-git-send-email-arybchenko@solarflare.com> (raw)

From: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>

Failsafe driver has been indicating zero for RSS redirection table size
after device info reporting had been reworked. Report proper value.

Fixes: 4586be3743d4 ("net/failsafe: fix reported device info")
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: stable@dpdk.org

Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/failsafe/failsafe_ops.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index e046cfe6aa..45da9378c3 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1068,6 +1068,13 @@ fs_dev_merge_info(struct rte_eth_dev_info *info,
 	info->rx_queue_offload_capa &= sinfo->rx_queue_offload_capa;
 	info->tx_queue_offload_capa &= sinfo->tx_queue_offload_capa;
 	info->flow_type_rss_offloads &= sinfo->flow_type_rss_offloads;
+
+	/*
+	 * RETA size is a GCD of RETA sizes indicated by sub-devices.
+	 * Each of these sizes is a power of 2, so use the lower one.
+	 */
+	info->reta_size = RTE_MIN(info->reta_size, sinfo->reta_size);
+
 	info->hash_key_size = RTE_MIN(info->hash_key_size,
 				      sinfo->hash_key_size);
 
@@ -1128,6 +1135,7 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
 	infos->max_hash_mac_addrs = UINT32_MAX;
 	infos->max_vfs = UINT16_MAX;
 	infos->max_vmdq_pools = UINT16_MAX;
+	infos->reta_size = UINT16_MAX;
 	infos->hash_key_size = UINT8_MAX;
 
 	/*
-- 
2.17.1


             reply	other threads:[~2020-05-27 14:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 14:34 Andrew Rybchenko [this message]
2020-05-27 15:07 ` Gaëtan Rivet
2020-05-27 15:30   ` Andrew Rybchenko
2020-05-27 21:35     ` Gaëtan Rivet
2020-05-27 22:02       ` [dpdk-stable] [dpdk-dev] " Stephen Hemminger
2020-06-02 18:10         ` 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=1590590073-8964-1-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=grive@u256.net \
    --cc=ian.dolzhansky@oktetlabs.ru \
    --cc=stable@dpdk.org \
    --cc=sthemmin@microsoft.com \
    /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).