From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Jesse Gross <jesse@kernel.org>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/2] geneve: break dependency to network drivers
Date: Wed, 6 Jan 2016 22:18:19 +0100 [thread overview]
Message-ID: <568D849B.80607@stressinduktion.org> (raw)
In-Reply-To: <CAEh+42gOhXgB=M-nxQcGN6yGwnk3vwFEOwkAKdfE3vpLQ=LZ5w@mail.gmail.com>
On 06.01.2016 22:01, Jesse Gross wrote:
> On Wed, Jan 6, 2016 at 12:25 PM, Hannes Frederic Sowa
> <hannes@stressinduktion.org> wrote:
>> The refreshes from each module are completely synchronous and don't get
>> interleaved, so as long as the driver is correctly handling the locking
>> internally rtnl lock shouldn't be needed. But as I don't know too much about
>> driver developing I can revisit this.
>>
>> As a advantage I see that the driver developers don't need to worry about
>> the rtnl lock at all when adding new events. Is this realistic?
>
> I don't think that there is much savings to be had by avoiding RTNL
> since the majority of interactions that the driver has with the stack
> involve holding it anyways.
>
> In order to do this safely without RTNL we need to have a lock in each
> driver. I don't think that this is safely handled in all cases today
> and is likely to get worse in the future. I also noticed that Geneve
> actually doesn't hold any special lock while calling into drivers from
> geneve_get_rx_port() so it is de-facto relying on RTNL. All other
> operations in the Geneve driver are protected by RTNL currently, so we
> would need to introduce a new lock to handle this as well. In effect,
> it seems like people are implicitly assuming that these operations are
> covered by RTNL since most similar things are.
Okay, on top of the v1 version I will check all drivers and add
necessary rtnl_locks. Hopefully it works out and I don't have to defer
calls into working queues in the drivers first.
Thanks,
Hannes
prev parent reply other threads:[~2016-01-06 21:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 15:41 [PATCH net-next 0/2] net: break dependency of drivers on geneve and vxlan Hannes Frederic Sowa
2016-01-06 15:41 ` [PATCH net-next 1/2] vxlan: break dependency to network drivers Hannes Frederic Sowa
2016-01-06 15:41 ` [PATCH net-next 2/2] geneve: " Hannes Frederic Sowa
2016-01-06 18:00 ` Jesse Gross
2016-01-06 18:48 ` Hannes Frederic Sowa
2016-01-06 19:52 ` Jesse Gross
2016-01-06 20:25 ` Hannes Frederic Sowa
2016-01-06 21:01 ` Jesse Gross
2016-01-06 21:18 ` Hannes Frederic Sowa [this message]
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=568D849B.80607@stressinduktion.org \
--to=hannes@stressinduktion.org \
--cc=jesse@kernel.org \
--cc=netdev@vger.kernel.org \
/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).