* [PATCH net-next] gve: Support IPv6 Big TCP on DQ
@ 2023-05-22 20:15 Ziwei Xiao
2023-05-23 10:21 ` Simon Horman
2023-05-24 4:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ziwei Xiao @ 2023-05-22 20:15 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, Coco Li, Ziwei Xiao
From: Coco Li <lixiaoyan@google.com>
Add support for using IPv6 Big TCP on DQ which can handle large TSO/GRO
packets. See https://lwn.net/Articles/895398/. This can improve the
throughput and CPU usage.
Perf test result:
ip -d link show $DEV
gso_max_size 185000 gso_max_segs 65535 tso_max_size 262143 tso_max_segs 65535 gro_max_size 185000
For performance, tested with neper using 9k MTU on hardware that supports 200Gb/s line rate.
In single streams when line rate is not saturated, we expect throughput improvements.
When the networking is performing at line rate, we expect cpu usage improvements.
Tcp_stream (unidirectional stream test, T=thread, F=flow):
skb=180kb, T=1, F=1, no zerocopy: throughput average=64576.88 Mb/s, sender stime=8.3, receiver stime=10.68
skb=64kb, T=1, F=1, no zerocopy: throughput average=64862.54 Mb/s, sender stime=9.96, receiver stime=12.67
skb=180kb, T=1, F=1, yes zerocopy: throughput average=146604.97 Mb/s, sender stime=10.61, receiver stime=5.52
skb=64kb, T=1, F=1, yes zerocopy: throughput average=131357.78 Mb/s, sender stime=12.11, receiver stime=12.25
skb=180kb, T=20, F=100, no zerocopy: throughput average=182411.37 Mb/s, sender stime=41.62, receiver stime=79.4
skb=64kb, T=20, F=100, no zerocopy: throughput average=182892.02 Mb/s, sender stime=57.39, receiver stime=72.69
skb=180kb, T=20, F=100, yes zerocopy: throughput average=182337.65 Mb/s, sender stime=27.94, receiver stime=39.7
skb=64kb, T=20, F=100, yes zerocopy: throughput average=182144.20 Mb/s, sender stime=47.06, receiver stime=39.01
Signed-off-by: Ziwei Xiao <ziweixiao@google.com>
Signed-off-by: Coco Li <lixiaoyan@google.com>
---
drivers/net/ethernet/google/gve/gve_main.c | 5 +++++
drivers/net/ethernet/google/gve/gve_tx_dqo.c | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index caa00c72aeeb..8fb70db63b8b 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -31,6 +31,7 @@
// Minimum amount of time between queue kicks in msec (10 seconds)
#define MIN_TX_TIMEOUT_GAP (1000 * 10)
+#define DQO_TX_MAX 0x3FFFF
const char gve_version_str[] = GVE_VERSION;
static const char gve_version_prefix[] = GVE_VERSION_PREFIX;
@@ -2047,6 +2048,10 @@ static int gve_init_priv(struct gve_priv *priv, bool skip_describe_device)
goto err;
}
+ /* Big TCP is only supported on DQ*/
+ if (!gve_is_gqi(priv))
+ netif_set_tso_max_size(priv->dev, DQO_TX_MAX);
+
priv->num_registered_pages = 0;
priv->rx_copybreak = GVE_DEFAULT_RX_COPYBREAK;
/* gvnic has one Notification Block per MSI-x vector, except for the
diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
index b76143bfd594..3c09e66ba1ab 100644
--- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
@@ -8,6 +8,7 @@
#include "gve_adminq.h"
#include "gve_utils.h"
#include "gve_dqo.h"
+#include <net/ip.h>
#include <linux/tcp.h>
#include <linux/slab.h>
#include <linux/skbuff.h>
@@ -646,6 +647,9 @@ static int gve_try_tx_skb(struct gve_priv *priv, struct gve_tx_ring *tx,
goto drop;
}
+ if (unlikely(ipv6_hopopt_jumbo_remove(skb)))
+ goto drop;
+
num_buffer_descs = gve_num_buffer_descs_needed(skb);
} else {
num_buffer_descs = gve_num_buffer_descs_needed(skb);
--
2.40.1.698.g37aff9b760-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] gve: Support IPv6 Big TCP on DQ
2023-05-22 20:15 [PATCH net-next] gve: Support IPv6 Big TCP on DQ Ziwei Xiao
@ 2023-05-23 10:21 ` Simon Horman
2023-05-24 4:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-05-23 10:21 UTC (permalink / raw)
To: Ziwei Xiao; +Cc: netdev, davem, kuba, Coco Li
On Mon, May 22, 2023 at 01:15:52PM -0700, Ziwei Xiao wrote:
> From: Coco Li <lixiaoyan@google.com>
>
> Add support for using IPv6 Big TCP on DQ which can handle large TSO/GRO
> packets. See https://lwn.net/Articles/895398/. This can improve the
> throughput and CPU usage.
>
> Perf test result:
> ip -d link show $DEV
> gso_max_size 185000 gso_max_segs 65535 tso_max_size 262143 tso_max_segs 65535 gro_max_size 185000
>
> For performance, tested with neper using 9k MTU on hardware that supports 200Gb/s line rate.
>
> In single streams when line rate is not saturated, we expect throughput improvements.
> When the networking is performing at line rate, we expect cpu usage improvements.
>
> Tcp_stream (unidirectional stream test, T=thread, F=flow):
> skb=180kb, T=1, F=1, no zerocopy: throughput average=64576.88 Mb/s, sender stime=8.3, receiver stime=10.68
> skb=64kb, T=1, F=1, no zerocopy: throughput average=64862.54 Mb/s, sender stime=9.96, receiver stime=12.67
> skb=180kb, T=1, F=1, yes zerocopy: throughput average=146604.97 Mb/s, sender stime=10.61, receiver stime=5.52
> skb=64kb, T=1, F=1, yes zerocopy: throughput average=131357.78 Mb/s, sender stime=12.11, receiver stime=12.25
>
> skb=180kb, T=20, F=100, no zerocopy: throughput average=182411.37 Mb/s, sender stime=41.62, receiver stime=79.4
> skb=64kb, T=20, F=100, no zerocopy: throughput average=182892.02 Mb/s, sender stime=57.39, receiver stime=72.69
> skb=180kb, T=20, F=100, yes zerocopy: throughput average=182337.65 Mb/s, sender stime=27.94, receiver stime=39.7
> skb=64kb, T=20, F=100, yes zerocopy: throughput average=182144.20 Mb/s, sender stime=47.06, receiver stime=39.01
>
> Signed-off-by: Ziwei Xiao <ziweixiao@google.com>
> Signed-off-by: Coco Li <lixiaoyan@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] gve: Support IPv6 Big TCP on DQ
2023-05-22 20:15 [PATCH net-next] gve: Support IPv6 Big TCP on DQ Ziwei Xiao
2023-05-23 10:21 ` Simon Horman
@ 2023-05-24 4:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-24 4:20 UTC (permalink / raw)
To: Ziwei Xiao; +Cc: netdev, davem, kuba, lixiaoyan
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 22 May 2023 13:15:52 -0700 you wrote:
> From: Coco Li <lixiaoyan@google.com>
>
> Add support for using IPv6 Big TCP on DQ which can handle large TSO/GRO
> packets. See https://lwn.net/Articles/895398/. This can improve the
> throughput and CPU usage.
>
> Perf test result:
> ip -d link show $DEV
> gso_max_size 185000 gso_max_segs 65535 tso_max_size 262143 tso_max_segs 65535 gro_max_size 185000
>
> [...]
Here is the summary with links:
- [net-next] gve: Support IPv6 Big TCP on DQ
https://git.kernel.org/netdev/net-next/c/a695641c8eaa
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] 3+ messages in thread
end of thread, other threads:[~2023-05-24 4:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-22 20:15 [PATCH net-next] gve: Support IPv6 Big TCP on DQ Ziwei Xiao
2023-05-23 10:21 ` Simon Horman
2023-05-24 4:20 ` 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).