netlink: settings: add netlink support for coalesce cqe mode parameter
Subsystems (2)
PATCH RESEND 1/1 netlink: settings: add netlink support for coalesce cqe mode parameter
Add support for "ethtool -c <dev> cqe-mode-rx/cqe-mode-tx on/off" for setting coalesce cqe mode.
Signed-off-by Yufeng Mo <[email protected]>
--- ethtool.c | 2 ++ netlink/coalesce.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+)
ethtool.c +2 -0
@@ -5703,6 +5703,8 @@ static const struct option args[] = {" [tx-usecs-high N]\n" " [tx-frames-high N]\n" " [sample-interval N]\n" +" [cqe-mode-rx on|off]\n" +" [cqe-mode-tx on|off]\n" }, { .opts = "-g|--show-ring",
netlink/coalesce.c +15 -0
@@ -66,6 +66,9 @@ int coalesce_reply_cb(const struct nlmsghdr *nlhdr, void *data)show_u32 (tb[ETHTOOL_A_COALESCE_TX_USECS_HIGH ],"tx-usecs-high: " );show_u32 (tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH ],"tx-frame-high: " );putchar ('\n' ); +show_bool ("rx" ,"CQE mode RX: %s " , + tb[ETHTOOL_A_COALESCE_USE_CQE_MODE_RX ]); +show_bool ("tx" ,"TX: %s\n" , tb[ETHTOOL_A_COALESCE_USE_CQE_MODE_TX ]);return MNL_CB_OK ; }
@@ -226,6 +229,18 @@ static const struct param_parser scoalesce_params[] = { .handler = nl_parse_direct_u32, .min_argc = 1, }, + { + .arg = "cqe-mode-rx", + .type = ETHTOOL_A_COALESCE_USE_CQE_MODE_RX, + .handler = nl_parse_u8bool, + .min_argc = 1, + }, + { + .arg = "cqe-mode-tx", + .type = ETHTOOL_A_COALESCE_USE_CQE_MODE_TX, + .handler = nl_parse_u8bool, + .min_argc = 1, + }, {} };
Signature · 1 line
2.8.1
Quoted 8 lines · Yufeng Mo
Add support for "ethtool -c <dev> cqe-mode-rx/cqe-mode-tx on/off" for setting coalesce cqe mode.
Signed-off-by Yufeng Mo <[email protected]>--- ethtool.c | 2 ++ netlink/coalesce.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+)
Please update also the man page (file ethtool.8.in) to show the new parameters.
Michal
Quoted 49 lines
ethtool.c +2
-0@@ -5703,6 +5703,8 @@ static const struct option args[] = {" [tx-usecs-high N]\n" " [tx-frames-high N]\n" " [sample-interval N]\n" +" [cqe-mode-rx on|off]\n" +" [cqe-mode-tx on|off]\n" }, { .opts = "-g|--show-ring",netlink/coalesce.c +15
-0@@ -66,6 +66,9 @@ int coalesce_reply_cb(const struct nlmsghdr *nlhdr, void *data)show_u32 (tb[ETHTOOL_A_COALESCE_TX_USECS_HIGH ],"tx-usecs-high: " );show_u32 (tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH ],"tx-frame-high: " );putchar ('\n' ); +show_bool ("rx" ,"CQE mode RX: %s " , + tb[ETHTOOL_A_COALESCE_USE_CQE_MODE_RX ]); +show_bool ("tx" ,"TX: %s\n" , tb[ETHTOOL_A_COALESCE_USE_CQE_MODE_TX ]);return MNL_CB_OK ; }@@ -226,6 +229,18 @@ static const struct param_parser scoalesce_params[] = { .handler = nl_parse_direct_u32, .min_argc = 1, }, + { + .arg = "cqe-mode-rx", + .type = ETHTOOL_A_COALESCE_USE_CQE_MODE_RX, + .handler = nl_parse_u8bool, + .min_argc = 1, + }, + { + .arg = "cqe-mode-tx", + .type = ETHTOOL_A_COALESCE_USE_CQE_MODE_TX, + .handler = nl_parse_u8bool, + .min_argc = 1, + }, {} };Signature · 1 line
2.8.1
Quoted 10 lines · Michal Kubecek
Quoted 8 lines · Yufeng Mo
Add support for "ethtool -c <dev> cqe-mode-rx/cqe-mode-tx on/off" for setting coalesce cqe mode.
Signed-off-by Yufeng Mo <[email protected]>--- ethtool.c | 2 ++ netlink/coalesce.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+)
Quoted 5 lines
Please update also the man page (file ethtool.8.in) to show the new parameters.
Michal
ok, thanks
Quoted 49 lines
Quoted 49 lines
ethtool.c +2
-0@@ -5703,6 +5703,8 @@ static const struct option args[] = {" [tx-usecs-high N]\n" " [tx-frames-high N]\n" " [sample-interval N]\n" +" [cqe-mode-rx on|off]\n" +" [cqe-mode-tx on|off]\n" }, { .opts = "-g|--show-ring",netlink/coalesce.c +15
-0@@ -66,6 +66,9 @@ int coalesce_reply_cb(const struct nlmsghdr *nlhdr, void *data)show_u32 (tb[ETHTOOL_A_COALESCE_TX_USECS_HIGH ],"tx-usecs-high: " );show_u32 (tb[ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH ],"tx-frame-high: " );putchar ('\n' ); +show_bool ("rx" ,"CQE mode RX: %s " , + tb[ETHTOOL_A_COALESCE_USE_CQE_MODE_RX ]); +show_bool ("tx" ,"TX: %s\n" , tb[ETHTOOL_A_COALESCE_USE_CQE_MODE_TX ]);return MNL_CB_OK ; }@@ -226,6 +229,18 @@ static const struct param_parser scoalesce_params[] = { .handler = nl_parse_direct_u32, .min_argc = 1, }, + { + .arg = "cqe-mode-rx", + .type = ETHTOOL_A_COALESCE_USE_CQE_MODE_RX, + .handler = nl_parse_u8bool, + .min_argc = 1, + }, + { + .arg = "cqe-mode-tx", + .type = ETHTOOL_A_COALESCE_USE_CQE_MODE_TX, + .handler = nl_parse_u8bool, + .min_argc = 1, + }, {} };Signature · 1 line
2.8.1