[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C27F8246C663564A84BB7AB34397724218065B9852@IRVEXCHCCR01.corp.ad.broadcom.com>
Date: Mon, 30 Nov 2009 03:02:07 -0800
From: "Michael Chan" <mchan@...adcom.com>
To: "'Eric Dumazet'" <eric.dumazet@...il.com>
cc: "leitao@...ux.vnet.ibm.com" <leitao@...ux.vnet.ibm.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] bnx2: avoid flushing statistics when doing a MTU
change
Eric Dumazet wrote:
> Michael Chan a écrit :
> > Calling bnx2_get_stats() won't refresh the stats counters because
> > they are DMA'ed once a second. There's an I/O to immediately DMA
> > the counters:
> >
> > REG_WR(bp, BNX2_HC_COMMAND, bp->hc_cmd |
> > BNX2_HC_COMMAND_STATS_NOW);
> > REG_RD(bp, BNX2_HC_COMMAND);
> >
> > We then need to add some delay to wait for the DMA to complete.
>
> Yes, but if you dont call bnx2_get_stats() netdev->stats will contain
> possibly very old values.
>
> At least, calling it will give one no more than second error.
>
OK I see. We are also not saving the ethtool stats. So perhaps the
more complete solution is to save the entire statistics block before
reset.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists