All of lore.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <gerlitz.or@gmail.com>
To: Alex Vesker <valex@mellanox.com>, Denis Drozdov <denisd@mellanox.com>
Cc: David Miller <davem@davemloft.net>,
	Doug Ledford <dledford@redhat.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Jason Gunthorpe <jgg@mellanox.com>,
	Don Dutile <ddutile@redhat.com>, Honggang Li <honli@redhat.com>,
	Noa Spanier <noas@mellanox.com>
Subject: Re: [PATCH v2 net 0/2] IB/ipoib: ip link support
Date: Mon, 7 May 2018 20:29:25 +0300	[thread overview]
Message-ID: <CAJ3xEMhzv-CW0XdENn9koScBcxrhXDqEd-Es8=b6edzmHCZrkQ@mail.gmail.com> (raw)
In-Reply-To: <20180118042549.GA11171@ziepe.ca>

On Thu, Jan 18, 2018 at 7:25 AM, Jason Gunthorpe <jgg@mellanox.com> wrote:
> On Mon, Jan 15, 2018 at 01:13:09PM -0500, David Miller wrote:
>> From: Denis Drozdov <denisd@mellanox.com>
>> Date: Tue,  9 Jan 2018 23:42:45 +0200
>>
>> > IP link was broken due to the changes in IPoIB for the rdma_netdev
>> > support after commit cd565b4b51e5
>> > ("IB/IPoIB: Support acceleration options callbacks").
>> >
>> > This patchset restores IPoIB pkey creation and removal using rtnetlink.
>> > The first patch introduces changes in the rtnetlink code in order to allow
>> > IPOIB allocate and free the netdevice.
>> >
>> > The second patch establishes appropriate rtnetlink callbacks for IPoIB
>> > device and restores IPoIB netlink support
>> >
>> > Changes since v1:
>> > - Fixed double free_netdev calls in ops->free_link in netdev_run_todo
>> > - Removed priv_size from ipoib_link_ops as not required anymore.
>>
>> Please fix your control flow so that the existing netlink op can do
>> the right thing.
>
> Okay. Since this bug has been outstanding in RDMA for so long, I've
> looked pretty carefully at this..
>
> This patch does go too far, but ipoib does appear to legitimately need
> something special here and no amount of 'control flow fixing' in ipoib
> will solve it.
>
> The fundamental issue is that ipoib no longer has a generic software
> netdev for the child interface. Instead the child interface is bound
> directly to one of several *full* hardware drivers. ie the child and
> the master are basically exactly the same HW dependent code.
>
> Since the child is a full hardware netdev, it has its own HW driven
> needs for priv_size, txqs, rxqs, etc. There is no 'one size fits all'
> value like for all the other software based newlink users. It depends
> on the HW device installed in the system (eg mlx4, mlx5, hfi1)
>
> The only problem with rtnl newlink is that it wants to use priv_size,
> txqs, and rxqs values from a singleton static global structure (eg
> ipoib_link_ops) which cannot know in advance which ipoib HW driver is
> in use by the specific parent the child is being created for.
>
> This is what needs to be fixed. ipoib simply needs to have
> parent-dependent inputs to the alloc_netdev_mqs in rtnl_create_link.
>
> The patch proposes
>
>   struct net_device *(*alloc_link)(struct net *src_net,
>                                    const char *dev_name,
>                                    struct nlattr *tb[]);
>
> To let ipoib allocate the netdev, and then obviosly figure out the
> right parameters internally.
>
> This patch also adds some free related stuff, but that seems to be
> going too far. ipoib can use the normal free paths. The above is all
> that is necessary.
>
> An alternative would be something like:
>
>   struct rtnl_alloc_params {
>        size_t priv_size;
>        int txqs;
>        int rxqs;
>   };
>   void (*get_alloc_parameters)(struct net_device *net,
>                                struct rtnl_alloc_params *parms);
>
> To let ipoib tell rtnl_create_link what parameters to use based on
> 'net' instead of taking them from the global singleton.
>
> Do you see another choice?
>
> Can you accept one of these options?
>
> Thanks,
> Jason
> (BTW, Doug & I are now co-maintaining RDMA, so I say the above with my
>  maintainer hat on. This is a serious userspace visible regression bug
>  on our side, and I really want to see it fixed.)


Guys,

This is broken upstream for a long time, and now in few distributions
that picked
the patches that introduce the breakage, what is the plan?

Or.

  reply	other threads:[~2018-05-07 17:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-31 11:16 [PATCH net 0/2] IB/ipoib: ip link support Denis Drozdov
     [not found] ` <1514718983-466-1-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-12-31 11:16   ` [PATCH net 1/2] rtnl: device allocation/free via rtnl_link_ops Denis Drozdov
     [not found]     ` <1514718983-466-2-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2018-01-01 22:43       ` [rtnl] b1585bdfb2: kernel_BUG_at_net/core/dev.c kernel test robot
2018-01-01 22:43         ` kernel test robot
2018-01-01 22:43         ` kernel test robot
2018-01-09 21:42         ` [PATCH v2 net 0/2] IB/ipoib: ip link support Denis Drozdov
     [not found]           ` <1515534167-13062-1-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2018-01-09 21:42             ` [PATCH v2 net 1/2] rtnl: device allocation/free via rtnl_link_ops Denis Drozdov
2018-01-09 21:42           ` [PATCH v2 net 2/2] IB/ipoib: Fix netlink support in IPoIB Denis Drozdov
2018-01-15 18:13           ` [PATCH v2 net 0/2] IB/ipoib: ip link support David Miller
     [not found]             ` <20180115.131309.1163036253579166139.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2018-01-18  4:25               ` Jason Gunthorpe
2018-05-07 17:29                 ` Or Gerlitz [this message]
2017-12-31 12:28   ` [PATCH " Or Gerlitz
     [not found]     ` <CAJ3xEMiVHc=E7=uKJ4cRRRDxjNDRKQ17=NxnYsEeXNe6-RUvvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-02  7:29       ` Or Gerlitz
2018-01-02  8:44         ` Erez Shitrit
2018-01-02  9:15           ` Or Gerlitz
2017-12-31 11:16 ` [PATCH net 2/2] IB/ipoib: Fix netlink support in IPoIB Denis Drozdov
     [not found]   ` <1514718983-466-3-git-send-email-denisd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-12-31 20:23     ` Jason Gunthorpe
     [not found]       ` <20171231202308.GA10145-uk2M96/98Pc@public.gmane.org>
2018-01-01  6:38         ` Leon Romanovsky

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='CAJ3xEMhzv-CW0XdENn9koScBcxrhXDqEd-Es8=b6edzmHCZrkQ@mail.gmail.com' \
    --to=gerlitz.or@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ddutile@redhat.com \
    --cc=denisd@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=honli@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=noas@mellanox.com \
    --cc=valex@mellanox.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.