linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Cong Wang <cwang@twopensource.com>
Cc: Calvin Owens <calvinowens@fb.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	David Miller <davem@davemloft.net>,
	Shrijeet Mukherjee <shm@cumulusnetworks.com>,
	izumi.taku@jp.fujitsu.com, John Linville <linville@tuxdriver.com>,
	David Ahern <dsa@cumulusnetworks.com>,
	netdev <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kernel-team <kernel-team@fb.com>
Subject: Re: [PATCH] netconsole: Initialize after all core networking drivers
Date: Tue, 29 Dec 2015 14:59:49 +0100	[thread overview]
Message-ID: <568291D5.9050008@stressinduktion.org> (raw)
In-Reply-To: <CAHA+R7OspurUF_tj2v59gpmG+CGHxnUMjV-6b2MHtFw4ie14xQ@mail.gmail.com>

On 29.12.2015 00:21, Cong Wang wrote:
> On Thu, Dec 24, 2015 at 2:25 AM, Hannes Frederic Sowa
> <hannes@stressinduktion.org> wrote:
>> Hi,
>>
>> On 24.12.2015 00:03, Calvin Owens wrote:
>>> This patch addresses the issue cited in 7332a13b038be05c by making vxlan
>>> actually check if ipv6 is loaded, and reverts it to module_init() so
>>> that it becomes device_initcall() when built-in, eliminating the
>>> netconsole issue.
>>>
>>> The ipv6 module is permanent, so there's no need to actually do the
>>> usual module_get/module_put dance: once we find it loaded, we can just
>>> assume that it always will be.
>>>
>>> AFAICS, nothing actually ends up calling vxlan_open() during initcalls,
>>> so in the (IPV6=y && VXLAN=y) case we can't end up there before ipv6 has
>>> initialized.
>>>
>>> Signed-off-by: Calvin Owens <calvinowens@fb.com>
>>
>> This architecture just sucks. :(
>>
>>
>> ixgbe should not have to call into vxlan but vxlan has to call to ixgbe.
>> Thus the vxlan_get_rx_port is absolutely unnecessary and should be
>> removed. This also lets ixgbe depend on vxlan which is absurd.
>>
>> Simply let vxlan_get_rx_port be called from vxlan_notifier_block on
>> NETDEV_REGISTER or NETDEV_UP events, which is already available.
>>
>> For the second vxlan_get_rx_port case, which is a
>> IXGBE_FLAG2_VXLAN_REREG_NEEDED needed event, I would suggest we also
>> push that over to the vxlan_notifier_block, maybe with a new event type
>> for the notifiers.
>>
>> After this change ixgbe would not depend on vxlan module any more.
>>
>
> Agreed with this direction, but not yet convinced with this approach.
>
> My feeling is that we should move this piece of code into core
> networking, so that both vxlan and ixgbe driver can call it without
> worrying about the dependencies. It looks like all we need here
> is a per-netns structure about family and ports for all vxlans.
> But I could overlook something here.

We actually have that already in terms of net_generic(vxlan_net_id). We 
will also need that for geneve and other offloads supported by hardware.

Your approach seems to be basically the same like mine, just in your 
proposal the driver calls to all the helper functions, while in my 
proposal the vxlan/geneve and other layers can update the offload 
settings on the hardware.

As the notifier_blocks are already available and registered, why not 
just use them?

Thanks,
Hannes


  reply	other threads:[~2015-12-29 13:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 23:52 [PATCH] netconsole: Initialize after all core networking drivers Calvin Owens
2015-12-18  1:08 ` Eric Dumazet
2015-12-18  1:46   ` Calvin Owens
2015-12-23 23:03     ` Calvin Owens
2015-12-24  6:54       ` [PATCH] vxlan: Properly depend on ipv6 and revert to module_init() kbuild test robot
2015-12-24 10:25       ` [PATCH] netconsole: Initialize after all core networking drivers Hannes Frederic Sowa
2015-12-28 23:21         ` Cong Wang
2015-12-29 13:59           ` Hannes Frederic Sowa [this message]
2015-12-28 23:24       ` Cong Wang
2015-12-18  1:10 ` Stephen Hemminger
2015-12-18  1:39   ` Calvin Owens

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=568291D5.9050008@stressinduktion.org \
    --to=hannes@stressinduktion.org \
    --cc=calvinowens@fb.com \
    --cc=cwang@twopensource.com \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=eric.dumazet@gmail.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=shm@cumulusnetworks.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).