[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Allow controlling NAPI weight of virtual network interfaces (vif) with sysfs



On Fri, Mar 13, 2015 at 01:49:34PM +0100, Ronald Pina wrote:
> My main idea was to adapt the the function of static int
> change_weight(struct net_device *net, unsigned long new_weight) and
> static ssize_t store_weight(struct device *dev, struct
> device_attribute *attr, const char *buf, size_t len) which are present
> on kernel 2.6.21 . In this kernel we can change the weight of every
> interface because the weight parameter is inside the net_device
> structure. But on later kernel the weight was inserted on napi_struct
> and wasn't exposed for every interface. Thus now we can only change
> the default weight and every device use the same weight (of course if
> their drivers allow that).

This is the "core driver change" I referred to. They did that for a
reason and there is little thing I (as a netback maintainer) can do.

> This kind of organization is used in xen netback too, with weight 64.
> 
> If may ask , how can i change the weight for every individual
> interface (vif) or how can i adopt the sysfs to change the weight for
> every vif ?
> 

You either need to forward port all the core bits from 2.6.21 to 3.18
(which I don't recommend) or wire up things by hand, i.e. look for
examples one how to use sysfs interface and expose relevant bits by
hand.

In any case, if you want this feature appears in upstream kernel, you
need to talk to core network driver maintainers.

Wei.

> My goal is to allow  different vif to have different weight, for
> example vif1.0 to have a weight 32 ,and vif1.0 weight 64. I am using
> kernel 3.18
> 
> Thanks

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.