On Mon, Mar 18, 2019 at 12:26:02PM -0300, Parav Pandit wrote: > > > > From: Jason Gunthorpe > > Sent: Monday, March 18, 2019 10:17 AM > > To: Parav Pandit <parav@xxxxxxxxxxxx> > > Cc: Leon Romanovsky <leon@xxxxxxxxxx>; Ira Weiny <ira.weiny@xxxxxxxxx>; > > Doug Ledford <dledford@xxxxxxxxxx>; RDMA mailing list <linux- > > rdma@xxxxxxxxxxxxxxx> > > Subject: Re: [PATCH rdma-next 3/3] RDMA/nldev: Return device protocol > > > > On Mon, Mar 18, 2019 at 12:09:05PM -0300, Parav Pandit wrote: > > > > > How one shall create a IB link using rxe driver? Can you please describe? > > > RDMA_NLDEV_ATTR_LINK_TYPE=rxe. > > > How to say this new device type is IB or ROCE? > > > > The user interface for this via 'rdma' is just a single string to define what you > > get. > > > > So that string must unambigously specify all the parameters. > > > Do you mean string should say "rxe ib" to create IB rxe devices? > And "rxe" for RoCEv2 as it stands today? > Any example in general that I do not know which passes multiple parameters as single string in netlink, instead of describing attribute separately? > Sounds odd to me. Follows the basic design of 'ip link add' fundamentally different things have different string names I don't even know what 'rxe ib' is supposed to be - but it certainly doesn't have an associated netdev, for instance. Better to call it 'sib' or something. A single driver can register multiple link type names with no problem. > In drivers/infiniband/core/nldev.c, we need to split a string before doing link_ops_get()? Why would we do that? Jason