From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Leon Romanovsky <leonro@mellanox.com>
Cc: Erez Shitrit <erezsh@dev.mellanox.co.il>,
"Vishwanathapura,
Niranjana" <niranjana.vishwanathapura@intel.com>,
Erez Shitrit <erezsh@mellanox.com>,
Doug Ledford <dledford@redhat.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
netdev@vger.kernel.org, valex@mellanox.com, saedm@mellanox.com
Subject: Re: [RFC v1 for accelerated IPoIB 05/25] IB/ipoib: Support ipoib acceleration options callbacks
Date: Wed, 15 Mar 2017 09:58:02 -0600 [thread overview]
Message-ID: <20170315155802.GB29562@obsidianresearch.com> (raw)
In-Reply-To: <20170315064751.GD2079@mtr-leonro.local>
On Wed, Mar 15, 2017 at 08:47:51AM +0200, Leon Romanovsky wrote:
> On Tue, Mar 14, 2017 at 10:00:21AM -0600, Jason Gunthorpe wrote:
> > On Tue, Mar 14, 2017 at 04:42:55PM +0200, Erez Shitrit wrote:
> > > >> + if (!hca->alloc_rdma_netdev)
> > > >> + dev = ipoib_create_netdev_default(hca, name,
> > > >> ipoib_setup_common);
> > > >> + else
> > > >> + dev = hca->alloc_rdma_netdev(hca, port, RDMA_NETDEV_IPOIB,
> > > >> + name, NET_NAME_UNKNOWN,
> > > >> + ipoib_setup_common);
> > > >> + if (!dev) {
> > > >> + kfree(priv);
> > > >> + return NULL;
> > > >> + }
> > > >
> > > >
> > > > This will break ipoib on hfi1 as hfi1 will define alloc_rdma_netdev for
> > > > OPA_VNIC type. We should probably look for a dedicated return type
> > > > (-ENODEV?) to determine of the driver supports specified rdma netdev type.
> > > > Or use a ib device attribute to suggest driver support ipoib rdma netdev.
> > >
> > > sorry, I don't understand that, we are in ipoib driver, so the type is
> > > RDMA_NETDEV_IPOIB, if hfi wants to implement it should use the same
> > > flag, and to use OPA_VNIC for vnic.
> >
> > He means it should look like this:
> >
> > if (hca->alloc_rdma_netdev)
> > dev = hca->alloc_rdma_netdev(hca, port, RDMA_NETDEV_IPOIB,
> > name, NET_NAME_UNKNOWN,
> > ipoib_setup_common);
> >
> > if (IS_ERR(dev) && PTR_ERR(dev) != ENOTSUP)
> > goto out;
> >
> > dev = ipoib_create_netdev_default(hca, name, ipoib_setup_common);
> > if (IS_ERR(dev))
> > goto out;
> >
> > WARN_ON(dev == NULL);
> >
> > [...]
> >
> > out:
> > return PTR_ERR(dev);
> >
> > And I'm confused why 'ipoib_create_netdev_default' doesn't need the
> > same function signature as hca->alloc_rdma_netdev
>
> And now, I'm confused.
> In your's proposal, the "dev" will be overwritten, in Erez's proposal,
> "dev" will be one of two: defaults or device specific.
Well, not Erez's version allowed dev to be ERR_PTR too. More like this then
struct rdma_netdev *get_netdev(..)
{
if (hca-alloc_rdma_netdev) {
dev = hca-alloc_rdma_netdev(hca, port, RDMA_NETDEV_IPOIB,
name, NET_NAME_UNKNOWN,
ipoib_setup_common);
if (!IS_ERR(dev) || PTR_ERR(dev) != ENOTSUP)
return dev;
}
return ipoib_create_netdev_default(hca, name, ipoib_setup_common);
}
Jason
next prev parent reply other threads:[~2017-03-15 15:58 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 18:31 [RFC v1 for accelerated IPoIB 00/25] Enhanced mode for IPoIB driver Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 01/25] IB/ipoib: Separate control and data related initializations Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 02/25] IB/ipoib: separate control from HW operation on ipoib_open/stop ndo Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 03/25] IB/ipoib: Rename qpn to dqpn in ipoib_send and post_send functions Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 04/25] IB/verb: Add ipoib_options struct and API Erez Shitrit
[not found] ` <1489429896-10781-5-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-03-13 20:01 ` Jason Gunthorpe
2017-03-14 7:01 ` Vishwanathapura, Niranjana
2017-03-14 13:25 ` Erez Shitrit
2017-03-14 16:11 ` Jason Gunthorpe
[not found] ` <20170314161149.GA15752-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-15 6:30 ` Leon Romanovsky
[not found] ` <20170315063043.GC2079-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-03-15 16:40 ` Vishwanathapura, Niranjana
2017-03-16 15:17 ` Erez Shitrit
2017-03-16 16:04 ` Jason Gunthorpe
2017-03-14 6:44 ` Vishwanathapura, Niranjana
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 05/25] IB/ipoib: Support ipoib acceleration options callbacks Erez Shitrit
2017-03-13 20:10 ` Jason Gunthorpe
[not found] ` <1489429896-10781-6-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-03-14 6:35 ` Vishwanathapura, Niranjana
[not found] ` <20170314063538.GB79937-wPcXA7LoDC+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-03-14 14:42 ` Erez Shitrit
2017-03-14 16:00 ` Jason Gunthorpe
[not found] ` <20170314160021.GD3244-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-15 6:47 ` Leon Romanovsky
2017-03-15 15:58 ` Jason Gunthorpe [this message]
[not found] ` <20170315155802.GB29562-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-15 17:39 ` Leon Romanovsky
2017-03-14 15:44 ` Jason Gunthorpe
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 06/25] hw/mlx5: Add New bit to check over QP creation Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 07/25] linux/mlx5/mlx5_ifc.h: Add underlay_qpn field to PRM objects Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 08/25] net/mlx5e: Refactor EN code to support IB link Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 10/25] net/mlx5e: Support netdevice creation for IB link type Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 14/25] net/mlx5: Enable flow-steering for IB link Erez Shitrit
2017-03-15 18:56 ` Leon Romanovsky
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 15/25] net/mlx5e: Enhanced flow table creation to support ETH and IB links Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 16/25] net/mlx5e: Change cleanup API in order to enable IB link Erez Shitrit
[not found] ` <1489429896-10781-1-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 09/25] net/mlx5e: Creating and Destroying flow-steering tables for " Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 11/25] net/mlx5e: Refactor attach_netdev API Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 12/25] net/mlx5e: Use underlay_qpn in tis creation Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 13/25] net/mlx5e: Export resource creation function to be used in IB link Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 17/25] net/mlx5e: Change mlx5e_open_locked and mlx5e_close_locked api Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 18/25] net/mlx5e: Export open/close api for IB link Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 19/25] include/linux/mlx5: Add mlx5_wqe_eth_pad and enhanced-ipoib-qp-mode Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 20/25] net/mlx5e: Refactor TX send flow Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 22/25] net/mlx5e: New function pointer for build_rx_skb is Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 23/25] net/mlx5e: Change the function that checks the packet type Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 21/25] net/mlx5e: Export send function for IB link type Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 24/25] net/mlx5e: Add support for build_rx_skb for packet from IB type Erez Shitrit
2017-03-13 18:31 ` [RFC v1 for accelerated IPoIB 25/25] mlx5_ib: skeleton for mlx5_ib to support ipoib_ops Erez Shitrit
[not found] ` <1489429896-10781-26-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-03-13 20:27 ` Jason Gunthorpe
[not found] ` <20170313202720.GC2738-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-14 14:53 ` Erez Shitrit
2017-03-14 16:10 ` Jason Gunthorpe
2017-03-14 16:37 ` Erez Shitrit
2017-03-14 6:07 ` Vishwanathapura, Niranjana
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=20170315155802.GB29562@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=dledford@redhat.com \
--cc=erezsh@dev.mellanox.co.il \
--cc=erezsh@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niranjana.vishwanathapura@intel.com \
--cc=saedm@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 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).