All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vishwanathapura, Niranjana" <niranjana.vishwanathapura-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Erez Shitrit
	<erezsh-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	valex-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [RFC for accelerated IPoIB 00/27] Enhanced mode for IPoIB driver
Date: Thu, 2 Mar 2017 16:14:32 -0800	[thread overview]
Message-ID: <20170303001431.GB66720@knc-06.sc.intel.com> (raw)
In-Reply-To: <20170302200619.GA17530-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Hi,

I haven't gone through the patches in detail yet.
Jason already responded regarding using 'rdma netdev' for this use case.
I agree with it and adding couple points to that here.

On Thu, Mar 02, 2017 at 01:06:19PM -0700, Jason Gunthorpe wrote:
>On Thu, Mar 02, 2017 at 09:13:33PM +0200, Erez Shitrit wrote:
>
>> 3. We are using some functions that are not part of the ndo calls or
>> are used differently for example:
>
>What these patches do is not consistent with the rest of the stack.
>
>Niranjana choose to add control functions directly to 'rdma_netdev', I
>think that is a reasonable choice and you should do the same:
>
>+struct rdma_netdev {
>+	void *clnt_priv;
>+
>+	/* control functions */
>+	void (*set_id)(struct net_device *netdev, int id);
>+};
>
>Add ipoib_attach_mcast/etc
>
>Maybe propose to Niranjana that this should be a struct
>rdma_netdev_ops pointer.
>
>For everything else I would use ndo ops directly and do not involve
>the rdma side.
>

Many of the operations in ib_ipoib_accel_ops can use ndo calls or can be easily 
be adopted to use them.

>> I think that we can change the create_netdev api to be like is in the
>> VNIC code, but we would like to keep the rest of the functions in
>> our
>
>Of course you can, it is the same function!
>
>Both patchsets need to adopt the same scheme for dealing with 'priv'
>data in the netdev, and the same signature for the create_netdev()
>driver op. The vnic approach is reasonable here and provides a
>dedicated priv for the driver and a second priv for the management
>layer.
>
>You should start here:
>
>https://patchwork.kernel.org/patch/9587819/
>
>And propose any fundamental modifications to Niranjana.
>
>For instance, ipoib should define a header like 'opib_vnic.h' that
>specifies ipoib versions of opa_vnic_rdma_netdev, opa_vnic_priv,
>opa_vnic_dev_priv, and so on.
>
>> struct and suggest the VNIC driver will use it in order to get the
>> pointer of the create_netdev, We think that struct of pointers to
>> functions can be flexible to future needs with no need to consider the
>> ndo existence.
>
>I think that misses the point, there many ndo ops that are
>relavent only to the low level driver (eg ndo_select_queue,
>ndo_features_check, etc) and those should just be directly hooked by
>the low level driver without involvement from the ipoib layer.
>
>For instance instead of having ipoib ndo_start_xmit call a
>ops->start(), it is more consistent with netdev for the driver to
>provide ndo_start_xmit and call ipoib_get_ah() to get the path
>information.
>
>This broadly makes more sense because the driver might want to return
>NETDEV_TX_BUSY right away and doesn't need to be forced to do a
>mandatory AH lookup by the ipoib wrapper.
>
>In general wrapping the ndo calls in ipoib is probably not a great
>idea. (same comment applies to vnic)
>

Having OPA_VNIC call a function out of ib_ipoib_accel_ops is not right design 
at all.
'rdma netdev' is a generic netdev interface which can be used for multiple use 
cases.
Both OPA_VNIC and this should use 'rdma netdev' interface. OPA_VNIC is already 
doing it by defining RDMA_NETDEV_OPA_VNIC.
The control ops should be associated with the 'rdma netdev' and not the other 
way round.

You can put the control ops in the ipoib wrapper around 'rdma_netdev' (opa_vnic 
defines opa_vnic_rdma_netdev structure, ipoib can define a similar one) or 
directly under 'rdma_netdev' structure perhaps.
I am seeing in PATCH#26, mlx5 driver is accessing ipoib ULP's private data 
structure, which it shouldn't. VNIC using rdma netdev clearly distinguishes 
between client and device private data structures.

Niranjana

>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

  parent reply	other threads:[~2017-03-03  0:14 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   ` [RFC for accelerated IPoIB 00/27] Enhanced mode for IPoIB driver Jason Gunthorpe
     [not found]     ` <20170301182039.GC14791-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-02 19:13       ` 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 [this message]
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=20170303001431.GB66720@knc-06.sc.intel.com \
    --to=niranjana.vishwanathapura-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=erezsh-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 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.