* [PATCH ethtool-next] ethtool: rings: report TCP header-data split
@ 2022-11-30 1:35 Jakub Kicinski
2022-12-04 17:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2022-11-30 1:35 UTC (permalink / raw)
To: mkubecek; +Cc: netdev, Jakub Kicinski
Report if device is in HDS compatible mode or not.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
netlink/rings.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/netlink/rings.c b/netlink/rings.c
index d50bbac47701..628403520f4a 100644
--- a/netlink/rings.c
+++ b/netlink/rings.c
@@ -20,6 +20,7 @@ int rings_reply_cb(const struct nlmsghdr *nlhdr, void *data)
const struct nlattr *tb[ETHTOOL_A_RINGS_MAX + 1] = {};
DECLARE_ATTR_TB_INFO(tb);
struct nl_context *nlctx = data;
+ unsigned char tcp_hds;
bool silent;
int err_ret;
int ret;
@@ -50,6 +51,24 @@ int rings_reply_cb(const struct nlmsghdr *nlhdr, void *data)
show_u32(tb[ETHTOOL_A_RINGS_CQE_SIZE], "CQE Size:\t\t");
show_bool("tx-push", "TX Push:\t%s\n", tb[ETHTOOL_A_RINGS_TX_PUSH]);
+ tcp_hds = tb[ETHTOOL_A_RINGS_TCP_DATA_SPLIT] ?
+ mnl_attr_get_u8(tb[ETHTOOL_A_RINGS_TCP_DATA_SPLIT]) : 0;
+ printf("TCP data split:\t");
+ switch (tcp_hds) {
+ case ETHTOOL_TCP_DATA_SPLIT_UNKNOWN:
+ printf("n/a\n");
+ break;
+ case ETHTOOL_TCP_DATA_SPLIT_DISABLED:
+ printf("off\n");
+ break;
+ case ETHTOOL_TCP_DATA_SPLIT_ENABLED:
+ printf("on\n");
+ break;
+ default:
+ printf("unknown(%d)\n", tcp_hds);
+ break;
+ }
+
return MNL_CB_OK;
}
--
2.38.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-04 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-30 1:35 [PATCH ethtool-next] ethtool: rings: report TCP header-data split Jakub Kicinski
2022-12-04 17:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).