Subject: Re: [PATCH v2 03/13] net: ethernet: aquantia: Add ring support code

From: Stephen Hemminger <[email-masked]>
Date: Mon, 9 Jan 2017 22:34:41 -0800

On Mon,  9 Jan 2017 14:16:01 -0800
Alexander Loktionov <[email-masked]> wrote:

> 		++self->stats.rx_packets;
> +		++ndev->stats.rx_packets;
> +		ndev->stats.rx_bytes += buff->len;

Why keep two sets of statistics (self->stats and ndev->stats); seems redundant.
Could also use per-cpu network stats pcpu_sw_netstats

You could also optimize by doing only one addition of ndev->stats after processing
several packets.

> +		skb = netdev_alloc_skb(ndev, ETH_HLEN);
> +		skb_put(skb, ETH_HLEN);
> +		memcpy(skb->data, page_address(buff->page), ETH_HLEN);

Why not use build_skb() here?