lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170109223441.4cbca16a@xeon-e3>
Date:   Mon, 9 Jan 2017 22:34:41 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Alexander Loktionov <Alexander.Loktionov@...antia.com>
Cc:     netdev@...r.kernel.org, David VomLehn <vomlehn@...as.net>,
        Simon Edelhaus <Simon.Edelhaus@...antia.com>,
        Dmitrii Tarakanov <Dmitrii.Tarakanov@...antia.com>,
        Pavel Belous <Pavel.Belous@...antia.com>
Subject: Re: [PATCH v2 03/13] net: ethernet: aquantia: Add ring support code

On Mon,  9 Jan 2017 14:16:01 -0800
Alexander Loktionov <Alexander.Loktionov@...antia.com> 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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ