net/sfc: fix RSS hash flag when offload is disabled

Do not set RSS hash flag in the received mbufs when RSS hash
offload is not enabled, which means that RSS hash value is invalid.

Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Igor Romanov 2020-09-24 13:40:58 +01:00 committed by Ferruh Yigit
parent 6e315cf798
commit dbf9910c1b

View File

@ -1155,7 +1155,8 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
info.batch_max = encp->enc_rx_batch_max;
info.prefix_size = encp->enc_rx_prefix_size;
if (rss->hash_support == EFX_RX_HASH_AVAILABLE && rss->channels > 0)
if (rss->hash_support == EFX_RX_HASH_AVAILABLE && rss->channels > 0 &&
(offloads & DEV_RX_OFFLOAD_RSS_HASH))
info.flags |= SFC_RXQ_FLAG_RSS_HASH;
info.rxq_entries = rxq_info->entries;