ethdev: more RSS flags
authorHelin Zhang <helin.zhang@intel.com>
Thu, 5 Jun 2014 05:08:50 +0000 (13:08 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Jun 2014 16:21:41 +0000 (18:21 +0200)
- i40e RSS flags have been added (and enlarged to 64-bit)
- A new configuration of 'uint8_t rss_key_len' has been added in
  'struct rte_eth_rss_conf' to support different length of RSS keys.
- In each PMD, only the supported flags are masked.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Jing Chen <jing.d.chen@intel.com>
Acked-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Heqing Zhu <heqing.zhu@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
16 files changed:
app/test-pmd/cmdline.c
app/test-pmd/parameters.c
app/test-pmd/testpmd.c
app/test-pmd/testpmd.h
examples/dpdk_qat/main.c
examples/ip_reassembly/main.c
examples/l3fwd-power/main.c
examples/l3fwd-vf/main.c
examples/l3fwd/main.c
examples/load_balancer/init.c
examples/multi_process/symmetric_mp/main.c
examples/qos_meter/main.c
lib/librte_ether/rte_ethdev.h
lib/librte_pmd_e1000/igb_rxtx.c
lib/librte_pmd_ixgbe/ixgbe_rxtx.c
lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c

index 8c35825..216752e 100644 (file)
@@ -1201,9 +1201,9 @@ cmd_config_rss_parsed(void *parsed_result,
        uint8_t i;
 
        if (!strcmp(res->value, "ip"))
-               rss_conf.rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6;
+               rss_conf.rss_hf = ETH_RSS_IP;
        else if (!strcmp(res->value, "udp"))
-               rss_conf.rss_hf = ETH_RSS_IPV4_UDP | ETH_RSS_IPV6_UDP;
+               rss_conf.rss_hf = ETH_RSS_UDP;
        else if (!strcmp(res->value, "none"))
                rss_conf.rss_hf = 0;
        else {
index eb14cd3..aa0e2bf 100644 (file)
@@ -832,10 +832,9 @@ launch_args_parse(int argc, char** argv)
                        if (!strcmp(lgopts[opt_idx].name, "forward-mode"))
                                set_pkt_forwarding_mode(optarg);
                        if (!strcmp(lgopts[opt_idx].name, "rss-ip"))
-                               rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6;
+                               rss_hf = ETH_RSS_IP;
                        if (!strcmp(lgopts[opt_idx].name, "rss-udp"))
-                               rss_hf = ETH_RSS_IPV4 |
-                                               ETH_RSS_IPV6 | ETH_RSS_IPV4_UDP;
+                               rss_hf = ETH_RSS_UDP;
                        if (!strcmp(lgopts[opt_idx].name, "rxq")) {
                                n = atoi(optarg);
                                if (n >= 1 && n <= (int) MAX_QUEUE_ID)
index 0727fb3..546d429 100644 (file)
@@ -250,7 +250,7 @@ uint32_t txq_flags = 0; /* No flags set. */
 /*
  * Receive Side Scaling (RSS) configuration.
  */
-uint16_t rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6; /* RSS IP by default. */
+uint64_t rss_hf = ETH_RSS_IP; /* RSS IP by default. */
 
 /*
  * Port topology configuration
index d750a35..69afb5b 100644 (file)
@@ -326,7 +326,7 @@ extern portid_t fwd_ports_ids[RTE_MAX_ETHPORTS];
 extern struct rte_port *ports;
 
 extern struct rte_eth_rxmode rx_mode;
-extern uint16_t rss_hf;
+extern uint64_t rss_hf;
 
 extern queueid_t nb_rxq;
 extern queueid_t nb_txq;
index a117d66..71c0396 100644 (file)
@@ -170,7 +170,7 @@ static struct rte_eth_conf port_conf = {
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
-                       .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
+                       .rss_hf = ETH_RSS_IP,
                },
        },
        .txmode = {
index 9f4c669..625d21f 100644 (file)
@@ -228,7 +228,7 @@ static struct rte_eth_conf port_conf = {
        .rx_adv_conf = {
                        .rss_conf = {
                                .rss_key = NULL,
-                               .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
+                               .rss_hf = ETH_RSS_IP,
                },
        },
        .txmode = {
index 046949f..ae9d3e5 100644 (file)
@@ -247,7 +247,7 @@ static struct rte_eth_conf port_conf = {
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
-                       .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
+                       .rss_hf = ETH_RSS_IP,
                },
        },
        .txmode = {
index 896ceb3..c199f0c 100644 (file)
@@ -207,7 +207,7 @@ static struct rte_eth_conf port_conf = {
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
-                       .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
+                       .rss_hf = ETH_RSS_IP,
                },
        },
        .txmode = {
index 04713c7..e1754a9 100755 (executable)
@@ -251,7 +251,7 @@ static struct rte_eth_conf port_conf = {
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
-                       .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
+                       .rss_hf = ETH_RSS_IP,
                },
        },
        .txmode = {
index 5bc232e..09ba3ff 100644 (file)
@@ -87,7 +87,7 @@ static struct rte_eth_conf port_conf = {
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
-                       .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
+                       .rss_hf = ETH_RSS_IP,
                },
        },
        .txmode = {
index 634e661..d40223e 100644 (file)
@@ -251,7 +251,7 @@ smp_port_init(uint8_t port, struct rte_mempool *mbuf_pool, uint16_t num_queues)
                        .rx_adv_conf = {
                                .rss_conf = {
                                        .rss_key = NULL,
-                                       .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
+                                       .rss_hf = ETH_RSS_IP,
                                },
                        },
                        .txmode = {
index 30816dc..b4b8c4f 100755 (executable)
@@ -94,7 +94,7 @@ static struct rte_eth_conf port_conf = {
        .rx_adv_conf = {
                .rss_conf = {
                        .rss_key = NULL,
-                       .rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6,
+                       .rss_hf = ETH_RSS_IP,
                },
        },
        .txmode = {
index 6fb0f43..26edd47 100644 (file)
@@ -311,31 +311,116 @@ struct rte_eth_rxmode {
  * A structure used to configure the Receive Side Scaling (RSS) feature
  * of an Ethernet port.
  * If not NULL, the *rss_key* pointer of the *rss_conf* structure points
- * to an array of 40 bytes holding the RSS key to use for hashing specific
- * header fields of received packets.
- * Otherwise, a default random hash key is used by the device driver.
+ * to an array holding the RSS key to use for hashing specific header
+ * fields of received packets. The length of this array should be indicated
+ * by *rss_key_len* below. Otherwise, a default random hash key is used by
+ * the device driver.
+ *
+ * The *rss_key_len* field of the *rss_conf* structure indicates the length
+ * in bytes of the array pointed by *rss_key*. To be compatible, this length
+ * will be checked in i40e only. Others assume 40 bytes to be used as before.
  *
  * The *rss_hf* field of the *rss_conf* structure indicates the different
  * types of IPv4/IPv6 packets to which the RSS hashing must be applied.
  * Supplying an *rss_hf* equal to zero disables the RSS feature.
  */
 struct rte_eth_rss_conf {
-       uint8_t  *rss_key;   /**< If not NULL, 40-byte hash key. */
-       uint16_t rss_hf;     /**< Hash functions to apply - see below. */
+       uint8_t *rss_key;    /**< If not NULL, 40-byte hash key. */
+       uint8_t rss_key_len; /**< hash key length in bytes. */
+       uint64_t rss_hf;     /**< Hash functions to apply - see below. */
 };
 
-#define ETH_RSS_IPV4        0x0001 /**< IPv4 packet. */
-#define ETH_RSS_IPV4_TCP    0x0002 /**< IPv4/TCP packet. */
-#define ETH_RSS_IPV6        0x0004 /**< IPv6 packet. */
-#define ETH_RSS_IPV6_EX     0x0008 /**< IPv6 packet with extension headers.*/
-#define ETH_RSS_IPV6_TCP    0x0010 /**< IPv6/TCP packet. */
-#define ETH_RSS_IPV6_TCP_EX 0x0020 /**< IPv6/TCP with extension headers. */
-/* Intel RSS extensions to UDP packets */
-#define ETH_RSS_IPV4_UDP    0x0040 /**< IPv4/UDP packet. */
-#define ETH_RSS_IPV6_UDP    0x0080 /**< IPv6/UDP packet. */
-#define ETH_RSS_IPV6_UDP_EX 0x0100 /**< IPv6/UDP with extension headers. */
-
-#define ETH_RSS_PROTO_MASK  0x01FF /**< Mask of valid RSS hash protocols */
+/* Supported RSS offloads */
+/* for 1G & 10G */
+#define ETH_RSS_IPV4_SHIFT                    0
+#define ETH_RSS_IPV4_TCP_SHIFT                1
+#define ETH_RSS_IPV6_SHIFT                    2
+#define ETH_RSS_IPV6_EX_SHIFT                 3
+#define ETH_RSS_IPV6_TCP_SHIFT                4
+#define ETH_RSS_IPV6_TCP_EX_SHIFT             5
+#define ETH_RSS_IPV4_UDP_SHIFT                6
+#define ETH_RSS_IPV6_UDP_SHIFT                7
+#define ETH_RSS_IPV6_UDP_EX_SHIFT             8
+/* for 40G only */
+#define ETH_RSS_NONF_IPV4_UDP_SHIFT           31
+#define ETH_RSS_NONF_IPV4_TCP_SHIFT           33
+#define ETH_RSS_NONF_IPV4_SCTP_SHIFT          34
+#define ETH_RSS_NONF_IPV4_OTHER_SHIFT         35
+#define ETH_RSS_FRAG_IPV4_SHIFT               36
+#define ETH_RSS_NONF_IPV6_UDP_SHIFT           41
+#define ETH_RSS_NONF_IPV6_TCP_SHIFT           43
+#define ETH_RSS_NONF_IPV6_SCTP_SHIFT          44
+#define ETH_RSS_NONF_IPV6_OTHER_SHIFT         45
+#define ETH_RSS_FRAG_IPV6_SHIFT               46
+#define ETH_RSS_FCOE_OX_SHIFT                 48
+#define ETH_RSS_FCOE_RX_SHIFT                 49
+#define ETH_RSS_FCOE_OTHER_SHIFT              50
+#define ETH_RSS_L2_PAYLOAD_SHIFT              63
+
+/* for 1G & 10G */
+#define ETH_RSS_IPV4                    ((uint16_t)1 << ETH_RSS_IPV4_SHIFT)
+#define ETH_RSS_IPV4_TCP                ((uint16_t)1 << ETH_RSS_IPV4_TCP_SHIFT)
+#define ETH_RSS_IPV6                    ((uint16_t)1 << ETH_RSS_IPV6_SHIFT)
+#define ETH_RSS_IPV6_EX                 ((uint16_t)1 << ETH_RSS_IPV6_EX_SHIFT)
+#define ETH_RSS_IPV6_TCP                ((uint16_t)1 << ETH_RSS_IPV6_TCP_SHIFT)
+#define ETH_RSS_IPV6_TCP_EX             ((uint16_t)1 << ETH_RSS_IPV6_TCP_EX_SHIFT)
+#define ETH_RSS_IPV4_UDP                ((uint16_t)1 << ETH_RSS_IPV4_UDP_SHIFT)
+#define ETH_RSS_IPV6_UDP                ((uint16_t)1 << ETH_RSS_IPV6_UDP_SHIFT)
+#define ETH_RSS_IPV6_UDP_EX             ((uint16_t)1 << ETH_RSS_IPV6_UDP_EX_SHIFT)
+/* for 40G only */
+#define ETH_RSS_NONF_IPV4_UDP           ((uint64_t)1 << ETH_RSS_NONF_IPV4_UDP_SHIFT)
+#define ETH_RSS_NONF_IPV4_TCP           ((uint64_t)1 << ETH_RSS_NONF_IPV4_TCP_SHIFT)
+#define ETH_RSS_NONF_IPV4_SCTP          ((uint64_t)1 << ETH_RSS_NONF_IPV4_SCTP_SHIFT)
+#define ETH_RSS_NONF_IPV4_OTHER         ((uint64_t)1 << ETH_RSS_NONF_IPV4_OTHER_SHIFT)
+#define ETH_RSS_FRAG_IPV4               ((uint64_t)1 << ETH_RSS_FRAG_IPV4_SHIFT)
+#define ETH_RSS_NONF_IPV6_UDP           ((uint64_t)1 << ETH_RSS_NONF_IPV6_UDP_SHIFT)
+#define ETH_RSS_NONF_IPV6_TCP           ((uint64_t)1 << ETH_RSS_NONF_IPV6_TCP_SHIFT)
+#define ETH_RSS_NONF_IPV6_SCTP          ((uint64_t)1 << ETH_RSS_NONF_IPV6_SCTP_SHIFT)
+#define ETH_RSS_NONF_IPV6_OTHER         ((uint64_t)1 << ETH_RSS_NONF_IPV6_OTHER_SHIFT)
+#define ETH_RSS_FRAG_IPV6               ((uint64_t)1 << ETH_RSS_FRAG_IPV6_SHIFT)
+#define ETH_RSS_FCOE_OX                 ((uint64_t)1 << ETH_RSS_FCOE_OX_SHIFT) /* not used */
+#define ETH_RSS_FCOE_RX                 ((uint64_t)1 << ETH_RSS_FCOE_RX_SHIFT) /* not used */
+#define ETH_RSS_FCOE_OTHER              ((uint64_t)1 << ETH_RSS_FCOE_OTHER_SHIFT) /* not used */
+#define ETH_RSS_L2_PAYLOAD              ((uint64_t)1 << ETH_RSS_L2_PAYLOAD_SHIFT)
+
+#define ETH_RSS_IP ( \
+               ETH_RSS_IPV4 | \
+               ETH_RSS_IPV6 | \
+               ETH_RSS_NONF_IPV4_OTHER | \
+               ETH_RSS_FRAG_IPV4 | \
+               ETH_RSS_NONF_IPV6_OTHER | \
+               ETH_RSS_FRAG_IPV6)
+#define ETH_RSS_UDP ( \
+               ETH_RSS_IPV4 | \
+               ETH_RSS_IPV6 | \
+               ETH_RSS_IPV4_UDP | \
+               ETH_RSS_IPV6_UDP | \
+               ETH_RSS_IPV6_UDP_EX | \
+               ETH_RSS_NONF_IPV4_UDP | \
+               ETH_RSS_NONF_IPV6_UDP)
+/**< Mask of valid RSS hash protocols */
+#define ETH_RSS_PROTO_MASK ( \
+               ETH_RSS_IPV4 | \
+               ETH_RSS_IPV4_TCP | \
+               ETH_RSS_IPV6 | \
+               ETH_RSS_IPV6_EX | \
+               ETH_RSS_IPV6_TCP | \
+               ETH_RSS_IPV6_TCP_EX | \
+               ETH_RSS_IPV4_UDP | \
+               ETH_RSS_IPV6_UDP | \
+               ETH_RSS_IPV6_UDP_EX | \
+               ETH_RSS_NONF_IPV4_UDP | \
+               ETH_RSS_NONF_IPV4_TCP | \
+               ETH_RSS_NONF_IPV4_SCTP | \
+               ETH_RSS_NONF_IPV4_OTHER | \
+               ETH_RSS_FRAG_IPV4 | \
+               ETH_RSS_NONF_IPV6_UDP | \
+               ETH_RSS_NONF_IPV6_TCP | \
+               ETH_RSS_NONF_IPV6_SCTP | \
+               ETH_RSS_NONF_IPV6_OTHER | \
+               ETH_RSS_FRAG_IPV6 | \
+               ETH_RSS_L2_PAYLOAD)
+
 /* Definitions used for redirection table entry size */
 #define ETH_RSS_RETA_NUM_ENTRIES 128
 #define ETH_RSS_RETA_MAX_QUEUE   16
index c11931f..9f0310d 100644 (file)
 #include "e1000/e1000_api.h"
 #include "e1000_ethdev.h"
 
+#define IGB_RSS_OFFLOAD_ALL ( \
+               ETH_RSS_IPV4 | \
+               ETH_RSS_IPV4_TCP | \
+               ETH_RSS_IPV6 | \
+               ETH_RSS_IPV6_EX | \
+               ETH_RSS_IPV6_TCP | \
+               ETH_RSS_IPV6_TCP_EX | \
+               ETH_RSS_IPV4_UDP | \
+               ETH_RSS_IPV6_UDP | \
+               ETH_RSS_IPV6_UDP_EX)
+
 static inline struct rte_mbuf *
 rte_rxmbuf_alloc(struct rte_mempool *mp)
 {
@@ -1526,7 +1537,7 @@ igb_hw_rss_hash_set(struct e1000_hw *hw, struct rte_eth_rss_conf *rss_conf)
        uint8_t  *hash_key;
        uint32_t rss_key;
        uint32_t mrqc;
-       uint16_t rss_hf;
+       uint64_t rss_hf;
        uint16_t i;
 
        hash_key = rss_conf->rss_key;
@@ -1571,7 +1582,7 @@ eth_igb_rss_hash_update(struct rte_eth_dev *dev,
 {
        struct e1000_hw *hw;
        uint32_t mrqc;
-       uint16_t rss_hf;
+       uint64_t rss_hf;
 
        hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
@@ -1581,7 +1592,7 @@ eth_igb_rss_hash_update(struct rte_eth_dev *dev,
         * initialization time, or does not attempt to enable RSS, if RSS was
         * disabled at initialization time.
         */
-       rss_hf = rss_conf->rss_hf;
+       rss_hf = rss_conf->rss_hf & IGB_RSS_OFFLOAD_ALL;
        mrqc = E1000_READ_REG(hw, E1000_MRQC);
        if (!(mrqc & E1000_MRQC_ENABLE_MASK)) { /* RSS disabled */
                if (rss_hf != 0) /* Enable RSS */
@@ -1602,7 +1613,7 @@ int eth_igb_rss_hash_conf_get(struct rte_eth_dev *dev,
        uint8_t *hash_key;
        uint32_t rss_key;
        uint32_t mrqc;
-       uint16_t rss_hf;
+       uint64_t rss_hf;
        uint16_t i;
 
        hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -1678,7 +1689,7 @@ igb_rss_configure(struct rte_eth_dev *dev)
         * the RSS hash of input packets.
         */
        rss_conf = dev->data->dev_conf.rx_adv_conf.rss_conf;
-       if (rss_conf.rss_hf == 0) {
+       if ((rss_conf.rss_hf & IGB_RSS_OFFLOAD_ALL) == 0) {
                igb_rss_disable(dev);
                return;
        }
index 67afd5a..ca72e75 100644 (file)
 #include "ixgbe_ethdev.h"
 #include "ixgbe/ixgbe_dcb.h"
 #include "ixgbe/ixgbe_common.h"
-
-
 #include "ixgbe_rxtx.h"
 
+#define IXGBE_RSS_OFFLOAD_ALL ( \
+               ETH_RSS_IPV4 | \
+               ETH_RSS_IPV4_TCP | \
+               ETH_RSS_IPV6 | \
+               ETH_RSS_IPV6_EX | \
+               ETH_RSS_IPV6_TCP | \
+               ETH_RSS_IPV6_TCP_EX | \
+               ETH_RSS_IPV4_UDP | \
+               ETH_RSS_IPV6_UDP | \
+               ETH_RSS_IPV6_UDP_EX)
 
 static inline struct rte_mbuf *
 rte_rxmbuf_alloc(struct rte_mempool *mp)
@@ -2303,7 +2311,7 @@ ixgbe_hw_rss_hash_set(struct ixgbe_hw *hw, struct rte_eth_rss_conf *rss_conf)
        uint8_t  *hash_key;
        uint32_t mrqc;
        uint32_t rss_key;
-       uint16_t rss_hf;
+       uint64_t rss_hf;
        uint16_t i;
 
        hash_key = rss_conf->rss_key;
@@ -2348,7 +2356,7 @@ ixgbe_dev_rss_hash_update(struct rte_eth_dev *dev,
 {
        struct ixgbe_hw *hw;
        uint32_t mrqc;
-       uint16_t rss_hf;
+       uint64_t rss_hf;
 
        hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
@@ -2361,7 +2369,7 @@ ixgbe_dev_rss_hash_update(struct rte_eth_dev *dev,
         * initialization time, or does not attempt to enable RSS, if RSS was
         * disabled at initialization time.
         */
-       rss_hf = rss_conf->rss_hf;
+       rss_hf = rss_conf->rss_hf & IXGBE_RSS_OFFLOAD_ALL;
        mrqc = IXGBE_READ_REG(hw, IXGBE_MRQC);
        if (!(mrqc & IXGBE_MRQC_RSSEN)) { /* RSS disabled */
                if (rss_hf != 0) /* Enable RSS */
@@ -2383,7 +2391,7 @@ ixgbe_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
        uint8_t *hash_key;
        uint32_t mrqc;
        uint32_t rss_key;
-       uint16_t rss_hf;
+       uint64_t rss_hf;
        uint16_t i;
 
        hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -2460,7 +2468,7 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
         * the RSS hash of input packets.
         */
        rss_conf = dev->data->dev_conf.rx_adv_conf.rss_conf;
-       if (rss_conf.rss_hf == 0) {
+       if ((rss_conf.rss_hf & IXGBE_RSS_OFFLOAD_ALL) == 0) {
                ixgbe_rss_disable(dev);
                return;
        }
index cb711dc..319bc11 100644 (file)
@@ -882,9 +882,16 @@ static uint8_t rss_intel_key[40] = {
 int
 vmxnet3_rss_configure(struct rte_eth_dev *dev)
 {
+#define VMXNET3_RSS_OFFLOAD_ALL ( \
+               ETH_RSS_IPV4 | \
+               ETH_RSS_IPV4_TCP | \
+               ETH_RSS_IPV6 | \
+               ETH_RSS_IPV6_TCP)
+
        struct vmxnet3_hw *hw;
        struct VMXNET3_RSSConf *dev_rss_conf;
        struct rte_eth_rss_conf *port_rss_conf;
+       uint64_t rss_hf;
        uint8_t i, j;
 
        PMD_INIT_FUNC_TRACE();
@@ -916,13 +923,14 @@ vmxnet3_rss_configure(struct rte_eth_dev *dev)
 
        /* loading hashType */
        dev_rss_conf->hashType = 0;
-       if (port_rss_conf->rss_hf & ETH_RSS_IPV4)
+       rss_hf = port_rss_conf->rss_hf & VMXNET3_RSS_OFFLOAD_ALL;
+       if (rss_hf & ETH_RSS_IPV4)
                dev_rss_conf->hashType |= VMXNET3_RSS_HASH_TYPE_IPV4;
-       if (port_rss_conf->rss_hf & ETH_RSS_IPV4_TCP)
+       if (rss_hf & ETH_RSS_IPV4_TCP)
                dev_rss_conf->hashType |= VMXNET3_RSS_HASH_TYPE_TCP_IPV4;
-       if (port_rss_conf->rss_hf & ETH_RSS_IPV6)
+       if (rss_hf & ETH_RSS_IPV6)
                dev_rss_conf->hashType |= VMXNET3_RSS_HASH_TYPE_IPV6;
-       if (port_rss_conf->rss_hf & ETH_RSS_IPV6_TCP)
+       if (rss_hf & ETH_RSS_IPV6_TCP)
                dev_rss_conf->hashType |= VMXNET3_RSS_HASH_TYPE_TCP_IPV6;
 
        return VMXNET3_SUCCESS;