[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240625083324.776057-1-chengcheng.luo@smartx.com>
Date: Tue, 25 Jun 2024 08:33:24 +0000
From: echken <chengcheng.luo@...rtx.com>
To: davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com
Cc: netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
echken <chengcheng.luo@...rtx.com>
Subject: [PATCH 2/2] Add UDP fragmentation features to Geneve devices
Since Geneve devices do not support any offloading features for UDP
fragmentation, large UDP packets sent through Geneve devices to the
kernel protocol stack are preemptively fragmented in the TX direction of
the Geneve device. The more computationally intensive encapsulation and
routing processes occur after fragmentation, which leads to a
significant increase in performance overhead in this scenario. By adding
GSO_UDP and GSO_UDP_L4 to Geneve devices, we can ensure a significant
reduction in the number of packets that undergo the computationally
expensive Geneve encapsulation and routing processes in this scenario,
thereby improving throughput performance.
Signed-off-by: echken <chengcheng.luo@...rtx.com>
---
drivers/net/geneve.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 838e85ddec67..dc0f5846b415 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1198,10 +1198,14 @@ static void geneve_setup(struct net_device *dev)
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST;
dev->features |= NETIF_F_RXCSUM;
dev->features |= NETIF_F_GSO_SOFTWARE;
+ dev->features |= NETIF_F_GSO_UDP;
+ dev->features |= NETIF_F_GSO_UDP_L4;
dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST;
dev->hw_features |= NETIF_F_RXCSUM;
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
+ dev->features |= NETIF_F_GSO_UDP;
+ dev->features |= NETIF_F_GSO_UDP_L4;
dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
/* MTU range: 68 - (something less than 65535) */
--
2.34.1
Powered by blists - more mailing lists