Thread (18 messages) flat view 18 messages, 4 authors, 2017-01-11

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

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2017-01-10 06:34:49

On Mon,  9 Jan 2017 14:16:01 -0800
Alexander Loktionov [off-list ref] 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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help