Thread (10 messages) 10 messages, 3 authors, 2009-11-30

Re: [PATCH] bnx2: avoid flushing statistics when doing a MTU change

From: Eric Dumazet <hidden>
Date: 2009-11-30 13:32:54

Breno Leitao a écrit :
  	if (netif_running(bp->dev)) {
 		bnx2_netif_stop(bp);
+
+		/* Save statistics that is going to be reseted */
+		REG_WR(bp, BNX2_HC_COMMAND, bp->hc_cmd |
+				BNX2_HC_COMMAND_STATS_NOW);
+		REG_RD(bp, BNX2_HC_COMMAND);
+		udelay(5);
I see nothing in the driver/patch that will consolidate bp->dev->stats 
before your memcpy(). DMA transfert doesnt touch bp->dev->stats.

Please take a look at bnx2_get_stats()
+		memcpy(&bp->stats_extra, &bp->dev->stats,
+			sizeof(struct net_device_stats));
+
 		bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help