netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Habets <habetsm.xilinx@gmail.com>
To: "Íñigo Huguet" <ihuguet@redhat.com>
Cc: ecree.xilinx@gmail.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	Tianhao Zhao <tizhao@redhat.com>
Subject: Re: [PATCH net] sfc: correctly advertise tunneled IPv6 segmentation
Date: Thu, 26 Jan 2023 08:52:22 +0000	[thread overview]
Message-ID: <Y9I/RmuOPJeHJ8X1@gmail.com> (raw)
In-Reply-To: <20230125143513.25841-1-ihuguet@redhat.com>

On Wed, Jan 25, 2023 at 03:35:13PM +0100, Íñigo Huguet wrote:
> Recent sfc NICs are TSO capable for some tunnel protocols. However, it
> was not working properly because the feature was not advertised in
> hw_enc_features, but in hw_features only.
> 
> Setting up a GENEVE tunnel and using iperf3 to send IPv4 and IPv6 traffic
> to the tunnel show, with tcpdump, that the IPv4 packets still had ~64k
> size but the IPv6 ones had only ~1500 bytes (they had been segmented by
> software, not offloaded). With this patch segmentation is offloaded as
> expected and the traffic is correctly received at the other end.
> 
> Fixes: 24b2c3751aa3 ("sfc: advertise encapsulated offloads on EF10")
> Reported-by: Tianhao Zhao <tizhao@redhat.com>
> Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>

Acked-by: Martin Habets <habetsm.xilinx@gmail.com>

> ---
>  drivers/net/ethernet/sfc/efx.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
> index 0556542d7a6b..3a86f1213a05 100644
> --- a/drivers/net/ethernet/sfc/efx.c
> +++ b/drivers/net/ethernet/sfc/efx.c
> @@ -1003,8 +1003,11 @@ static int efx_pci_probe_post_io(struct efx_nic *efx)
>  	/* Determine netdevice features */
>  	net_dev->features |= (efx->type->offload_features | NETIF_F_SG |
>  			      NETIF_F_TSO | NETIF_F_RXCSUM | NETIF_F_RXALL);
> -	if (efx->type->offload_features & (NETIF_F_IPV6_CSUM | NETIF_F_HW_CSUM))
> +	if (efx->type->offload_features & (NETIF_F_IPV6_CSUM | NETIF_F_HW_CSUM)) {
>  		net_dev->features |= NETIF_F_TSO6;
> +		if (efx_has_cap(efx, TX_TSO_V2_ENCAP))
> +			net_dev->hw_enc_features |= NETIF_F_TSO6;
> +	}
>  	/* Check whether device supports TSO */
>  	if (!efx->type->tso_versions || !efx->type->tso_versions(efx))
>  		net_dev->features &= ~NETIF_F_ALL_TSO;
> -- 
> 2.34.3

  reply	other threads:[~2023-01-26  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 14:35 [PATCH net] sfc: correctly advertise tunneled IPv6 segmentation Íñigo Huguet
2023-01-26  8:52 ` Martin Habets [this message]
2023-01-28  8:40 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9I/RmuOPJeHJ8X1@gmail.com \
    --to=habetsm.xilinx@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=ihuguet@redhat.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tizhao@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).