* [ethtool-next PATCH] rings: add support to set/get cqe size
@ 2022-05-26 11:18 Subbaraya Sundeep
2022-06-06 10:24 ` Subbaraya Sundeep Bhatta
0 siblings, 1 reply; 3+ messages in thread
From: Subbaraya Sundeep @ 2022-05-26 11:18 UTC (permalink / raw)
To: mkubecek, davem, kuba; +Cc: netdev, sgoutham, hkelam, gakula, Subbaraya Sundeep
After a packet is sent or received by NIC then NIC posts
a completion queue event which consists of transmission status
(like send success or error) and received status(like
pointers to packet fragments). These completion events may
also use a ring similar to rx and tx rings. This patch
introduces cqe-size ethtool parameter to modify the size
of the completion queue event if NIC hardware has that capability.
With this patch in place, cqe size can be set via
"ethtool -G <dev> cqe-size xxx" and get via "ethtool -g <dev>".
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
---
ethtool.8.in | 4 ++++
ethtool.c | 1 +
netlink/rings.c | 7 +++++++
3 files changed, 12 insertions(+)
diff --git a/ethtool.8.in b/ethtool.8.in
index cbfe9cf..92ba229 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -200,6 +200,7 @@ ethtool \- query or control network driver and hardware settings
.BN tx
.BN rx\-buf\-len
.BN tx\-push
+.BN cqe\-size
.HP
.B ethtool \-i|\-\-driver
.I devname
@@ -577,6 +578,9 @@ Changes the size of a buffer in the Rx ring.
.TP
.BI tx\-push \ on|off
Specifies whether TX push should be enabled.
+.TP
+.BI cqe\-size \ N
+Changes the size of completion queue event.
.RE
.TP
.B \-i \-\-driver
diff --git a/ethtool.c b/ethtool.c
index c58c73b..ef4e4c6 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -5734,6 +5734,7 @@ static const struct option args[] = {
" [ tx N ]\n"
" [ rx-buf-len N]\n"
" [ tx-push on|off]\n"
+ " [ cqe-size N]\n"
},
{
.opts = "-k|--show-features|--show-offload",
diff --git a/netlink/rings.c b/netlink/rings.c
index 3718c10..5999247 100644
--- a/netlink/rings.c
+++ b/netlink/rings.c
@@ -48,6 +48,7 @@ int rings_reply_cb(const struct nlmsghdr *nlhdr, void *data)
show_u32(tb[ETHTOOL_A_RINGS_TX], "TX:\t\t");
show_u32(tb[ETHTOOL_A_RINGS_RX_BUF_LEN], "RX Buf Len:\t\t");
show_bool("tx-push", "TX Push:\t%s\n", tb[ETHTOOL_A_RINGS_TX_PUSH]);
+ show_u32(tb[ETHTOOL_A_RINGS_CQE_SIZE], "CQE Size:\t\t");
return MNL_CB_OK;
}
@@ -112,6 +113,12 @@ static const struct param_parser sring_params[] = {
.handler = nl_parse_u8bool,
.min_argc = 1,
},
+ {
+ .arg = "cqe-size",
+ .type = ETHTOOL_A_RINGS_CQE_SIZE,
+ .handler = nl_parse_direct_u32,
+ .min_argc = 1,
+ },
{}
};
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [ethtool-next PATCH] rings: add support to set/get cqe size
2022-05-26 11:18 [ethtool-next PATCH] rings: add support to set/get cqe size Subbaraya Sundeep
@ 2022-06-06 10:24 ` Subbaraya Sundeep Bhatta
2022-06-13 23:32 ` Michal Kubecek
0 siblings, 1 reply; 3+ messages in thread
From: Subbaraya Sundeep Bhatta @ 2022-06-06 10:24 UTC (permalink / raw)
To: mkubecek, davem, kuba
Cc: netdev, Sunil Kovvuri Goutham, Hariprasad Kelam, Geethasowjanya Akula
Hi Michal Kubecek,
Any comments?
Thanks,
Sundeep
________________________________________
From: Subbaraya Sundeep <sbhatta@marvell.com>
Sent: Thursday, May 26, 2022 4:48 PM
To: mkubecek@suse.cz; davem@davemloft.net; kuba@kernel.org
Cc: netdev@vger.kernel.org; Sunil Kovvuri Goutham; Hariprasad Kelam; Geethasowjanya Akula; Subbaraya Sundeep Bhatta
Subject: [ethtool-next PATCH] rings: add support to set/get cqe size
After a packet is sent or received by NIC then NIC posts
a completion queue event which consists of transmission status
(like send success or error) and received status(like
pointers to packet fragments). These completion events may
also use a ring similar to rx and tx rings. This patch
introduces cqe-size ethtool parameter to modify the size
of the completion queue event if NIC hardware has that capability.
With this patch in place, cqe size can be set via
"ethtool -G <dev> cqe-size xxx" and get via "ethtool -g <dev>".
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
---
ethtool.8.in | 4 ++++
ethtool.c | 1 +
netlink/rings.c | 7 +++++++
3 files changed, 12 insertions(+)
diff --git a/ethtool.8.in b/ethtool.8.in
index cbfe9cf..92ba229 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -200,6 +200,7 @@ ethtool \- query or control network driver and hardware settings
.BN tx
.BN rx\-buf\-len
.BN tx\-push
+.BN cqe\-size
.HP
.B ethtool \-i|\-\-driver
.I devname
@@ -577,6 +578,9 @@ Changes the size of a buffer in the Rx ring.
.TP
.BI tx\-push \ on|off
Specifies whether TX push should be enabled.
+.TP
+.BI cqe\-size \ N
+Changes the size of completion queue event.
.RE
.TP
.B \-i \-\-driver
diff --git a/ethtool.c b/ethtool.c
index c58c73b..ef4e4c6 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -5734,6 +5734,7 @@ static const struct option args[] = {
" [ tx N ]\n"
" [ rx-buf-len N]\n"
" [ tx-push on|off]\n"
+ " [ cqe-size N]\n"
},
{
.opts = "-k|--show-features|--show-offload",
diff --git a/netlink/rings.c b/netlink/rings.c
index 3718c10..5999247 100644
--- a/netlink/rings.c
+++ b/netlink/rings.c
@@ -48,6 +48,7 @@ int rings_reply_cb(const struct nlmsghdr *nlhdr, void *data)
show_u32(tb[ETHTOOL_A_RINGS_TX], "TX:\t\t");
show_u32(tb[ETHTOOL_A_RINGS_RX_BUF_LEN], "RX Buf Len:\t\t");
show_bool("tx-push", "TX Push:\t%s\n", tb[ETHTOOL_A_RINGS_TX_PUSH]);
+ show_u32(tb[ETHTOOL_A_RINGS_CQE_SIZE], "CQE Size:\t\t");
return MNL_CB_OK;
}
@@ -112,6 +113,12 @@ static const struct param_parser sring_params[] = {
.handler = nl_parse_u8bool,
.min_argc = 1,
},
+ {
+ .arg = "cqe-size",
+ .type = ETHTOOL_A_RINGS_CQE_SIZE,
+ .handler = nl_parse_direct_u32,
+ .min_argc = 1,
+ },
{}
};
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [ethtool-next PATCH] rings: add support to set/get cqe size
2022-06-06 10:24 ` Subbaraya Sundeep Bhatta
@ 2022-06-13 23:32 ` Michal Kubecek
0 siblings, 0 replies; 3+ messages in thread
From: Michal Kubecek @ 2022-06-13 23:32 UTC (permalink / raw)
To: Subbaraya Sundeep Bhatta
Cc: davem, kuba, netdev, Sunil Kovvuri Goutham, Hariprasad Kelam,
Geethasowjanya Akula
[-- Attachment #1: Type: text/plain, Size: 3514 bytes --]
On Mon, Jun 06, 2022 at 10:24:58AM +0000, Subbaraya Sundeep Bhatta wrote:
> Hi Michal Kubecek,
>
> Any comments?
It's applied now, I just applied it to master before releasing 5.18
because the kernel counterpart is in v5.18.
Michal
>
> Thanks,
> Sundeep
>
> ________________________________________
> From: Subbaraya Sundeep <sbhatta@marvell.com>
> Sent: Thursday, May 26, 2022 4:48 PM
> To: mkubecek@suse.cz; davem@davemloft.net; kuba@kernel.org
> Cc: netdev@vger.kernel.org; Sunil Kovvuri Goutham; Hariprasad Kelam; Geethasowjanya Akula; Subbaraya Sundeep Bhatta
> Subject: [ethtool-next PATCH] rings: add support to set/get cqe size
>
> After a packet is sent or received by NIC then NIC posts
> a completion queue event which consists of transmission status
> (like send success or error) and received status(like
> pointers to packet fragments). These completion events may
> also use a ring similar to rx and tx rings. This patch
> introduces cqe-size ethtool parameter to modify the size
> of the completion queue event if NIC hardware has that capability.
> With this patch in place, cqe size can be set via
> "ethtool -G <dev> cqe-size xxx" and get via "ethtool -g <dev>".
>
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> ---
> ethtool.8.in | 4 ++++
> ethtool.c | 1 +
> netlink/rings.c | 7 +++++++
> 3 files changed, 12 insertions(+)
>
> diff --git a/ethtool.8.in b/ethtool.8.in
> index cbfe9cf..92ba229 100644
> --- a/ethtool.8.in
> +++ b/ethtool.8.in
> @@ -200,6 +200,7 @@ ethtool \- query or control network driver and hardware settings
> .BN tx
> .BN rx\-buf\-len
> .BN tx\-push
> +.BN cqe\-size
> .HP
> .B ethtool \-i|\-\-driver
> .I devname
> @@ -577,6 +578,9 @@ Changes the size of a buffer in the Rx ring.
> .TP
> .BI tx\-push \ on|off
> Specifies whether TX push should be enabled.
> +.TP
> +.BI cqe\-size \ N
> +Changes the size of completion queue event.
> .RE
> .TP
> .B \-i \-\-driver
> diff --git a/ethtool.c b/ethtool.c
> index c58c73b..ef4e4c6 100644
> --- a/ethtool.c
> +++ b/ethtool.c
> @@ -5734,6 +5734,7 @@ static const struct option args[] = {
> " [ tx N ]\n"
> " [ rx-buf-len N]\n"
> " [ tx-push on|off]\n"
> + " [ cqe-size N]\n"
> },
> {
> .opts = "-k|--show-features|--show-offload",
> diff --git a/netlink/rings.c b/netlink/rings.c
> index 3718c10..5999247 100644
> --- a/netlink/rings.c
> +++ b/netlink/rings.c
> @@ -48,6 +48,7 @@ int rings_reply_cb(const struct nlmsghdr *nlhdr, void *data)
> show_u32(tb[ETHTOOL_A_RINGS_TX], "TX:\t\t");
> show_u32(tb[ETHTOOL_A_RINGS_RX_BUF_LEN], "RX Buf Len:\t\t");
> show_bool("tx-push", "TX Push:\t%s\n", tb[ETHTOOL_A_RINGS_TX_PUSH]);
> + show_u32(tb[ETHTOOL_A_RINGS_CQE_SIZE], "CQE Size:\t\t");
>
> return MNL_CB_OK;
> }
> @@ -112,6 +113,12 @@ static const struct param_parser sring_params[] = {
> .handler = nl_parse_u8bool,
> .min_argc = 1,
> },
> + {
> + .arg = "cqe-size",
> + .type = ETHTOOL_A_RINGS_CQE_SIZE,
> + .handler = nl_parse_direct_u32,
> + .min_argc = 1,
> + },
> {}
> };
>
> --
> 2.7.4
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-13 23:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 11:18 [ethtool-next PATCH] rings: add support to set/get cqe size Subbaraya Sundeep
2022-06-06 10:24 ` Subbaraya Sundeep Bhatta
2022-06-13 23:32 ` Michal Kubecek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.