Subject: Re: [PATCH] Allow setting dev->weight using ip(8)

From: Eric Lemoine <[email-masked]>
Date: Mon, 30 Aug 2004 16:33:01 +0200

> > For my own testing purposes, I often need to modify dev->weight. So I
> > patched the kernel and iproute2 to be able to modify dev->weight using
> > ip(8). After all, one can modify tx_queue_len so why not weight?
> >
> > Two kernel patches attached: one using the ioctl framework and another
> > using the rtnetlink framework. Warning: the attached rtnetlink patch
> > is a superset of Thomas Graf's rtnetlink patch for setting mtu and
> > tx_queue_len.
> >
> > PS: both patches are against 2.6.5-rc3-ben0 but should apply to any 2.6.
 
> Looks sane.
> Not sure if you should encourage ioctl though ;->

iproute still uses ioctl at that time, doesn't it?

> Out of curiosity, what/when do you change weight? I think its valuable
> to do so, just curious.

With weight one can have the NIC fetch rx descriptors while the rx
interrupt remains disabled. This further means that under high input
load, one single rx interrupt can result in more than RX_RING_SIZE rx
packets polled. Using this + tx polling, I could observe a system
fully loaded by the network with no interrupts at all.

> missing user space/ip patch btw.

I attached a patch to iproute-2.6.8. To make the patch compile I had
to tinker with the Makefile - it seems that KERNEL_INCLUDE does no
longer serve any purpose, except for ATM maybe.

-- 
Eric