aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/ethtool/rings.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-01-18 18:05:13 -0800
committerJakub Kicinski <kuba@kernel.org>2025-01-20 11:44:57 -0800
commit32ad1f7a050d0c17e1e52e1dfdd9f6221ae20ef9 (patch)
tree738323fe82583fe4dbd5dafe1f05aefdfc61de7a /net/ethtool/rings.c
parentnet: ethtool: store netdev in a temp variable in ethnl_default_set_doit() (diff)
downloadwireguard-linux-32ad1f7a050d0c17e1e52e1dfdd9f6221ae20ef9.tar.xz
wireguard-linux-32ad1f7a050d0c17e1e52e1dfdd9f6221ae20ef9.zip
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>
Diffstat (limited to '')
-rw-r--r--net/ethtool/rings.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ethtool/rings.c b/net/ethtool/rings.c
index 7a3c2a2dff12..5e8ba81fbb3e 100644
--- a/net/ethtool/rings.c
+++ b/net/ethtool/rings.c
@@ -294,13 +294,11 @@ ethnl_set_rings(struct ethnl_req_info *req_info, struct genl_info *info)
return -EINVAL;
}
+ dev->cfg_pending->hds_config = kernel_ringparam.tcp_data_split;
+ dev->cfg_pending->hds_thresh = kernel_ringparam.hds_thresh;
+
ret = dev->ethtool_ops->set_ringparam(dev, &ringparam,
&kernel_ringparam, info->extack);
- if (!ret) {
- dev->cfg->hds_config = kernel_ringparam.tcp_data_split;
- dev->cfg->hds_thresh = kernel_ringparam.hds_thresh;
- }
-
return ret < 0 ? ret : 1;
}