On Tue, 15 Jul 2025 10:20:38 +0300 Gal Pressman wrote:
quoted
+ rx_rings.cmd = ETHTOOL_GRXRINGS;
+ err = ops->get_rxnfc(dev, &rx_rings, NULL);
Do we need to check for NULL op?
Hm, yes.
quoted
+ mutex_lock(&dev->ethtool->rss_lock);
+ if (request->rss_context) {
+ ctx = xa_load(&dev->ethtool->rss_ctx, request->rss_context);
+ if (!ctx) {
+ ret = -ENOENT;
+ goto exit_unlock;
+ }
+ }
+
+ if (!mod)
+ ret = 0; /* nothing to tell the driver */
+ else if (!ops->set_rxfh)
Why not do it in validate?
Because of the silly drivers which only support setting hash fields but
not the RSS basics. We'd need to duplicate the list of which fields end
up fed to ->set_rxfh in validate.