netdev
[Top] [All Lists]

Re: patch - SNMP Kernel Counters

To: <kuznet@xxxxxxxxxxxxx>
Subject: Re: patch - SNMP Kernel Counters
From: Mark Price <mkprice@xxxxxxxxxx>
Date: Fri, 5 Oct 2001 11:05:06 -0700 (PDT)
Cc: <mkprice@xxxxxxxxxx>, <netdev@xxxxxxxxxxx>, <davem@xxxxxxxxxx>
In-reply-to: <200110051525.TAA20980@xxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
On Fri, 5 Oct 2001 kuznet@xxxxxxxxxxxxx wrote:

> > o Modified the way IpInDelivers is incremented.
>
> OK.
>
> Technically wrong though. Please try to invent some way to eliminate
> additional variable "aflg" in some way yet...

I'll rework it.

> Also:
>
> > +                   IP_INC_STATS_BH(IpInDiscards);
> >                     goto drop;
>
> It is pretty evident that increment must follow the label "drop". No?
> Well, this happens in several places.

The reason I did not increment this counter in the "drop:" label is that
the counter should not be incremented on all drops. The description of
IpInDiscards is:

    DESCRIPTION
            "The number of input IP datagrams for which no
            problems were encountered to prevent their
            continued processing, but which were discarded
            (e.g., for lack of buffer space).  Note that this
            counter does not include any datagrams discarded
            while awaiting re-assembly."

So I only increment in two places, once when skb_cow() fails, and once
when skb_share_check() fails.

Cheers, Mark.


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