[Devel] Re: [PATCH] Virtual ethernet device (v2.1)

Evgeniy Polyakov johnpol at 2ka.mipt.ru
Wed Jul 11 02:44:30 PDT 2007


Hi.

On Wed, Jul 11, 2007 at 01:31:15PM +0400, Pavel Emelianov (xemul at openvz.org) wrote:
> Veth stands for Virtual ETHernet. It is a simple tunnel driver
> that works at the link layer and looks like a pair of ethernet
> devices interconnected with each other.
> 
> Mainly it allows to communicate between network namespaces but
> it can be used as is as well.

I have minor comment about flags used in veth. It looks like you only
set LLTX bit, but check for other flags in the code, so why not to
include another performance features?

> +static void veth_setup(struct net_device *dev)
> +{
> +	ether_setup(dev);
> +
> +	dev->hard_start_xmit = veth_xmit;
> +	dev->get_stats = veth_get_stats;
> +	dev->open = veth_open;
> +	dev->stop = veth_close;
> +	dev->ethtool_ops = &veth_ethtool_ops;
> +	dev->features |= NETIF_F_LLTX;
> +	dev->init = veth_dev_init;
> +	dev->destructor = veth_dev_free;
> +	netif_carrier_off(dev);
> +}

Don't you want to include NETIF_F_SG, NETIF_F_NO_CSUM, NETIF_F_FRAGLIST,
NETIF_F_HIGHDMA and probably TSO fancy flags also to reduce cpu usage more?

-- 
	Evgeniy Polyakov




More information about the Devel mailing list