From 47319fb41b067ecda53c256b43d8490957d30dd0 Mon Sep 17 00:00:00 2001 From: Alvin Zhang Date: Thu, 25 Mar 2021 09:51:50 +0800 Subject: [PATCH] net/igc: fix Rx RSS hash offload capability Add DEV_RX_OFFLOAD_RSS_HASH flag to the PMD's Rx offload capabilities for it supports RSS hash delivery. Fixes: 4f09bc55ac3d ("net/igc: implement device base operations") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang Acked-by: Haiyue Wang --- drivers/net/igc/igc_ethdev.c | 3 +++ drivers/net/igc/igc_ethdev.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index 56d1024af6..17dd8bf8c6 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -341,6 +341,9 @@ eth_igc_configure(struct rte_eth_dev *dev) PMD_INIT_FUNC_TRACE(); + if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) + dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH; + ret = igc_check_mq_mode(dev); if (ret != 0) return ret; diff --git a/drivers/net/igc/igc_ethdev.h b/drivers/net/igc/igc_ethdev.h index a09debfb40..6f658a0e83 100644 --- a/drivers/net/igc/igc_ethdev.h +++ b/drivers/net/igc/igc_ethdev.h @@ -67,7 +67,8 @@ extern "C" { DEV_RX_OFFLOAD_SCTP_CKSUM | \ DEV_RX_OFFLOAD_JUMBO_FRAME | \ DEV_RX_OFFLOAD_KEEP_CRC | \ - DEV_RX_OFFLOAD_SCATTER) + DEV_RX_OFFLOAD_SCATTER | \ + DEV_RX_OFFLOAD_RSS_HASH) #define IGC_TX_OFFLOAD_ALL ( \ DEV_TX_OFFLOAD_VLAN_INSERT | \ -- 2.20.1