[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
Actually not, it was removed since the weight parameter was moved from the net_device structure to napi_struct. An older implementation of sysfs on kernel 2.6.21 was done this way: NETDEVICE_SHOW(weight, fmt_dec); static int change_weight(struct net_device *net, unsigned long new_weight) { net->weight = new_weight; return 0; } static ssize_t store_weight(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { return netdev_store(dev, attr, buf, len, change_weight); } static struct device_attribute net_class_attributes[] = { .......... .......... .... __ATTR(weight, S_IRUGO | S_IWUSR, show_weight, store_weight) But, now i that the weight is not anymore on net_device struct, I'm having problems referencing napi_struct. I want to use this kind of mechanism on kernel our updated kernels. The idea of bringing support back to control napi weight with sysfs is very attractive. Do you have any idea what must be changed to achieve this supplementary control? On Fri, Mar 13, 2015 at 12:30 PM, Wei Liu <wei.liu2@xxxxxxxxxx> wrote: > On Fri, Mar 13, 2015 at 12:11:51PM +0100, Ronald Pina wrote: >> Hello >> I am working to allow controlling napi weight of virtual interfaces on >> xen using sysfs. >> If may i ask, is it achievable since NAPI interface structure in >> current kernels is managed by the driver? >> > > I would say yes. Netback is just another kernel driver that uses NAPI as > far as kernel concerns. > > Actually I am wondering what you need to do to enable that. Shouldn't > the sysfs knob just show up? > > Wei. > >> Please, any help or idea is very appreciated. >> Best Regards >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@xxxxxxxxxxxxx >> http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |