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 v3 8/8] geneve: break dependency to network drivers
Date: Fri, 8 Jan 2016 22:18:06 +0100 [thread overview]
Message-ID: <5690278E.5090903@stressinduktion.org> (raw)
In-Reply-To: <CAEh+42izmdn5hHBxQWfSQEduWE2OeY0puM-5DEU-iHTWYXdobQ@mail.gmail.com>
On 08.01.2016 22:12, Jesse Gross wrote:
> On Fri, Jan 8, 2016 at 12:47 PM, Hannes Frederic Sowa
> <hannes@stressinduktion.org> wrote:
>> On 07.01.2016 01:18, Jesse Gross wrote:
>>>
>>> I think we should merge vxlan_get_rx_port() and geneve_get_rx_port()
>>> into a single generic function. For drivers that support both, they
>>> now have two calls to get notified for all offloaded ports. This
>>> actually can cause problems related to duplicates, similar to what you
>>> feared before.
>>
>>
>> Checking out the ndo_add_vxlan_port callbacks, we cannot change how we
>> refresh the ports unfortunately. For some drivers it might be easy to
>> update, some look a little bit more complicated.
>>
>> I guess we should try to keep more complexity in the core and make sure we
>> only call those functions if necessary for the particular type of offload
>> than to replicate the logic in each driver.
>>
>> If you agree I prepare this series with the changes to have separate
>> callbacks, address your other feedback and send it out.
>
> I'm not sure that I totally understand, do you have an example of a
> problematic driver?
bnx2x e.g. does refcounting on the port. So when it will implement
geneve offloading, it will refcount the vxlan port multiple times with
the current schema. Currently this is safe, as bnx2x doesn't care about
geneve and thus no further callbacks will happen. But I fear drivers
being broken as soon as they implement geneve additionally with the
current schema.
> I think what I was proposing is fairly simple, so maybe I wasn't
> totally clear. Here's what I think we can do:
>
> In your most recent series, vxlan_get_rx_port() and
> geneve_get_rx_port() have the same implementation. I think we can
> merge them into a single function (i.e. udp_tunnel_get_rx_port()). For
> all of the drivers that only implement VXLAN offloads, this is just a
> 1:1 switch so there should be no functionality change. There's only
> one driver than currently implements both (i40e) and it calls both
> vxlan_get_rx_port() and geneve_get_rx_port() back to back. We can just
> collapse this into a single call and since that will trigger both
> offloads to refresh, the behavior should again be the same as we have.
I totally understood that. I am just fearing future additions of offload
while not updating the current vxlan offloading then as well.
My current series ATM implements just what you proposed.
> I do know that there are so drivers that try to do clever things as
> far as refcounting, etc. However, since the callbacks are the same as
> we did before, it shouldn't introduce any issues.
Agreed. I can push the series out now as you proposed and we have to
intercept all upcoming driver changes in regard to geneve offloading and
review them. :)
Bye,
Hannes
next prev parent reply other threads:[~2016-01-08 21:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-06 23:39 [PATCH net-next v3 0/8] net: break dependency of drivers on geneve and vxlan Hannes Frederic Sowa
2016-01-06 23:39 ` [PATCH net-next v3 1/8] qlcnic: protect qlcnic_82xx_io_slot_reset with rtnl lock Hannes Frederic Sowa
2016-01-06 23:39 ` [PATCH net-next v3 2/8] mlx4: add rtnl lock protection in mlx4_en_restart Hannes Frederic Sowa
2016-01-06 23:39 ` [PATCH net-next v3 3/8] ixgbe: add rtnl locking in service task around vxlan_get_rx_port Hannes Frederic Sowa
2016-01-06 23:39 ` [PATCH net-next v3 4/8] benet: add rtnl lock protection around be_open in be_resume Hannes Frederic Sowa
2016-01-06 23:39 ` [PATCH net-next v3 5/8] fm10k: add rtnl lock protection in fm10k_io_resume Hannes Frederic Sowa
2016-01-06 23:39 ` [PATCH net-next v3 6/8] netdev: add netdevice notifier type to trigger a reprogramming of offloads Hannes Frederic Sowa
2016-01-06 23:39 ` [PATCH net-next v3 7/8] vxlan: break dependency to network drivers Hannes Frederic Sowa
2016-01-06 23:39 ` [PATCH net-next v3 8/8] geneve: " Hannes Frederic Sowa
2016-01-07 0:18 ` Jesse Gross
2016-01-07 0:39 ` Hannes Frederic Sowa
2016-01-08 20:47 ` Hannes Frederic Sowa
2016-01-08 21:12 ` Jesse Gross
2016-01-08 21:18 ` Hannes Frederic Sowa [this message]
2016-01-09 0:38 ` Jesse Gross
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=5690278E.5090903@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).