From: Ian Dolzhansky Date: Wed, 27 May 2020 14:34:33 +0000 (+0100) Subject: net/failsafe: fix RSS RETA size info X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6e8bdf7266db71f43f47f40704ab1122f60c3f17;p=dpdk.git net/failsafe: fix RSS RETA size info 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 Signed-off-by: Andrew Rybchenko Acked-by: Gaetan Rivet Acked-by: Stephen Hemminger --- diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index e1d08e46c8..96f7e456f9 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); } @@ -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; /*