netdev
[Top] [All Lists]

Zeroing interface stats?

To: netdev@xxxxxxxxxxx, linux-net@xxxxxxxxxxxxxxxx
Subject: Zeroing interface stats?
From: Jeff Garzik <jgarzik@xxxxxxxxxxxxxxxx>
Date: Mon, 05 Mar 2001 20:20:04 -0500
Organization: MandrakeSoft
Sender: owner-netdev@xxxxxxxxxxx
Just spotted this code in acenic.c.  Should it be carried over to other
net drivers?

static int ace_open(struct net_device *dev)
{
[...]
        /*
         * Zero the stats when restarting the interface...
         */
        memset(&ap->stats, 0, sizeof(ap->stats));

-- 
Jeff Garzik       | "You see, in this world there's two kinds of
Building 1024     |  people, my friend: Those with loaded guns
MandrakeSoft      |  and those who dig. You dig."  --Blondie

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