Skip to content

Commit 11e877b

Browse files
Ronak Doshidavem330
authored andcommitted
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: Ronak Doshi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2eed5a8 commit 11e877b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/net/vmxnet3/vmxnet3_ethtool.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,12 @@ vmxnet3_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info,
899899
err = -EOPNOTSUPP;
900900
break;
901901
}
902+
#ifdef VMXNET3_RSS
903+
if (!adapter->rss) {
904+
err = -EOPNOTSUPP;
905+
break;
906+
}
907+
#endif
902908
err = vmxnet3_get_rss_hash_opts(adapter, info);
903909
break;
904910
default:
@@ -919,6 +925,12 @@ vmxnet3_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info)
919925
err = -EOPNOTSUPP;
920926
goto done;
921927
}
928+
#ifdef VMXNET3_RSS
929+
if (!adapter->rss) {
930+
err = -EOPNOTSUPP;
931+
goto done;
932+
}
933+
#endif
922934

923935
switch (info->cmd) {
924936
case ETHTOOL_SRXFH:

0 commit comments

Comments
 (0)