[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241113173222.372128-8-ap420073@gmail.com>
Date: Wed, 13 Nov 2024 17:32:21 +0000
From: Taehee Yoo <ap420073@...il.com>
To: davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
edumazet@...gle.com,
almasrymina@...gle.com,
donald.hunter@...il.com,
corbet@....net,
michael.chan@...adcom.com,
andrew+netdev@...n.ch,
hawk@...nel.org,
ilias.apalodimas@...aro.org,
ast@...nel.org,
daniel@...earbox.net,
john.fastabend@...il.com,
dw@...idwei.uk,
sdf@...ichev.me,
asml.silence@...il.com,
brett.creeley@....com,
linux-doc@...r.kernel.org,
netdev@...r.kernel.org
Cc: kory.maincent@...tlin.com,
maxime.chevallier@...tlin.com,
danieller@...dia.com,
hengqi@...ux.alibaba.com,
ecree.xilinx@...il.com,
przemyslaw.kitszel@...el.com,
hkallweit1@...il.com,
ahmed.zaki@...el.com,
rrameshbabu@...dia.com,
idosch@...dia.com,
jiri@...nulli.us,
bigeasy@...utronix.de,
lorenzo@...nel.org,
jdamato@...tly.com,
aleksander.lobakin@...el.com,
kaiyuanz@...gle.com,
willemb@...gle.com,
daniel.zahka@...il.com,
ap420073@...il.com
Subject: [PATCH net-next v5 7/7] net: ethtool: add ring parameter filtering
While the devmem is running, the tcp-data-split and
header-data-split-thresh configuration should not be changed.
If user tries to change tcp-data-split and threshold value while the
devmem is running, it fails and shows extack message.
Tested-by: Stanislav Fomichev <sdf@...ichev.me>
Reviewed-by: Mina Almasry <almasrymina@...gle.com>
Signed-off-by: Taehee Yoo <ap420073@...il.com>
---
v5:
- Change extack message.
- Add Review tag from Mina.
v4:
- Check condition before __netif_get_rx_queue().
- Separate condition check.
- Add Test tag from Stanislav.
v3:
- Patch added.
net/ethtool/rings.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/net/ethtool/rings.c b/net/ethtool/rings.c
index ca836aad3fa9..3f3be806c6c8 100644
--- a/net/ethtool/rings.c
+++ b/net/ethtool/rings.c
@@ -258,6 +258,19 @@ ethnl_set_rings(struct ethnl_req_info *req_info, struct genl_info *info)
return -ERANGE;
}
+ if (dev_get_min_mp_channel_count(dev)) {
+ if (kernel_ringparam.tcp_data_split !=
+ ETHTOOL_TCP_DATA_SPLIT_ENABLED) {
+ NL_SET_ERR_MSG(info->extack,
+ "can't disable tcp-data-split while device has memory provider enabled");
+ return -EINVAL;
+ } else if (kernel_ringparam.hds_thresh) {
+ NL_SET_ERR_MSG(info->extack,
+ "can't set non-zero hds_thresh while device is memory provider enabled");
+ return -EINVAL;
+ }
+ }
+
/* ensure new ring parameters are within limits */
if (ringparam.rx_pending > ringparam.rx_max_pending)
err_attr = tb[ETHTOOL_A_RINGS_RX];
--
2.34.1
Powered by blists - more mailing lists