Re: [PATCH V4 for-next 1/3] RDMA/hns: Add mtr support for mixed multihop addressing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 13, 2019 at 10:14:18AM +0000, Salil Mehta wrote:
> > From: linux-rdma-owner@xxxxxxxxxxxxxxx
> > [mailto:linux-rdma-owner@xxxxxxxxxxxxxxx] On Behalf Of Jason Gunthorpe
> > Sent: Wednesday, June 12, 2019 5:23 PM
> > To: Salil Mehta <salil.mehta@xxxxxxxxxx>
> > 
> > On Wed, Jun 12, 2019 at 03:12:24PM +0000, Salil Mehta wrote:
> > > > From: linux-rdma-owner@xxxxxxxxxxxxxxx
> > > > [mailto:linux-rdma-owner@xxxxxxxxxxxxxxx] On Behalf Of Jason Gunthorpe
> > > > Sent: Wednesday, June 12, 2019 12:52 PM
> > > > To: John Garry <john.garry@xxxxxxxxxx>
> > > > Cc: Leon Romanovsky <leon@xxxxxxxxxx>; wangxi (M) <wangxi11@xxxxxxxxxx>;
> > > > linux-rdma@xxxxxxxxxxxxxxx; dledford@xxxxxxxxxx; Linuxarm
> > > > <linuxarm@xxxxxxxxxx>
> > > > Subject: Re: [PATCH V4 for-next 1/3] RDMA/hns: Add mtr support for mixed
> > > > multihop addressing
> > > >
> > > > On Wed, Jun 12, 2019 at 09:51:59AM +0100, John Garry wrote:
> > > > > On 11/06/2019 06:56, Leon Romanovsky wrote:
> > > > > > On Tue, Jun 11, 2019 at 10:37:48AM +0800, wangxi wrote:
> > > > > > >
> > > > > > >
> > > > > > > 在 2019/6/10 21:27, Jason Gunthorpe 写道:
> > > > > > > > On Sat, Jun 08, 2019 at 10:24:15AM +0800, wangxi wrote:
> > > > > > > >
> > > > > > > > > > Why is there an EXPROT_SYMBOL in a IB driver? I see many in
> > > > > > > > > > hns. Please send a patch to remove all of them and respin this.
> > > > > > > > > >
> > > > > > > > > There are 2 modules in our ib driver, one is hns_roce.ko, another
> > > > > > > > > is hns_roce_hw_v2.ko. all extern symbols are named like hns_roce_xxx,
> > > > > > > > > this function defined in hns_roce.ko, and invoked in
> > > > > > > > > hns_roce_hw_v2.ko.
> > >
> > > [...]
> > >
> > > > > In addition to this, v1 hw is a platform device driver and depends on HNS,
> > > > > while v2 hw is for a PCI device and depends on PCI && HNS3. Attempts to
> > > > > combine into a single ko would introduce messy dependencies and ifdefs.
> > > >
> > > > I suspect it would not be any different from how it is today. Do
> > > > everything the same, just have one module not three. module_init/etc
> > > > already take care of conditional compilation of the entire .c file via
> > > > Makefile
> > >
> > > Okay. I see your point.
> > >
> > > As I understand, the code within v1 and v2 will almost never be required on
> > > the same system since they belong to different types of hardware (platform/PCI).
> > > Dependency between V1, V2 and common code is something like below
> > 
> > platform and PCI can co-exist in the kernel, there is no reason to
> > worry about them co-existing in the same driver other than loaded code
> > size, which doesn't seem like a big deal here.
> 
> 
> Ok. I take your point. If we have an options then we would rather prefer to
> reduce the size as well other than converting it to a single .ko.

Generally modules should be reasonable, in this case the hns RDMA
driver looks to be around maybe 100k, which is not really big enough to
be worth splitting IMHO.
> 
> > About the only thing that might give me pause is that v2 depends on a
> > different ethernet module than v1.. But that depends alot on size too,
> > there is no harm to load a useless ethernet module if it is not large.
> 
> Yes, you are right. That is another concern. It would be very messy
> to load HNS & HNS3 Ethernet driver together when we know they will not
> be used and have big differences in their hardware. Also, HNS3 Ethernet
> driver is big in size.
> 
> As such,
>            V1 RoCE ---> HNS Ethernet Driver
>            V2 RoCE ---> HNS3 Ethernet Driver

This is a reasonable explanation

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux