All of lore.kernel.org
 help / color / mirror / Atom feed
From: Parav Pandit <parav@mellanox.com>
To: "Vishwanathapura,
	Niranjana" <niranjana.vishwanathapura@intel.com>,
	"dledford@redhat.com" <dledford@redhat.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"dennis.dalessandro@intel.com" <dennis.dalessandro@intel.com>,
	"ira.weiny@intel.com" <ira.weiny@intel.com>
Subject: RE: [RFC v3 02/11] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) interface
Date: Wed, 8 Feb 2017 00:43:40 +0000	[thread overview]
Message-ID: <VI1PR0502MB3008911E9587F4C004BFEF13D1420@VI1PR0502MB3008.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1486498990-76562-3-git-send-email-niranjana.vishwanathapura@intel.com>

Hi 

> -----Original Message-----
> From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-
> owner@vger.kernel.org] On Behalf Of Vishwanathapura, Niranjana
> Sent: Tuesday, February 7, 2017 2:23 PM
> To: dledford@redhat.com
> Cc: linux-rdma@vger.kernel.org; netdev@vger.kernel.org;
> dennis.dalessandro@intel.com; ira.weiny@intel.com; Niranjana
> Vishwanathapura <niranjana.vishwanathapura@intel.com>
> Subject: [RFC v3 02/11] IB/hfi-vnic: Virtual Network Interface Controller
> (VNIC) interface
> 
> Add rdma netdev interface to ib device structure allowing rdma netdev
> devices to be allocated by ib clients.
> Define HFI VNIC interface between hardware independent VNIC
> functionality and the hardware dependent VNIC functionality.
> 
> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
> Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> Signed-off-by: Niranjana Vishwanathapura
> <niranjana.vishwanathapura@intel.com>
> ---
>  struct ib_device {
>  	struct device                *dma_device;
> 
> @@ -2096,6 +2114,15 @@ struct ib_device {
>  							   struct
> ib_rwq_ind_table_init_attr *init_attr,
>  							   struct ib_udata
> *udata);
>  	int                        (*destroy_rwq_ind_table)(struct ib_rwq_ind_table
> *wq_ind_table);
> +	/* rdma netdev operations */
> +	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 *));
> +	void (*free_rdma_netdev)(struct net_device *netdev);
>  	struct ib_dma_mapping_ops   *dma_ops;
> 
>  	struct module               *owner;

As its clear from the cover letter and from the request to place this in drivers/infiniband/ulp,
Instead of increasing the ib_dev structure further,
Can you change the code to make use of ib_register_client() and friend functions to register vnic as ULP.
(similar to other ULP such as uverbs, srp, ipoib).
This will also allow you get to get notified for removing the vnic device when underlying rdma device gets removed.
Based on the property that gets exposed by the ibdev, vnic driver filters whether it needs to load its vnic to specific device or not.
This way modules are isolated between core and ULP little better.
Would it work for you?

  parent reply	other threads:[~2017-02-08  0:43 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 20:22 [RFC v3 00/11] HFI Virtual Network Interface Controller (VNIC) Vishwanathapura, Niranjana
2017-02-07 20:23 ` [RFC v3 03/11] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) netdev Vishwanathapura, Niranjana
2017-02-07 20:23 ` [RFC v3 05/11] IB/hfi-vnic: VNIC statistics support Vishwanathapura, Niranjana
2017-02-07 20:23 ` [RFC v3 06/11] IB/hfi-vnic: VNIC MAC table support Vishwanathapura, Niranjana
2017-02-07 20:23 ` [RFC v3 07/11] IB/hfi-vnic: VNIC Ethernet Management Agent (VEMA) interface Vishwanathapura, Niranjana
2017-02-07 20:23 ` [RFC v3 08/11] IB/hfi-vnic: VNIC Ethernet Management Agent (VEMA) function Vishwanathapura, Niranjana
2017-02-07 20:23 ` [RFC v3 09/11] IB/hfi1: HFI_VNIC RDMA netdev support Vishwanathapura, Niranjana
     [not found]   ` <1486498990-76562-10-git-send-email-niranjana.vishwanathapura-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-08  4:06     ` Parav Pandit
2017-02-08 18:21       ` Vishwanathapura, Niranjana
2017-02-07 20:23 ` [RFC v3 10/11] IB/hfi1: Virtual Network Interface Controller (VNIC) HW support Vishwanathapura, Niranjana
2017-02-07 20:23 ` [RFC v3 11/11] IB/hfi1: VNIC SDMA support Vishwanathapura, Niranjana
     [not found] ` <1486498990-76562-1-git-send-email-niranjana.vishwanathapura-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-07 20:23   ` [RFC v3 01/11] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) documentation Vishwanathapura, Niranjana
     [not found]     ` <1486498990-76562-2-git-send-email-niranjana.vishwanathapura-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-02-08 17:00       ` Bart Van Assche
     [not found]         ` <1486573231.16026.1.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2017-02-23  7:24           ` Vishwanathapura, Niranjana
2017-02-07 20:23   ` [RFC v3 02/11] IB/hfi-vnic: Virtual Network Interface Controller (VNIC) interface Vishwanathapura, Niranjana
2017-02-07 21:19     ` Jason Gunthorpe
     [not found]       ` <20170207211901.GB28922-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-07 22:06         ` Vishwanathapura, Niranjana
2017-02-07 22:19           ` Jason Gunthorpe
     [not found]             ` <20170207221925.GA30579-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-08  1:04               ` Vishwanathapura, Niranjana
2017-02-08  6:54         ` Leon Romanovsky
2017-02-08 17:29           ` Jason Gunthorpe
2017-02-08  0:43     ` Parav Pandit [this message]
     [not found]       ` <VI1PR0502MB3008911E9587F4C004BFEF13D1420-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-02-08  1:12         ` Vishwanathapura, Niranjana
2017-02-07 20:23   ` [RFC v3 04/11] IB/hfi-vnic: VNIC Ethernet Management (EM) structure definitions Vishwanathapura, Niranjana
2017-02-07 20:36   ` [RFC v3 00/11] HFI Virtual Network Interface Controller (VNIC) Leon Romanovsky
     [not found]     ` <20170207203649.GW6005-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-02-07 21:00       ` Hefty, Sean
2017-02-07 21:43         ` Vishwanathapura, Niranjana
     [not found]           ` <20170207214303.GA76652-wPcXA7LoDC+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-02-08  5:18             ` Leon Romanovsky
2017-02-08  5:30         ` Leon Romanovsky
2017-02-07 21:28   ` Bart Van Assche
2017-02-07 21:44     ` Hefty, Sean
2017-02-07 21:58       ` Bart Van Assche
     [not found]         ` <1486504716.2581.8.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2017-02-08  0:54           ` Vishwanathapura, Niranjana
     [not found]             ` <20170208005416.GA76793-wPcXA7LoDC+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-02-08  1:09               ` Bart Van Assche
2017-02-08  7:01                 ` Weiny, Ira
2017-02-08 17:21                   ` Hefty, Sean
2017-02-08 17:45               ` Jason Gunthorpe
2017-02-12 13:26   ` Liran Liss
2017-02-13 17:09     ` Jason Gunthorpe
     [not found]       ` <20170213170935.GD25430-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-22  8:43         ` 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=VI1PR0502MB3008911E9587F4C004BFEF13D1420@VI1PR0502MB3008.eurprd05.prod.outlook.com \
    --to=parav@mellanox.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=niranjana.vishwanathapura@intel.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.