netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux IP stack on kernel 2.4.18
@ 2002-06-02  8:56 Rabeeh Khoury
  2002-06-02  9:39 ` Thomas 'Dent' Mirlacher
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Rabeeh Khoury @ 2002-06-02  8:56 UTC (permalink / raw)
  To: netdev

Hi All,

I'm using kernel 2.4.18 and developing an ethernet network interface driver.
I have two problems that if you may consult me how to solve them -

1.. How can I adjust the throttling parameter of the IP stack not to drop any packet ? Meantime the IP stack routes 55k packets/sec and all the other it just drops (I can see them by the result of netif_rx).
2.. Routing jumbo packets through IP stack - I send 9K packets in size and IP stack routes the packets but by sending 1K packets in size ! is this possible ? I tripple checked the device driver on receive and transmit and it's ok. Do you know what is the problem ?


Thank you alot,
Rabeeh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux IP stack on kernel 2.4.18
  2002-06-02  8:56 Linux IP stack on kernel 2.4.18 Rabeeh Khoury
@ 2002-06-02  9:39 ` Thomas 'Dent' Mirlacher
  2002-06-02 17:11   ` Rabeeh Khoury
  2002-06-03  8:40 ` Rabeeh Khoury
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Thomas 'Dent' Mirlacher @ 2002-06-02  9:39 UTC (permalink / raw)
  To: Rabeeh Khoury; +Cc: netdev

--snip/snip

> 2.. Routing jumbo packets through IP stack - I send 9K packets in size and IP stack routes the packets but by sending 1K packets in size ! is this possible ? I tripple checked the device driver on receive and transmit and it's ok. Do you know what is the problem ?

did you check you MTU?

	tm

-- 
in some way i do, and in some way i don't.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux IP stack on kernel 2.4.18
  2002-06-02  9:39 ` Thomas 'Dent' Mirlacher
@ 2002-06-02 17:11   ` Rabeeh Khoury
  0 siblings, 0 replies; 6+ messages in thread
From: Rabeeh Khoury @ 2002-06-02 17:11 UTC (permalink / raw)
  To: Thomas 'Dent' Mirlacher; +Cc: netdev



Thomas 'Dent' Mirlacher wrote:

>--snip/snip
>
>  
>
>>2.. Routing jumbo packets through IP stack - I send 9K packets in size and IP stack routes the packets but by sending 1K packets in size ! is this possible ? I tripple checked the device driver on receive and transmit and it's ok. Do you know what is the problem ?
>>    
>>
>
>did you check you MTU?
>
sh-2.04# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 64:41:40:12:12:31 
          inet addr:10.2.40.130  Bcast:10.2.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:9700  Metric:1
          RX packets:5668 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3280 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4787563 (4.5 Mb)  TX bytes:543741 (530.9 Kb)
          Interrupt:32

>
>	tm
>
>  
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux IP stack on kernel 2.4.18
  2002-06-02  8:56 Linux IP stack on kernel 2.4.18 Rabeeh Khoury
  2002-06-02  9:39 ` Thomas 'Dent' Mirlacher
@ 2002-06-03  8:40 ` Rabeeh Khoury
  2002-06-03  8:40 ` Rabeeh Khoury
  2002-06-03 15:25 ` Robert Olsson
  3 siblings, 0 replies; 6+ messages in thread
From: Rabeeh Khoury @ 2002-06-03  8:40 UTC (permalink / raw)
  To: Rabeeh Khoury; +Cc: netdev

I fixed the problems. I'm replying for the record of the mailing list.

Rabeeh Khoury wrote:

> Hi All,
>
> I'm using kernel 2.4.18 and developing an ethernet network interface 
> driver.
> I have two problems that if you may consult me how to solve them -
>
> 1.. How can I adjust the throttling parameter of the IP stack not to 
> drop any packet ? Meantime the IP stack routes 55k packets/sec and all 
> the other it just drops (I can see them by the result of netif_rx). 

echo 50000 > /proc/sys/net/core/netdev_max_backlog

This puts the throttling parameter of the IP stack to 50000, instead of 
300 which is the defaul in kernel 2.4.18 (the default is set in 
net/core/dev.c with the variable 'int netdev_max_backlog = 300;')

>
> 2.. Routing jumbo packets through IP stack - I send 9K packets in size 
> and IP stack routes the packets but by sending 1K packets in size ! is 
> this possible ? I tripple checked the device driver on receive and 
> transmit and it's ok. Do you know what is the problem ? 

The HW I'v used that generates jumbo packets has put a wrong 
total_length field in the IP header, which made IP stack remove a large 
chunck of the packet. The relevant code that removes the chunck is in 
net/ipv4/ip_input.c -

                /* Our transport medium may have padded the buffer out. 
Now we know it
                 * is IP we can trim to the true length of the frame.
                 * Note this now means skb->len holds ntohs(iph->tot_len).
                 */
                if (skb->len > len) {
                      __pskb_trim(skb, len);
                        if (skb->ip_summed == CHECKSUM_HW)
                                skb->ip_summed = CHECKSUM_NONE;
                }

>
>
>
> Thank you alot,
> Rabeeh
>
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Linux IP stack on kernel 2.4.18
  2002-06-02  8:56 Linux IP stack on kernel 2.4.18 Rabeeh Khoury
  2002-06-02  9:39 ` Thomas 'Dent' Mirlacher
  2002-06-03  8:40 ` Rabeeh Khoury
@ 2002-06-03  8:40 ` Rabeeh Khoury
  2002-06-03 15:25 ` Robert Olsson
  3 siblings, 0 replies; 6+ messages in thread
From: Rabeeh Khoury @ 2002-06-03  8:40 UTC (permalink / raw)
  To: Rabeeh Khoury; +Cc: netdev

I fixed the problems. I'm replying for the record of the mailing list.

Rabeeh Khoury wrote:

> Hi All,
>
> I'm using kernel 2.4.18 and developing an ethernet network interface 
> driver.
> I have two problems that if you may consult me how to solve them -
>
> 1.. How can I adjust the throttling parameter of the IP stack not to 
> drop any packet ? Meantime the IP stack routes 55k packets/sec and all 
> the other it just drops (I can see them by the result of netif_rx). 

echo 50000 > /proc/sys/net/core/netdev_max_backlog

This puts the throttling parameter of the IP stack to 50000, instead of 
300 which is the defaul in kernel 2.4.18 (the default is set in 
net/core/dev.c with the variable 'int netdev_max_backlog = 300;')

>
> 2.. Routing jumbo packets through IP stack - I send 9K packets in size 
> and IP stack routes the packets but by sending 1K packets in size ! is 
> this possible ? I tripple checked the device driver on receive and 
> transmit and it's ok. Do you know what is the problem ? 

The HW I'v used that generates jumbo packets has put a wrong 
total_length field in the IP header, which made IP stack remove a large 
chunck of the packet. The relevant code that removes the chunck is in 
net/ipv4/ip_input.c -

                /* Our transport medium may have padded the buffer out. 
Now we know it
                 * is IP we can trim to the true length of the frame.
                 * Note this now means skb->len holds ntohs(iph->tot_len).
                 */
                if (skb->len > len) {
                      __pskb_trim(skb, len);
                        if (skb->ip_summed == CHECKSUM_HW)
                                skb->ip_summed = CHECKSUM_NONE;
                }

>
>
>
> Thank you alot,
> Rabeeh
>
>
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Linux IP stack on kernel 2.4.18
  2002-06-02  8:56 Linux IP stack on kernel 2.4.18 Rabeeh Khoury
                   ` (2 preceding siblings ...)
  2002-06-03  8:40 ` Rabeeh Khoury
@ 2002-06-03 15:25 ` Robert Olsson
  3 siblings, 0 replies; 6+ messages in thread
From: Robert Olsson @ 2002-06-03 15:25 UTC (permalink / raw)
  To: Rabeeh Khoury; +Cc: netdev


Rabeeh Khoury writes:
 > 
 > 1.. How can I adjust the throttling parameter of the IP stack not to drop any packet ? Meantime the IP stack routes 55k packets/sec and all the other it just drops (I can see them by the result of netif_rx).

 Hello!

 There are no "throttling parameter" you have probably hit some of your 
 machine limits, bandwidth, CPU etc and 55 kpps can be decent. You didn't 
 mention your input rate, paket size or hardware.

 http://www.cyberus.ca/~hadi/usenix-paper.tgz

 Discusses related issues..


 Cheers.
						--ro

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-06-03 15:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-02  8:56 Linux IP stack on kernel 2.4.18 Rabeeh Khoury
2002-06-02  9:39 ` Thomas 'Dent' Mirlacher
2002-06-02 17:11   ` Rabeeh Khoury
2002-06-03  8:40 ` Rabeeh Khoury
2002-06-03  8:40 ` Rabeeh Khoury
2002-06-03 15:25 ` Robert Olsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).