lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 1 May 2022 08:14:17 +0900 From: Simon Horman <simon.horman@...igine.com> To: David Miller <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org> Cc: netdev@...r.kernel.org, oss-drivers@...igine.com, Fei Qin <fei.qin@...igine.com> Subject: Re: [PATCH net-next] nfp: support VxLAN inner TSO with GSO_PARTIAL offload On Sun, May 01, 2022 at 08:11:50AM +0900, Simon Horman wrote: > From: Fei Qin <fei.qin@...igine.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@...igine.com> > Signed-off-by: Yinjun Zhang <yinjun.zhang@...igine.com> > Signed-off-by: Louis Peens <louis.peens@...igine.com> > Signed-off-by: Simon Horman <simon.horman@...igine.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 >
Powered by blists - more mailing lists