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] [day] [month] [year] [list]
Message-ID: <CAG88wWYSriipeb41nKnoPTLLhLm9=GDf1EqS6gWxXchkqSPbwA@mail.gmail.com>
Date:	Wed, 16 Nov 2011 12:46:13 -0800
From:	David Decotigny <david.decotigny@...gle.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Ben Hutchings <bhutchings@...arflare.com>,
	Stephen Hemminger <shemminger@...tta.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Ian Campbell <ian.campbell@...rix.com>,
	Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
	Jiri Pirko <jpirko@...hat.com>, Joe Perches <joe@...ches.com>,
	Szymon Janc <szymon@...c.net.pl>,
	Richard Jones <rick.jones2@...com>,
	Ayaz Abdulla <AAbdulla@...dia.com>
Subject: Re: [PATCH net-next v5 07/10] forcedeth: implement ndo_get_stats64() API

Thanks to you all!

I have an implementation that's similar to sky2's. I will run the
usual set of tests and send the updated patch series here.

Regards,

--
David Decotigny



On Wed, Nov 16, 2011 at 12:32 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> Le mercredi 16 novembre 2011 à 19:32 +0000, Ben Hutchings a écrit :
>> On Wed, 2011-11-16 at 11:25 -0800, David Decotigny wrote:
>> > Thanks for your feedback on these concerns.
>> >
>> > On Wed, Nov 16, 2011 at 9:14 AM, Ben Hutchings
>> > <bhutchings@...arflare.com> wrote:
>> > > On Wed, 2011-11-16 at 08:55 -0800, Stephen Hemminger wrote:
>> > >> Or realize that the Tx side is single threaded by dev->xmit_lock already
>> > >> and the Rx side is single threaded by NAPI.
>> > >
>> > > Right.
>> >
>> > Yes, that's what I meant by "Each software stat field is updated by
>> > one single writer." in a previous email. However, I think that TX and
>> > RX paths are not always synchronized. So I'm afraid that if I'm using
>> > a single seqcount, I might run into trouble in the absence of a lock
>> > around each update.... and I'd really prefer to avoid such a lock. Are
>> > you suggesting I should use 2 independent seqcounts? One for RX path,
>> > the other for TX path, all this without a lock around writers?
>>
>> Yes, there should be 1 for each path.
>
> David, drivers/net/ethernet/marvell/sky2.c contains code like that
> (different syncpfor rx/tx)
>
> TX path:
>                        u64_stats_update_begin(&sky2->tx_stats.syncp);
>                        ++sky2->tx_stats.packets;
>                        sky2->tx_stats.bytes += skb->len;
>                        u64_stats_update_end(&sky2->tx_stats.syncp);
>
>
> RX path:
>
>        u64_stats_update_begin(&sky2->rx_stats.syncp);
>        sky2->rx_stats.packets += packets;
>        sky2->rx_stats.bytes += bytes;
>        u64_stats_update_end(&sky2->rx_stats.syncp);
>
>
>
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ