net/failsafe: fix RSS RETA size info
authorIan Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Wed, 27 May 2020 14:34:33 +0000 (15:34 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 2 Jun 2020 18:08:56 +0000 (20:08 +0200)
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: stable@dpdk.org
Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <grive@u256.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/failsafe/failsafe_ops.c

index e1d08e4..96f7e45 100644 (file)
@@ -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);
 }
@@ -1119,6 +1126,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;
 
        /*