Commit 11e877b2 authored by Ronak Doshi's avatar Ronak Doshi Committed by David S. Miller

vmxnet3: allow rx flow hash ops only when rss is enabled

It makes sense to allow changes to get/set rx flow hash callback only
when rss is enabled. This patch restricts get_rss_hash_opts and
set_rss_hash_opts methods to allow querying and configuring different
Rx flow hash configurations only when rss is enabled
Signed-off-by: default avatarRonak Doshi <doshir@vmware.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2eed5a8b
...@@ -899,6 +899,12 @@ vmxnet3_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info, ...@@ -899,6 +899,12 @@ vmxnet3_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info,
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
break; break;
} }
#ifdef VMXNET3_RSS
if (!adapter->rss) {
err = -EOPNOTSUPP;
break;
}
#endif
err = vmxnet3_get_rss_hash_opts(adapter, info); err = vmxnet3_get_rss_hash_opts(adapter, info);
break; break;
default: default:
...@@ -919,6 +925,12 @@ vmxnet3_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info) ...@@ -919,6 +925,12 @@ vmxnet3_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info)
err = -EOPNOTSUPP; err = -EOPNOTSUPP;
goto done; goto done;
} }
#ifdef VMXNET3_RSS
if (!adapter->rss) {
err = -EOPNOTSUPP;
goto done;
}
#endif
switch (info->cmd) { switch (info->cmd) {
case ETHTOOL_SRXFH: case ETHTOOL_SRXFH:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment