From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
Niranjana Vishwanathapura
<niranjana.vishwanathapura-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [RFC for accelerated IPoIB 00/27] Enhanced mode for IPoIB driver
Date: Wed, 1 Mar 2017 11:20:39 -0700 [thread overview]
Message-ID: <20170301182039.GC14791@obsidianresearch.com> (raw)
In-Reply-To: <1488376954-8346-1-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On Wed, Mar 01, 2017 at 04:02:08PM +0200, Erez Shitrit wrote:
> /* default accelerating functions, same as before */
> struct ib_ipoib_accel_ops default_ipoib_accel_ops = {
> .ib_dev_init = ipoib_dev_init_default,
> .ib_dev_cleanup = ipoib_dev_uninit_default,
> .ib_dev_open = ipoib_ib_dev_open_default,
> .ib_dev_stop = ipoib_ib_dev_stop_default,
> .send = ipoib_send,
> .create_netdev = ipoib_create_netdev_default,
> .attach_mcast = ipoib_mcast_attach,
> .dettach_mcast = ipoib_mcast_dettach,
> };
This is so ridiculously close to what opa_vnic is doing, please try to
work with them to figure out some common version of your
'create_netdev':
+struct ib_ipoib_accel_ops {
+
+ /*
+ * HW provider driver creates the net_device for IPoIB.
+ * hca: The current ib device.
+ * name: is the format of the new network device (probably ib%d)
+ */
+ struct net_device * (*create_netdev)(struct ib_device *hca,
+ const char *name,
+ void (*setup)(struct net_device *));
vs:
@@ -2110,6 +2128,15 @@ struct ib_device {
+ struct net_device *(*alloc_rdma_netdev)(
+ struct ib_device *device,
+ u8 port_num,
+ enum rdma_netdev_t type,
+ const char *name,
+ unsigned char name_assign_type,
+ void (*setup)(struct net_device *));
I've pointed out again and again you two are working on the same
thing.
It is inexplicable to me you couldn't use this opa_vnic patch as a
starting point for the ipoib api:
https://patchwork.kernel.org/patch/9587819/
I would propose you add a RDMA_NETDEV_IPOIB to their stuff and a
rdma_netdev_get_ipoib_ops(struct net_device *) to get your
rdma_netdev_ipoib_ops.
I also wonder why there are so many ops, for instance the approach of
having the driver set .ndo_stop and others seems better.
ipoib could either 'wrapper' that pointer after calling
alloc_rdma_netdev or it could export enough utility functions for the
driver to implement the needed behavior. (eg this may be more in line
with the "midlayer mistake" thinking of
https://lwn.net/Articles/336262/)
Maybe Niranjana has some suggestions based on learning in vnic, they
tried a few different schemes.
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-03-01 18:20 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-01 14:02 [RFC for accelerated IPoIB 00/27] Enhanced mode for IPoIB driver Erez Shitrit
[not found] ` <1488376954-8346-1-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-03-01 14:02 ` [RFC for accelerated IPoIB 01/26] IB/ipoib: Separate control and data related initializations Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 02/26] IB/ipoib: separate control from HW operation on ipoib_open/stop ndo Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 03/26] IB/ipoib: Rename qpn to dqpn in ipoib_send and post_send functions Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 04/26] IB/verb: Add ipoib_options struct and API Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 05/26] IB/ipoib: Support ipoib acceleration options callbacks Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 06/26] IB/ipoib: Add context to ipoib to be used in acceleration layer Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 07/26] hw/mlx5: Add New bit to check over QP creation Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 08/26] linux/mlx5/mlx5_ifc.h: Add underlay_qpn field to PRM objects Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 09/26] net/mlx5e: Refactor EN code to support IB link Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 10/26] net/mlx5e: Creating and Destroying flow-steering tables for " Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 11/26] net/mlx5e: Support netdevice creation for IB link type Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 12/26] net/mlx5e: Refactor attach_netdev API Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 13/26] net/mlx5e: Use underlay_qpn in tis creation Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 14/26] net/mlx5e: Export resource creation function to be used in IB link Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 15/26] net/mlx5: Enable flow-steering for " Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 16/26] net/mlx5e: Enhanced flow table creation to support ETH and IB links Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 17/26] net/mlx5e: Change cleanup API in order to enable IB link Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 18/26] net/mlx5e: Change mlx5e_open_locked and mlx5e_close_locked api Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 19/26] net/mlx5e: Export open/close api for IB link Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 20/26] include/linux/mlx5: Add mlx5_wqe_eth_pad and enhanced-ipoib-qp-mode Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 21/26] net/mlx5e: Refactor TX send flow Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 22/26] net/mlx5e: Export send function for IB link type Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 23/26] net/mlx5e: New function pointer for build_rx_skb is Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 24/26] net/mlx5e: Change the function that checks the packet type Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 25/26] net/mlx5e: Add support for build_rx_skb for packet from IB type Erez Shitrit
2017-03-01 14:02 ` [RFC for accelerated IPoIB 26/26] mlx5_ib: skeleton for mlx5_ib to support ipoib_ops Erez Shitrit
2017-03-01 18:20 ` Jason Gunthorpe [this message]
[not found] ` <20170301182039.GC14791-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-02 19:13 ` [RFC for accelerated IPoIB 00/27] Enhanced mode for IPoIB driver Erez Shitrit
[not found] ` <CAAk-MO9tAHioaSXv8MPu=Kf3QSxjuQhAt6vYRVCzuNriXkm-+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-02 20:06 ` Jason Gunthorpe
[not found] ` <20170302200619.GA17530-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-03 0:14 ` Vishwanathapura, Niranjana
2017-03-01 18:28 ` Jason Gunthorpe
[not found] ` <20170301182833.GD14791-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-02 19:17 ` Erez Shitrit
2017-03-02 20:30 ` ira.weiny
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=20170301182039.GC14791@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=niranjana.vishwanathapura-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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