* [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP
@ 2023-02-09 23:44 Xin Long
2023-02-09 23:44 ` [PATCH iproute2-next 1/2] iplink: fix the gso and gro max_size names in documentation Xin Long
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Xin Long @ 2023-02-09 23:44 UTC (permalink / raw)
To: network dev, stephen; +Cc: kuba, Eric Dumazet, Paolo Abeni, David Ahern
Patch 1 fixes some typos in the documents, and Patch 2 adds two
attributes to allow userspace to enable IPv4 BIG TCP.
Xin Long (2):
iplink: fix the gso and gro max_size names in documentation
iplink: add gso and gro max_size attributes for ipv4
ip/ipaddress.c | 12 ++++++++++++
ip/iplink.c | 22 ++++++++++++++++++++--
man/man8/ip-link.8.in | 36 ++++++++++++++++++++++++++++++------
3 files changed, 62 insertions(+), 8 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH iproute2-next 1/2] iplink: fix the gso and gro max_size names in documentation
2023-02-09 23:44 [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP Xin Long
@ 2023-02-09 23:44 ` Xin Long
2023-02-09 23:44 ` [PATCH iproute2-next 2/2] iplink: add gso and gro max_size attributes for ipv4 Xin Long
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Xin Long @ 2023-02-09 23:44 UTC (permalink / raw)
To: network dev, stephen; +Cc: kuba, Eric Dumazet, Paolo Abeni, David Ahern
The option names for "ip link set" should be gso/gro_max_*
instead of max_gso/gro_*. So fix them in documentation.
Fixes: e4ba36f75201 ("iplink: add ip-link documentation")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
man/man8/ip-link.8.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index ac33b438..eeddf493 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -88,11 +88,11 @@ ip-link \- network device configuration
.RB "[ " txqueuelen
.IR PACKETS " ]"
.br
-.RB "[ " max_gso_size
+.RB "[ " gso_max_size
.IR BYTES " ]"
-.RB "[ " max_gso_segs
+.RB "[ " gso_max_segs
.IR SEGMENTS " ]"
-.RB "[ " max_gro_size
+.RB "[ " gro_max_size
.IR BYTES " ]"
.br
.RB "[ " name
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH iproute2-next 2/2] iplink: add gso and gro max_size attributes for ipv4
2023-02-09 23:44 [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP Xin Long
2023-02-09 23:44 ` [PATCH iproute2-next 1/2] iplink: fix the gso and gro max_size names in documentation Xin Long
@ 2023-02-09 23:44 ` Xin Long
2023-02-18 1:50 ` [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP patchwork-bot+netdevbpf
2023-02-18 17:12 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Xin Long @ 2023-02-09 23:44 UTC (permalink / raw)
To: network dev, stephen; +Cc: kuba, Eric Dumazet, Paolo Abeni, David Ahern
This patch adds two attributes gso/gro_ipv4_max_size in iplink for the
user space support of the BIG TCP for IPv4:
https://lore.kernel.org/netdev/de811bf3-e2d8-f727-72bc-c8a754a9d929@tessares.net/T/
Note that after this kernel patchset, "gso/gro_max_size" are used for IPv6
packets while "gso/gro_ipv4_max_size" are for IPv4 patckets. To not break
these old applications using "gso/gro_ipv4_max_size" for IPv4 GSO packets,
the new size will also be set on "gso/gro_ipv4_max_size" in kernel when
"gso/gro_max_size" changes to a value <= 65536.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
ip/ipaddress.c | 12 ++++++++++++
ip/iplink.c | 22 ++++++++++++++++++++--
man/man8/ip-link.8.in | 30 +++++++++++++++++++++++++++---
3 files changed, 59 insertions(+), 5 deletions(-)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index c7553bcd..9ba81438 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1264,6 +1264,18 @@ int print_linkinfo(struct nlmsghdr *n, void *arg)
"gro_max_size %u ",
rta_getattr_u32(tb[IFLA_GRO_MAX_SIZE]));
+ if (tb[IFLA_GSO_IPV4_MAX_SIZE])
+ print_uint(PRINT_ANY,
+ "gso_ipv4_max_size",
+ "gso_ipv4_max_size %u ",
+ rta_getattr_u32(tb[IFLA_GSO_IPV4_MAX_SIZE]));
+
+ if (tb[IFLA_GRO_IPV4_MAX_SIZE])
+ print_uint(PRINT_ANY,
+ "gro_ipv4_max_size",
+ "gro_ipv4_max_size %u ",
+ rta_getattr_u32(tb[IFLA_GRO_IPV4_MAX_SIZE]));
+
if (tb[IFLA_PHYS_PORT_NAME])
print_string(PRINT_ANY,
"phys_port_name",
diff --git a/ip/iplink.c b/ip/iplink.c
index 4ec9e370..a8da52f9 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -114,8 +114,8 @@ void iplink_usage(void)
" [ addrgenmode { eui64 | none | stable_secret | random } ]\n"
" [ protodown { on | off } ]\n"
" [ protodown_reason PREASON { on | off } ]\n"
- " [ gso_max_size BYTES ] | [ gso_max_segs PACKETS ]\n"
- " [ gro_max_size BYTES ]\n"
+ " [ gso_max_size BYTES ] [ gso_ipv4_max_size BYTES ] [ gso_max_segs PACKETS ]\n"
+ " [ gro_max_size BYTES ] [ gro_ipv4_max_size BYTES ]\n"
"\n"
" ip link show [ DEVICE | group GROUP ] [up] [master DEV] [vrf NAME] [type TYPE]\n"
" [nomaster]\n"
@@ -948,6 +948,24 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req, char **type)
*argv);
addattr32(&req->n, sizeof(*req),
IFLA_GRO_MAX_SIZE, max_size);
+ } else if (strcmp(*argv, "gso_ipv4_max_size") == 0) {
+ unsigned int max_size;
+
+ NEXT_ARG();
+ if (get_unsigned(&max_size, *argv, 0))
+ invarg("Invalid \"gso_ipv4_max_size\" value\n",
+ *argv);
+ addattr32(&req->n, sizeof(*req),
+ IFLA_GSO_IPV4_MAX_SIZE, max_size);
+ } else if (strcmp(*argv, "gro_ipv4_max_size") == 0) {
+ unsigned int max_size;
+
+ NEXT_ARG();
+ if (get_unsigned(&max_size, *argv, 0))
+ invarg("Invalid \"gro_ipv4_max_size\" value\n",
+ *argv);
+ addattr32(&req->n, sizeof(*req),
+ IFLA_GRO_IPV4_MAX_SIZE, max_size);
} else if (strcmp(*argv, "parentdev") == 0) {
NEXT_ARG();
addattr_l(&req->n, sizeof(*req), IFLA_PARENT_DEV_NAME,
diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8.in
index eeddf493..c8c65657 100644
--- a/man/man8/ip-link.8.in
+++ b/man/man8/ip-link.8.in
@@ -38,11 +38,16 @@ ip-link \- network device configuration
.br
.RB "[ " gso_max_size
.IR BYTES " ]"
+.RB "[ " gso_ipv4_max_size
+.IR BYTES " ]"
.RB "[ " gso_max_segs
.IR SEGMENTS " ]"
.br
.RB "[ " gro_max_size
.IR BYTES " ]"
+.RB "[ " gro_ipv4_max_size
+.IR BYTES " ]"
+.br
.RB "[ " netns " {"
.IR PID " | " NETNSNAME " } ]"
.br
@@ -90,10 +95,15 @@ ip-link \- network device configuration
.br
.RB "[ " gso_max_size
.IR BYTES " ]"
+.RB "[ " gso_ipv4_max_size
+.IR BYTES " ]"
.RB "[ " gso_max_segs
.IR SEGMENTS " ]"
+.br
.RB "[ " gro_max_size
.IR BYTES " ]"
+.RB "[ " gro_ipv4_max_size
+.IR BYTES " ]"
.br
.RB "[ " name
.IR NEWNAME " ]"
@@ -423,7 +433,14 @@ specifies the number of receive queues for new device.
.TP
.BI gso_max_size " BYTES "
specifies the recommended maximum size of a Generic Segment Offload
-packet the new device should accept.
+packet the new device should accept. This is also used to enable BIG
+TCP for IPv6 on this device when the size is greater than 65536.
+
+.TP
+.BI gso_ipv4_max_size " BYTES "
+specifies the recommended maximum size of a IPv4 Generic Segment Offload
+packet the new device should accept. This is especially used to enable
+BIG TCP for IPv4 on this device by setting to a size greater than 65536.
.TP
.BI gso_max_segs " SEGMENTS "
@@ -432,8 +449,15 @@ segments the new device should accept.
.TP
.BI gro_max_size " BYTES "
-specifies the maximum size of a packet built by GRO stack
-on this device.
+specifies the maximum size of a packet built by GRO stack on this
+device. This is also used for BIG TCP to allow the size of a
+merged IPv6 GSO packet on this device greater than 65536.
+
+.TP
+.BI gro_ipv4_max_size " BYTES "
+specifies the maximum size of a IPv4 packet built by GRO stack on this
+device. This is especially used for BIG TCP to allow the size of a
+merged IPv4 GSO packet on this device greater than 65536.
.TP
.BI index " IDX "
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP
2023-02-09 23:44 [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP Xin Long
2023-02-09 23:44 ` [PATCH iproute2-next 1/2] iplink: fix the gso and gro max_size names in documentation Xin Long
2023-02-09 23:44 ` [PATCH iproute2-next 2/2] iplink: add gso and gro max_size attributes for ipv4 Xin Long
@ 2023-02-18 1:50 ` patchwork-bot+netdevbpf
2023-02-18 17:12 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-18 1:50 UTC (permalink / raw)
To: Xin Long; +Cc: netdev, stephen, kuba, edumazet, pabeni, dsahern
Hello:
This series was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:
On Thu, 9 Feb 2023 18:44:22 -0500 you wrote:
> Patch 1 fixes some typos in the documents, and Patch 2 adds two
> attributes to allow userspace to enable IPv4 BIG TCP.
>
> Xin Long (2):
> iplink: fix the gso and gro max_size names in documentation
> iplink: add gso and gro max_size attributes for ipv4
>
> [...]
Here is the summary with links:
- [iproute2-next,1/2] iplink: fix the gso and gro max_size names in documentation
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=62566ad5c0e6
- [iproute2-next,2/2] iplink: add gso and gro max_size attributes for ipv4
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP
2023-02-09 23:44 [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP Xin Long
` (2 preceding siblings ...)
2023-02-18 1:50 ` [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP patchwork-bot+netdevbpf
@ 2023-02-18 17:12 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-18 17:12 UTC (permalink / raw)
To: Xin Long; +Cc: netdev, stephen, kuba, edumazet, pabeni, dsahern
Hello:
This series was applied to iproute2/iproute2-next.git (main)
by David Ahern <dsahern@kernel.org>:
On Thu, 9 Feb 2023 18:44:22 -0500 you wrote:
> Patch 1 fixes some typos in the documents, and Patch 2 adds two
> attributes to allow userspace to enable IPv4 BIG TCP.
>
> Xin Long (2):
> iplink: fix the gso and gro max_size names in documentation
> iplink: add gso and gro max_size attributes for ipv4
>
> [...]
Here is the summary with links:
- [iproute2-next,1/2] iplink: fix the gso and gro max_size names in documentation
(no matching commit)
- [iproute2-next,2/2] iplink: add gso and gro max_size attributes for ipv4
https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=1dafe448c7a2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-18 17:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09 23:44 [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP Xin Long
2023-02-09 23:44 ` [PATCH iproute2-next 1/2] iplink: fix the gso and gro max_size names in documentation Xin Long
2023-02-09 23:44 ` [PATCH iproute2-next 2/2] iplink: add gso and gro max_size attributes for ipv4 Xin Long
2023-02-18 1:50 ` [PATCH iproute2-next 0/2] iplink: support IPv4 BIG TCP patchwork-bot+netdevbpf
2023-02-18 17:12 ` 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).