netdev
[Top] [All Lists]

Re: V2.4 policy router operates faster/better than V2.6

To: netdev@xxxxxxxxxxx
Subject: Re: V2.4 policy router operates faster/better than V2.6
From: "Jeremy M. Guthrie" <jeremy.guthrie@xxxxxxxxxx>
Date: Fri, 7 Jan 2005 15:06:54 -0600
Cc: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>, Stephen Hemminger <shemminger@xxxxxxxx>
In-reply-to: <16862.62424.180929.680029@xxxxxxxxxxxx>
Organization: Berbee Information Networks
References: <200501031455.26980.jeremy.guthrie@xxxxxxxxxx> <200501071414.05126.jeremy.guthrie@xxxxxxxxxx> <16862.62424.180929.680029@xxxxxxxxxxxx>
Reply-to: jeremy.guthrie@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: KMail/1.7.2
On Friday 07 January 2005 02:40 pm, Robert Olsson wrote:
> Jeremy M. Guthrie writes:
>  > During a 60 second window the machine received 5,110,164 packets and
>  > dropped 20461 or roughly 0.4% packet loss.
>
>  Around 85 kpps. If you run rtstat we could a feeling how may slow-pathx
>  that are taken. 
I can't run rstat.  The rt_cache_stat file doesn't exist in /proc/net 
or /proc/net/stat in either V2.4 or V2.6.

>  Or save the /proc/net/stat/rt_cache before you 60 sec 
>  run.
lnstat isn't giving me anything other than zeros.  

entries  in_hit in_slow_tot in_no_route in_brd in_martian_dst in_martian_src  
out_hit out_slow_tot out_slow_mc  gc_total gc_ignored gc_goal_miss 
gc_dst_overflow in_hlist_search out_hlist_search
0000f91e  15b1ddab 0b69a32c 00000000 00000000 00001b0a 00001fbd 00000000  
00066f65 0000b943 00000000 087b80a1 0878e81a 00000256 00000000 ca08c77d 
0020e549
0000f91e  00005c59 0000b3ef 00000000 00000000 00000cf7 00000000 00000000  
0000000f 0000004c 00000002 00000fb9 00000fb5 00000000 00000000 0004e8d9 
000000b2

60 seconds......

entries  in_hit in_slow_tot in_no_route in_brd in_martian_dst in_martian_src  
out_hit out_slow_tot out_slow_mc  gc_total gc_ignored gc_goal_miss 
gc_dst_overflow in_hlist_search out_hlist_search
0000fb3e  15ff4696 0b6bbb65 00000000 00000000 00001b10 00001fc1 00000000  
00067111 0000b974 00000000 087d9903 087b0003 00000256 00000000 cb58b399 
0020ee79
0000fb3e  00005c5b 0000b40d 00000000 00000000 00000cf9 00000000 00000000  
0000000f 0000004c 00000002 00000fbb 00000fb7 00000000 00000000 0004e9ba 
000000b2



>  mpstat I don't trust in this context.
>
>  > It has been at 150dc67c for a while now.  So while I am dropping at the
>  > card, I am not dropping in the stack.
>
>  You use NAPI driver then...
>  Check if the patch below is in your e1000 driver.
>            --ro
The drivers should be built as NAPI.

Here is the snippet:
static int
e1000_clean(struct net_device *netdev, int *budget)
{
        struct e1000_adapter *adapter = netdev->priv;
        int work_to_do = min(*budget, netdev->quota);
        int tx_cleaned;
        int work_done = 0;

        if (!netif_carrier_ok(netdev))
                goto quit_polling;

        tx_cleaned = e1000_clean_tx_irq(adapter);
        e1000_clean_rx_irq(adapter, &work_done, work_to_do);

        *budget -= work_done;
        netdev->quota -= work_done;

        /* if no Rx and Tx cleanup work was done, exit the polling mode */
        if(!tx_cleaned || (work_done < work_to_do) ||
                                !netif_running(netdev)) {
quit_polling:   netif_rx_complete(netdev);
                e1000_irq_enable(adapter);
                return 0;
        }

        return (work_done >= work_to_do);
}



>
>  --- drivers/net/e1000/e1000_main.c.orig 2004-02-16 14:46:16.000000000
> +0100 +++ drivers/net/e1000/e1000_main.c 2004-02-16 15:45:05.000000000
> +0100 @@ -2161,19 +2161,21 @@
>   struct e1000_adapter *adapter = netdev->priv;
>   int work_to_do = min(*budget, netdev->quota);
>   int work_done = 0;
> -
> - e1000_clean_tx_irq(adapter);
> + static boolean_t tx_cleaned;
> +
> + tx_cleaned = e1000_clean_tx_irq(adapter);
>   e1000_clean_rx_irq(adapter, &work_done, work_to_do);
>
>   *budget -= work_done;
>   netdev->quota -= work_done;
>
> - if(work_done < work_to_do || !netif_running(netdev)) {
> + if( (!tx_cleaned && (work_done == 0)) || !netif_running(netdev)) {
>    netif_rx_complete(netdev);
>    e1000_irq_enable(adapter);
> +  return 0;
>   }
>
> - return (work_done >= work_to_do);
> +     return 1;
>  }
>  #endif

-- 

--------------------------------------------------
Jeremy M. Guthrie        jeremy.guthrie@xxxxxxxxxx
Senior Network Engineer        Phone: 608-298-1061
Berbee                           Fax: 608-288-3007
5520 Research Park Drive         NOC: 608-298-1102
Madison, WI 53711

Attachment: pgpa1O1RP8WbJ.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>