net: provide pending ring configuration in net_device

Record the pending configuration in net_device struct.
ethtool core duplicates the current config and the specific
handlers (for now just ringparam) can modify it.

Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20250119020518.1962249-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski
2025-01-18 18:05:13 -08:00
parent 743dea746e
commit 32ad1f7a05
4 changed files with 29 additions and 8 deletions

View File

@@ -2413,6 +2413,12 @@ struct net_device {
/** @cfg: net_device queue-related configuration */
struct netdev_config *cfg;
/**
* @cfg_pending: same as @cfg but when device is being actively
* reconfigured includes any changes to the configuration
* requested by the user, but which may or may not be rejected.
*/
struct netdev_config *cfg_pending;
struct ethtool_netdev_state *ethtool;
/* protected by rtnl_lock */