hi all,
here's what i do (from /etc/rc.d/rc.inet1) :

ifconfig lo blah blah blah

ifconfig eth0 blah blah blah
shapecfg attach shaper0 eth0
shapecfg speed shaper0 9600
route add -net blah blah blah shaper0

ifconfig eth1 blah blah blah

ifconfig eth2 blah blah blah  -  so far so good. and now
shapecfg attach shaper1 eth2  -  the result is

shaper: no such device

i load the shaper module in rc.S :
insmod shaper
Traffic Shaper 0.05 for Linux 2.0 <[EMAIL PROTECTED]>
Traffic shaper initialised.

i use slackware based linux with kernel 2.0.36, modules 2.0.0.
the ethernets:
eth0: PCI NE2000 found at 0xd400, irq 9, 00:60:52:08:36:61
eth1: DE450-CA at 0xd000 (PCI bus 0, device 11), h/w address
        00:00:f8:30:cd:b3, and requires irq 5 (provided by PCI BIOS)
eth2: 3c509 at 0x300 tag 1, BNC port, address 00 a0 24 05 73 fa, irq 10

my guess is that the device shaper1 was not registered during module
init... or the idea is to register the device at some later time, through 
the action of shapecfg program ?

i've looked through shaper.c (don't know much about C but i'm willing
to learn) and realized that (correct me if i'm wrong alan :) the device
registration procedure is different in both cases - the code is compiled
into the kernel, or as module. if it's compiled in, then shaper0, 1, 2 and
3 are unconditionally registered at boot time :

void shaper_init(void)
{
        register_netdev(&dev_sh0);
        ...
        register_netdev(&dev_sh3);
}

otherwise only shaper0 device is registered at module init :

int init_module(void)
{
        int i;
        for(i=0;i<99;i++)
        {
                sprintf(devicename,"shaper%d",i);
                if(dev_get(devicename)==NULL)
                        break;
        }
        ...
        if (register_netdev(&dev_shape) != 0)
                return -EIO;
        printk("Traffic shaper initialised.\n");
        return 0;
}

now, does that mean that the problem wouldn't show up if the shaper was
compiled in the kernel? but shaper.txt says that it must be a module in
order to work... why?

what am i doing wrong? please somebody explain.


-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to