From: Li RongQing <roy.qing.li@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: Pravin Shelar <pshelar@nicira.com>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH][net-next] openvswitch: change the data type of error status to atomic_long_t
Date: Mon, 8 Sep 2014 19:23:11 +0800 [thread overview]
Message-ID: <CAJFZqHzeCCRJgrx5dTuLBMtfNf4QKkxU77PJXNXWuYcoBFuZWw@mail.gmail.com> (raw)
In-Reply-To: <20140907.161720.168413856991894569.davem@davemloft.net>
On Mon, Sep 8, 2014 at 7:17 AM, David Miller <davem@davemloft.net> wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
> Date: Sun, 7 Sep 2014 17:24:11 +0800
>
>> 2. I did not find that tx_dropped/tx_error/.. is protected by spin
>> lock under net dir,
>> sometime tx_dropped is atomic_long_t; sometime it is percpu variable;
>> sometime it is
>> u64,but does not need to protect.
>
> If it is only modified in ->ndo_start_xmit() then it is protected by
> the per-queue TX lock, as ->ndo_start_xmit() is always invoked with
> it held (except in LLTX drivers of course).
But reading tx_dropped is in process context, and maybe break by interrupt or
soft interrupt, and no lock protect, or not the same lock protect.
-Roy
next prev parent reply other threads:[~2014-09-08 11:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-06 11:06 [PATCH][net-next] openvswitch: change the data type of error status to atomic_long_t roy.qing.li
2014-09-07 3:44 ` Pravin Shelar
2014-09-07 9:24 ` Li RongQing
2014-09-07 23:17 ` David Miller
2014-09-08 11:23 ` Li RongQing [this message]
2014-09-08 22:21 ` Cong Wang
2014-09-08 22:26 ` Pravin Shelar
2014-09-09 0:29 ` Li RongQing
2014-09-09 18:47 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJFZqHzeCCRJgrx5dTuLBMtfNf4QKkxU77PJXNXWuYcoBFuZWw@mail.gmail.com \
--to=roy.qing.li@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.