[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinrW2w9x6dbzTAzSrElqUueFOC6tJaPNsVcnLBv@mail.gmail.com>
Date: Thu, 3 Jun 2010 16:57:24 +0800
From: Junchang Wang <junchangwang@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: sonic zhang <sonic.adi@...il.com>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
uclinux-dist-devel <uclinux-dist-devel@...ckfin.uclinux.org>
Subject: Re: [PATCH v2] netdev:bfin_mac: reclaim and free tx skb as soon as
possible after transfer
Hi Eric,
On Thu, Jun 3, 2010 at 12:05 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Not related to your patch, but reviewing it I see this driver still do
> the "dev->stats.tx_packets++; dev->stats.tx_bytes += (skb->len);"
>
> This is not necessary and expensive, since we update txq stats in core
> network stack.
>
> rc = ops->ndo_start_xmit(skb, dev);
> if (rc == NETDEV_TX_OK)
> txq_trans_update(txq); << here >>
>
Good suggestion for drivers. But I wonder whether there are stats for
received packets in core network stack.
I.e., can I replace "dev->stats.rx_packets++" and "dev->stats.rx_bytes
+= (skb->len);" with something already maintained by core stack? I
failed to find them.
Thanks.
--
--Junchang
--
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