[Click] Re: Help needed in compiling e1000 driver in Linux kernel 2.4.26

Eddie Kohler kohler at CS.UCLA.EDU
Wed Feb 16 13:11:29 EST 2005


Hi Alastair,

The new arguments to netif_receive_skb are to support Click's ToHostSniffers 
element, which sends packets only to local tcpdumps.  It calls 
netif_receive_skb() but passes a crap value for the protocol, so that Linux's 
protocol lookup (which would otherwise send packets to IP or whatever) fails.

We patched (and exported) the internal netif_receive_skb() long ago.  Then as of 
recent 2.4s, Linux itself started exporting and using netif_receive_skb(), and 
we were lame about updating Linux's uses.  Should be fixed now.

Eddie


Alastair McKinley wrote:
> Hi,
> 
> I am no expert on how the click patches work but i had the same problem 
> with the broadcom 4400 driver.
> The patches change the prototype of netif_receive_skb() and it must be 
> called with 3 arguments.
> 
> Change the line:
> 
> netif_receive_skb(skb);
> 
> to:
> 
> netif_receive_skb(skb, skb->protocol, 0);
> 
> And I think that should fix it!
> Would anyone have the time to explain what this change does?
> On a side note, is there any documentation on the click patches anywhere?
> 
> Best Regards,
> 
> Alastair
> 
> 
> On Mon Feb 14 21:13:16 Indian Mogul wrote
> 
>>    Hi,
>>    I am compiling a fresh kernel (2.4.26) from
>>    kernel.org. Pure, vanilla kernel. Then, I patched with
>>    click linux-2.4.26-patch. Now, when, I do "make
>>    modules",
>>    I recv the following errors:
>>
>>    e1000_main.c: In function `e1000_clean_rx_irq':
>>    e1000_main.c:2351: error: too few arguments to
>>    function `netif_receive_skb_R8b25dba2'
>>    make[3]: *** [e1000_main.o] Error 1
>>    make[3]: Leaving directory
>>    `/usr/src/linux-2.4.26/drivers/net/e1000'
>>    make[2]: *** [_modsubdir_e1000] Error 2
>>    make[2]: Leaving directory
>>    `/usr/src/linux-2.4.26/drivers/net'
>>    make[1]: *** [_modsubdir_net] Error 2
>>    `/usr/src/linux-2.4.26/drivers'
>>
>>    Any idea why netif_receive_skb is going all crazy?
>>
>>    Thanks in advance,
>>    -IM- 
> 
> 
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list