Re: [PATCH 2/2] Add UDP fragmentation features to Geneve devices

From: Willem de Bruijn
Date: Tue Jun 25 2024 - 04:58:56 EST


echken wrote:
> 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@xxxxxxxxxx>
> ---
> 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;

UFO is long deprecated. Nothing new should advertise it.

> + dev->features |= NETIF_F_GSO_UDP_L4;

NETIF_F_GSO_UDP_L4 is included in NETIF_F_GSO_SOFTWARE.