From: Miroslav Lichvar <mlichvar@redhat.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
Richard Cochran <richardcochran@gmail.com>,
Willem de Bruijn <willemb@google.com>,
Soheil Hassas Yeganeh <soheil@google.com>,
"Keller, Jacob E" <jacob.e.keller@intel.com>,
Denny Page <dennypage@me.com>, Jiri Benc <jbenc@redhat.com>
Subject: Re: [PATCH v2 net-next 3/7] net: add function to retrieve original skb device using NAPI ID
Date: Tue, 16 May 2017 11:51:06 +0200 [thread overview]
Message-ID: <20170516095106.GC4156@localhost> (raw)
In-Reply-To: <CAF=yD-+n-KF3r1zDiKEQCQsPMkF_DxGZG3AEpzbX4jXFUXcW-Q@mail.gmail.com>
On Tue, May 02, 2017 at 12:16:13PM -0400, Willem de Bruijn wrote:
> On Tue, May 2, 2017 at 6:10 AM, Miroslav Lichvar <mlichvar@redhat.com> wrote:
> > /**
> > + * dev_get_by_napi_id - find a device by napi_id
> > + * @napi_id: ID of the NAPI struct
> > + *
> > + * Search for an interface by NAPI ID. Returns %NULL if the device
> > + * is not found or a pointer to the device. The device has not had
> > + * its reference counter increased so the caller must be careful
> > + * about locking. The caller must hold RCU lock.
>
> Instead of a comment, can check with
>
> WARN_ON_ONCE(!rcu_read_lock_held());
The other dev_get_* functions have the same comment, so I think it's
better to keep it for consistency. I'll add the warning and sent
a new series with the other changes you have suggested.
Thanks,
--
Miroslav Lichvar
next prev parent reply other threads:[~2017-05-16 9:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-02 10:10 [PATCH v2 net-next 0/7] Extend socket timestamping API Miroslav Lichvar
2017-05-02 10:10 ` [PATCH v2 net-next 1/7] net: define receive timestamp filter for NTP Miroslav Lichvar
2017-05-02 10:10 ` [PATCH v2 net-next 2/7] net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL Miroslav Lichvar
2017-05-02 10:10 ` [PATCH v2 net-next 3/7] net: add function to retrieve original skb device using NAPI ID Miroslav Lichvar
2017-05-02 16:16 ` Willem de Bruijn
2017-05-16 9:51 ` Miroslav Lichvar [this message]
2017-05-02 10:11 ` [PATCH v2 net-next 4/7] net: add new control message for incoming HW-timestamped packets Miroslav Lichvar
2017-05-02 16:01 ` Willem de Bruijn
2017-05-02 16:20 ` kbuild test robot
2017-05-02 10:11 ` [PATCH v2 net-next 5/7] net: don't make false software transmit timestamps Miroslav Lichvar
2017-05-02 10:11 ` [PATCH v2 net-next 6/7] net: allow simultaneous SW and HW transmit timestamping Miroslav Lichvar
2017-05-02 10:11 ` [PATCH v2 net-next 7/7] net: ethernet: update drivers to make both SW and HW TX timestamps Miroslav Lichvar
2017-05-02 12:55 ` [PATCH v2 net-next 0/7] Extend socket timestamping API Miroslav Lichvar
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=20170516095106.GC4156@localhost \
--to=mlichvar@redhat.com \
--cc=dennypage@me.com \
--cc=jacob.e.keller@intel.com \
--cc=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=soheil@google.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).