* [PATCH net-next] vmxnet3: allow rx flow hash ops only when rss is enabled
@ 2020-06-02 3:02 Ronak Doshi
0 siblings, 0 replies; only message in thread
From: Ronak Doshi @ 2020-06-02 3:02 UTC (permalink / raw)
To: netdev
Cc: Ronak Doshi, VMware, Inc., David S. Miller, Jakub Kicinski, open list
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 <doshir@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_ethtool.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index 6acaafe169de..def27afa1c69 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -899,6 +899,12 @@ vmxnet3_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info,
err = -EOPNOTSUPP;
break;
}
+#ifdef VMXNET3_RSS
+ if (!adapter->rss) {
+ err = -EOPNOTSUPP;
+ break;
+ }
+#endif
err = vmxnet3_get_rss_hash_opts(adapter, info);
break;
default:
@@ -919,6 +925,12 @@ vmxnet3_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info)
err = -EOPNOTSUPP;
goto done;
}
+#ifdef VMXNET3_RSS
+ if (!adapter->rss) {
+ err = -EOPNOTSUPP;
+ goto done;
+ }
+#endif
switch (info->cmd) {
case ETHTOOL_SRXFH:
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-02 3:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02 3:02 [PATCH net-next] vmxnet3: allow rx flow hash ops only when rss is enabled Ronak Doshi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.