netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: David Miller <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, oss-drivers@corigine.com,
	Fei Qin <fei.qin@corigine.com>
Subject: Re: [PATCH net-next] nfp: support VxLAN inner TSO with GSO_PARTIAL offload
Date: Sun, 1 May 2022 08:14:17 +0900	[thread overview]
Message-ID: <Ym3Cyeksw3c14yrn@corigine.com> (raw)
In-Reply-To: <20220430231150.175270-1-simon.horman@corigine.com>

On Sun, May 01, 2022 at 08:11:50AM +0900, Simon Horman wrote:
> From: Fei Qin <fei.qin@corigine.com>
> 
> VxLAN belongs to UDP-based encapsulation protocol. Inner TSO for VxLAN
> packet with udpcsum requires offloading of outer header csum.
> 
> The device doesn't support outer header csum offload. However, inner TSO
> for VxLAN with udpcsum can still work with GSO_PARTIAL offload, which
> means outer udp csum computed by stack and inner tcp segmentation finished
> by hardware. Thus, the patch enable features "NETIF_F_GSO_UDP_TUNNEL_CSUM"
> and "NETIF_F_GSO_PARTIAL" and set gso_partial_features.
> 
> Signed-off-by: Fei Qin <fei.qin@corigine.com>
> Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
> Signed-off-by: Louis Peens <louis.peens@corigine.com>
> Signed-off-by: Simon Horman <simon.horman@corigine.com>

Sorry, missed the annotation in the subject for some reason.
This is targeted at net-next.

> ---
>  drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> index b412670d89b2..5528d12d1f48 100644
> --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> @@ -2259,8 +2259,12 @@ static void nfp_net_netdev_init(struct nfp_net *nn)
>  	if (nn->cap & NFP_NET_CFG_CTRL_RSS_ANY)
>  		netdev->hw_features |= NETIF_F_RXHASH;
>  	if (nn->cap & NFP_NET_CFG_CTRL_VXLAN) {
> -		if (nn->cap & NFP_NET_CFG_CTRL_LSO)
> -			netdev->hw_features |= NETIF_F_GSO_UDP_TUNNEL;
> +		if (nn->cap & NFP_NET_CFG_CTRL_LSO) {
> +			netdev->hw_features |= NETIF_F_GSO_UDP_TUNNEL |
> +					       NETIF_F_GSO_UDP_TUNNEL_CSUM |
> +					       NETIF_F_GSO_PARTIAL;
> +			netdev->gso_partial_features = NETIF_F_GSO_UDP_TUNNEL_CSUM;
> +		}
>  		netdev->udp_tunnel_nic_info = &nfp_udp_tunnels;
>  		nn->dp.ctrl |= NFP_NET_CFG_CTRL_VXLAN;
>  	}
> -- 
> 2.30.2
> 

  reply	other threads:[~2022-04-30 23:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-30 23:11 [PATCH] nfp: support VxLAN inner TSO with GSO_PARTIAL offload Simon Horman
2022-04-30 23:14 ` Simon Horman [this message]
2022-05-02 11:10 ` 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=Ym3Cyeksw3c14yrn@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=davem@davemloft.net \
    --cc=fei.qin@corigine.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@corigine.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).