net/igc: fix Rx RSS hash offload capability
authorAlvin Zhang <alvinx.zhang@intel.com>
Thu, 25 Mar 2021 01:51:50 +0000 (09:51 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Mon, 29 Mar 2021 23:17:15 +0000 (01:17 +0200)
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 <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
drivers/net/igc/igc_ethdev.c
drivers/net/igc/igc_ethdev.h

index 56d1024..17dd8bf 100644 (file)
@@ -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;
index a09debf..6f658a0 100644 (file)
@@ -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 | \