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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220203083407.523721a9@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Thu, 3 Feb 2022 08:34:07 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Eric Dumazet <eric.dumazet@...il.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Coco Li <lixiaoyan@...gle.com>
Subject: Re: [PATCH net-next 01/15] net: add netdev->tso_ipv6_max_size
 attribute

On Wed,  2 Feb 2022 17:51:26 -0800 Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
> 
> Some NIC (or virtual devices) are LSOv2 compatible.
> 
> BIG TCP plans using the large LSOv2 feature for IPv6.
> 
> New netlink attribute IFLA_TSO_IPV6_MAX_SIZE is defined.
> 
> Drivers should use netif_set_tso_ipv6_max_size() to advertize their limit.
> 
> Unchanged drivers are not allowing big TSO packets to be sent.

Many drivers will have a limit on how many buffer descriptors they
can chain, not the size of the super frame, I'd think. Is that not
the case? We can't assume all pages but the first and last are full,
right?

> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index e490b84732d1654bf067b30f2bb0b0825f88dea9..b1f68df2b37bc4b623f61cc2c6f0c02ba2afbe02 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1948,6 +1948,7 @@ enum netdev_ml_priv_type {
>   *	@dev_addr_shadow:	Copy of @dev_addr to catch direct writes.
>   *	@linkwatch_dev_tracker:	refcount tracker used by linkwatch.
>   *	@watchdog_dev_tracker:	refcount tracker used by watchdog.
> + *	@tso_ipv6_max_size:	Maximum size of IPv6 TSO packets (driver/NIC limit)
>   *
>   *	FIXME: cleanup struct net_device such that network protocol info
>   *	moves out.
> @@ -2282,6 +2283,7 @@ struct net_device {
>  	u8 dev_addr_shadow[MAX_ADDR_LEN];
>  	netdevice_tracker	linkwatch_dev_tracker;
>  	netdevice_tracker	watchdog_dev_tracker;
> +	unsigned int		tso_ipv6_max_size;
>  };
>  #define to_net_dev(d) container_of(d, struct net_device, dev)
>  
> @@ -4818,6 +4820,14 @@ static inline void netif_set_gro_max_size(struct net_device *dev,
>  	WRITE_ONCE(dev->gro_max_size, size);
>  }
>  
> +/* Used by drivers to give their hardware/firmware limit for LSOv2 packets */
> +static inline void netif_set_tso_ipv6_max_size(struct net_device *dev,
> +					       unsigned int size)
> +{
> +	dev->tso_ipv6_max_size = size;
> +}
> +
> +

nit: double new line

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ