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  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]
Date:	Thu, 28 Feb 2008 08:07:46 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	PJ Waskiewicz <peter.p.waskiewicz.jr@...el.com>
Cc:	davem@...emloft.net, stephen.hemminger@...tta.com,
	netdev@...r.kernel.org
Subject: Re: [PATCH] [NET 2.6.26]: Add per-connection option to set max TSO
	frame   size

On 27-02-2008 18:26, PJ Waskiewicz wrote:
...
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index a2f0032..3bf825b 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -620,6 +620,7 @@ struct net_device
>  
>  	/* Partially transmitted GSO packet. */
>  	struct sk_buff		*gso_skb;
> +	u16			max_gso_frame_size;
...
> +static inline void netif_set_max_gso_size(struct net_device *dev, u16 size)
> +	__u16			sk_gso_max_size;
>  	int			sk_rcvlowat;
>  	unsigned long 		sk_flags;
>  	unsigned long	        sk_lingertime;
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 908f07c..689a678 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -4021,6 +4021,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
>  	}
>  
>  	dev->egress_subqueue_count = queue_count;
> +	dev->max_gso_frame_size = 65536;

Does it fit into u16?

Isn't it "nicer" with some constant (#define MAX_GSO_FRAME_SIZE ...)?

Why not more consistent names, e.g.:
dev->gso_max_size;
sk_gso_max_size;
netif_set_gso_max_size()
(GSO_MAX_SIZE)
or
dev->max_gso_frame_size;
sk_max_gso_frame_size;
netif_set_max_gso_frame_size()
(MAX_GSO_FRAME_SIZE)
etc.?

Regards,
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists