diff mbox series

[rdma-core,2/2] cxgb4: remove unused c4iw_match_device

Message ID 20190725174928.26863-1-bharat@chelsio.com (mailing list archive)
State Not Applicable
Headers show
Series [rdma-core,1/2] cxgb4: fix chipversion initialization | expand

Commit Message

Potnuri Bharat Teja July 25, 2019, 5:49 p.m. UTC
match_device handler is no longer needed after latest device binding changes.

Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
---
 providers/cxgb4/dev.c | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

Comments

Jason Gunthorpe July 25, 2019, 6:14 p.m. UTC | #1
On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat Teja wrote:
> match_device handler is no longer needed after latest device binding changes.
> 
> Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> ---
>  providers/cxgb4/dev.c | 41 -----------------------------------------
>  1 file changed, 41 deletions(-)

Do you know if we can also drop the same code in cxgb3?

Jason
Leon Romanovsky July 28, 2019, 8:37 a.m. UTC | #2
On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe wrote:
> On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat Teja wrote:
> > match_device handler is no longer needed after latest device binding changes.
> >
> > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> > ---
> >  providers/cxgb4/dev.c | 41 -----------------------------------------
> >  1 file changed, 41 deletions(-)
>
> Do you know if we can also drop the same code in cxgb3?

Can we simply remove cxgb3?

Thanks

>
> Jason
Potnuri Bharat Teja July 29, 2019, 7:46 a.m. UTC | #3
On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon Romanovsky wrote:
> On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe wrote:
> > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat Teja wrote:
> > > match_device handler is no longer needed after latest device binding changes.
> > >
> > > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> > > ---
> > >  providers/cxgb4/dev.c | 41 -----------------------------------------
> > >  1 file changed, 41 deletions(-)
> >
> > Do you know if we can also drop the same code in cxgb3?
> 
> Can we simply remove cxgb3?
>

I am in talks with the people here. I'll confirm it soon.

> Thanks
> 
> >
> > Jason
Potnuri Bharat Teja Aug. 5, 2019, 11:06 a.m. UTC | #4
On Monday, July 07/29/19, 2019 at 13:16:20 +0530, Potnuri Bharat Teja wrote:
> On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon Romanovsky wrote:
> > On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe wrote:
> > > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat Teja wrote:
> > > > match_device handler is no longer needed after latest device binding changes.
> > > >
> > > > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> > > > ---
> > > >  providers/cxgb4/dev.c | 41 -----------------------------------------
> > > >  1 file changed, 41 deletions(-)
> > >
> > > Do you know if we can also drop the same code in cxgb3?
> > 
> > Can we simply remove cxgb3?
> >
> 
> I am in talks with the people here. I'll confirm it soon.

Hi Jason/Doug/Leon,
Chelsio is fine with removing cxgb3.
Thanks,
Bharat.
Leon Romanovsky Aug. 6, 2019, 8:09 a.m. UTC | #5
On Mon, Aug 05, 2019 at 04:36:53PM +0530, Potnuri Bharat Teja wrote:
> On Monday, July 07/29/19, 2019 at 13:16:20 +0530, Potnuri Bharat Teja wrote:
> > On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon Romanovsky wrote:
> > > On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe wrote:
> > > > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat Teja wrote:
> > > > > match_device handler is no longer needed after latest device binding changes.
> > > > >
> > > > > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> > > > > ---
> > > > >  providers/cxgb4/dev.c | 41 -----------------------------------------
> > > > >  1 file changed, 41 deletions(-)
> > > >
> > > > Do you know if we can also drop the same code in cxgb3?
> > >
> > > Can we simply remove cxgb3?
> > >
> >
> > I am in talks with the people here. I'll confirm it soon.
>
> Hi Jason/Doug/Leon,
> Chelsio is fine with removing cxgb3.

Thanks a lot.

> Thanks,
> Bharat.
Leon Romanovsky Aug. 6, 2019, 9:48 a.m. UTC | #6
On Tue, Aug 06, 2019 at 11:09:02AM +0300, Leon Romanovsky wrote:
> On Mon, Aug 05, 2019 at 04:36:53PM +0530, Potnuri Bharat Teja wrote:
> > On Monday, July 07/29/19, 2019 at 13:16:20 +0530, Potnuri Bharat Teja wrote:
> > > On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon Romanovsky wrote:
> > > > On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe wrote:
> > > > > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat Teja wrote:
> > > > > > match_device handler is no longer needed after latest device binding changes.
> > > > > >
> > > > > > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> > > > > > ---
> > > > > >  providers/cxgb4/dev.c | 41 -----------------------------------------
> > > > > >  1 file changed, 41 deletions(-)
> > > > >
> > > > > Do you know if we can also drop the same code in cxgb3?
> > > >
> > > > Can we simply remove cxgb3?
> > > >
> > >
> > > I am in talks with the people here. I'll confirm it soon.
> >
> > Hi Jason/Doug/Leon,
> > Chelsio is fine with removing cxgb3.
>
> Thanks a lot.

Which parts of cxgb3 can we remove? RDMA, scsi, net or everything?

Thanks

>
> > Thanks,
> > Bharat.
Potnuri Bharat Teja Aug. 6, 2019, 11:08 a.m. UTC | #7
On Tuesday, August 08/06/19, 2019 at 15:18:49 +0530, Leon Romanovsky wrote:
> On Tue, Aug 06, 2019 at 11:09:02AM +0300, Leon Romanovsky wrote:
> > On Mon, Aug 05, 2019 at 04:36:53PM +0530, Potnuri Bharat Teja wrote:
> > > On Monday, July 07/29/19, 2019 at 13:16:20 +0530, Potnuri Bharat Teja wrote:
> > > > On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon Romanovsky wrote:
> > > > > On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe wrote:
> > > > > > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat Teja wrote:
> > > > > > > match_device handler is no longer needed after latest device binding changes.
> > > > > > >
> > > > > > > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> > > > > > > ---
> > > > > > >  providers/cxgb4/dev.c | 41 -----------------------------------------
> > > > > > >  1 file changed, 41 deletions(-)
> > > > > >
> > > > > > Do you know if we can also drop the same code in cxgb3?
> > > > >
> > > > > Can we simply remove cxgb3?
> > > > >
> > > >
> > > > I am in talks with the people here. I'll confirm it soon.
> > >
> > > Hi Jason/Doug/Leon,
> > > Chelsio is fine with removing cxgb3.
> >
> > Thanks a lot.
> 
> Which parts of cxgb3 can we remove? RDMA, scsi, net or everything?

I can only say RDMA. For net and scsi parts of cxgb3, the corresponding 
maintainers might request for their removal.
Should I send a patch removing RDMA cxgb3?

Thanks.
Leon Romanovsky Aug. 6, 2019, 11:13 a.m. UTC | #8
On Tue, Aug 06, 2019 at 04:38:13PM +0530, Potnuri Bharat Teja wrote:
> On Tuesday, August 08/06/19, 2019 at 15:18:49 +0530, Leon Romanovsky wrote:
> > On Tue, Aug 06, 2019 at 11:09:02AM +0300, Leon Romanovsky wrote:
> > > On Mon, Aug 05, 2019 at 04:36:53PM +0530, Potnuri Bharat Teja wrote:
> > > > On Monday, July 07/29/19, 2019 at 13:16:20 +0530, Potnuri Bharat Teja wrote:
> > > > > On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon Romanovsky wrote:
> > > > > > On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe wrote:
> > > > > > > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat Teja wrote:
> > > > > > > > match_device handler is no longer needed after latest device binding changes.
> > > > > > > >
> > > > > > > > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> > > > > > > > ---
> > > > > > > >  providers/cxgb4/dev.c | 41 -----------------------------------------
> > > > > > > >  1 file changed, 41 deletions(-)
> > > > > > >
> > > > > > > Do you know if we can also drop the same code in cxgb3?
> > > > > >
> > > > > > Can we simply remove cxgb3?
> > > > > >
> > > > >
> > > > > I am in talks with the people here. I'll confirm it soon.
> > > >
> > > > Hi Jason/Doug/Leon,
> > > > Chelsio is fine with removing cxgb3.
> > >
> > > Thanks a lot.
> >
> > Which parts of cxgb3 can we remove? RDMA, scsi, net or everything?
>
> I can only say RDMA. For net and scsi parts of cxgb3, the corresponding
> maintainers might request for their removal.
> Should I send a patch removing RDMA cxgb3?

It will be the best variant.

Thanks

>
> Thanks.
Doug Ledford Aug. 6, 2019, 3:16 p.m. UTC | #9
On Tue, 2019-08-06 at 14:13 +0300, Leon Romanovsky wrote:
> On Tue, Aug 06, 2019 at 04:38:13PM +0530, Potnuri Bharat Teja wrote:
> > On Tuesday, August 08/06/19, 2019 at 15:18:49 +0530, Leon Romanovsky
> > wrote:
> > > On Tue, Aug 06, 2019 at 11:09:02AM +0300, Leon Romanovsky wrote:
> > > > On Mon, Aug 05, 2019 at 04:36:53PM +0530, Potnuri Bharat Teja
> > > > wrote:
> > > > > On Monday, July 07/29/19, 2019 at 13:16:20 +0530, Potnuri
> > > > > Bharat Teja wrote:
> > > > > > On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon
> > > > > > Romanovsky wrote:
> > > > > > > On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe
> > > > > > > wrote:
> > > > > > > > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat
> > > > > > > > Teja wrote:
> > > > > > > > > match_device handler is no longer needed after latest
> > > > > > > > > device binding changes.
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com
> > > > > > > > > >
> > > > > > > > > ---
> > > > > > > > >  providers/cxgb4/dev.c | 41 --------------------------
> > > > > > > > > ---------------
> > > > > > > > >  1 file changed, 41 deletions(-)
> > > > > > > > 
> > > > > > > > Do you know if we can also drop the same code in cxgb3?
> > > > > > > 
> > > > > > > Can we simply remove cxgb3?
> > > > > > > 
> > > > > > 
> > > > > > I am in talks with the people here. I'll confirm it soon.
> > > > > 
> > > > > Hi Jason/Doug/Leon,
> > > > > Chelsio is fine with removing cxgb3.
> > > > 
> > > > Thanks a lot.
> > > 
> > > Which parts of cxgb3 can we remove? RDMA, scsi, net or everything?
> > 
> > I can only say RDMA. For net and scsi parts of cxgb3, the
> > corresponding
> > maintainers might request for their removal.
> > Should I send a patch removing RDMA cxgb3?
> 
> It will be the best variant.
> 
> Thanks
> 
> > Thanks.

I'm not entirely sure that I want it removed yet.  The cxgb3 isn't the
most stellar device, but it will do 40GBit/s.  That's still a very
respectable speed (unlike say mthca that was mostly 10GBit/s with only a
short run of 20GBit/s devices before it switched over to mlx4).  So a
cxgb3 based home system is still something very usable.  Are we sure we
want to remove this?
Leon Romanovsky Aug. 6, 2019, 3:36 p.m. UTC | #10
On Tue, Aug 06, 2019 at 11:16:13AM -0400, Doug Ledford wrote:
> On Tue, 2019-08-06 at 14:13 +0300, Leon Romanovsky wrote:
> > On Tue, Aug 06, 2019 at 04:38:13PM +0530, Potnuri Bharat Teja wrote:
> > > On Tuesday, August 08/06/19, 2019 at 15:18:49 +0530, Leon Romanovsky
> > > wrote:
> > > > On Tue, Aug 06, 2019 at 11:09:02AM +0300, Leon Romanovsky wrote:
> > > > > On Mon, Aug 05, 2019 at 04:36:53PM +0530, Potnuri Bharat Teja
> > > > > wrote:
> > > > > > On Monday, July 07/29/19, 2019 at 13:16:20 +0530, Potnuri
> > > > > > Bharat Teja wrote:
> > > > > > > On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon
> > > > > > > Romanovsky wrote:
> > > > > > > > On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason Gunthorpe
> > > > > > > > wrote:
> > > > > > > > > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri Bharat
> > > > > > > > > Teja wrote:
> > > > > > > > > > match_device handler is no longer needed after latest
> > > > > > > > > > device binding changes.
> > > > > > > > > >
> > > > > > > > > > Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com
> > > > > > > > > > >
> > > > > > > > > > ---
> > > > > > > > > >  providers/cxgb4/dev.c | 41 --------------------------
> > > > > > > > > > ---------------
> > > > > > > > > >  1 file changed, 41 deletions(-)
> > > > > > > > >
> > > > > > > > > Do you know if we can also drop the same code in cxgb3?
> > > > > > > >
> > > > > > > > Can we simply remove cxgb3?
> > > > > > > >
> > > > > > >
> > > > > > > I am in talks with the people here. I'll confirm it soon.
> > > > > >
> > > > > > Hi Jason/Doug/Leon,
> > > > > > Chelsio is fine with removing cxgb3.
> > > > >
> > > > > Thanks a lot.
> > > >
> > > > Which parts of cxgb3 can we remove? RDMA, scsi, net or everything?
> > >
> > > I can only say RDMA. For net and scsi parts of cxgb3, the
> > > corresponding
> > > maintainers might request for their removal.
> > > Should I send a patch removing RDMA cxgb3?
> >
> > It will be the best variant.
> >
> > Thanks
> >
> > > Thanks.
>
> I'm not entirely sure that I want it removed yet.  The cxgb3 isn't the
> most stellar device, but it will do 40GBit/s.  That's still a very
> respectable speed (unlike say mthca that was mostly 10GBit/s with only a
> short run of 20GBit/s devices before it switched over to mlx4).  So a
> cxgb3 based home system is still something very usable.  Are we sure we
> want to remove this?

I'm sceptical that such home users (who want RDMA part of cxgb3) exist.

My stake here is to remove as much as possible not-maintained driver
to simplify overall maintenance effort.

Thanks

>
> --
> Doug Ledford <dledford@redhat.com>
>     GPG KeyID: B826A3330E572FDD
>     Fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD
Doug Ledford Aug. 6, 2019, 3:55 p.m. UTC | #11
On Tue, 2019-08-06 at 21:05 +0530, Potnuri Bharat Teja wrote:
> On Tuesday, August 08/06/19, 2019 at 20:46:13 +0530, Doug Ledford
> wrote:
> > On Tue, 2019-08-06 at 14:13 +0300, Leon Romanovsky wrote:
> > > On Tue, Aug 06, 2019 at 04:38:13PM +0530, Potnuri Bharat Teja
> > > wrote:
> > > > On Tuesday, August 08/06/19, 2019 at 15:18:49 +0530, Leon
> > > > Romanovsky
> > > > wrote:
> > > > > On Tue, Aug 06, 2019 at 11:09:02AM +0300, Leon Romanovsky
> > > > > wrote:
> > > > > > On Mon, Aug 05, 2019 at 04:36:53PM +0530, Potnuri Bharat
> > > > > > Teja
> > > > > > wrote:
> > > > > > > On Monday, July 07/29/19, 2019 at 13:16:20 +0530, Potnuri
> > > > > > > Bharat Teja wrote:
> > > > > > > > On Sunday, July 07/28/19, 2019 at 14:07:49 +0530, Leon
> > > > > > > > Romanovsky wrote:
> > > > > > > > > On Thu, Jul 25, 2019 at 03:14:24PM -0300, Jason
> > > > > > > > > Gunthorpe
> > > > > > > > > wrote:
> > > > > > > > > > On Thu, Jul 25, 2019 at 11:19:28PM +0530, Potnuri
> > > > > > > > > > Bharat
> > > > > > > > > > Teja wrote:
> > > > > > > > > > > match_device handler is no longer needed after
> > > > > > > > > > > latest
> > > > > > > > > > > device binding changes.
> > > > > > > > > > > 
> > > > > > > > > > > Signed-off-by: Potnuri Bharat Teja <
> > > > > > > > > > > bharat@chelsio.com
> > > > > > > > > > > ---
> > > > > > > > > > >  providers/cxgb4/dev.c | 41 ----------------------
> > > > > > > > > > > ----
> > > > > > > > > > > ---------------
> > > > > > > > > > >  1 file changed, 41 deletions(-)
> > > > > > > > > > 
> > > > > > > > > > Do you know if we can also drop the same code in
> > > > > > > > > > cxgb3?
> > > > > > > > > 
> > > > > > > > > Can we simply remove cxgb3?
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > I am in talks with the people here. I'll confirm it
> > > > > > > > soon.
> > > > > > > 
> > > > > > > Hi Jason/Doug/Leon,
> > > > > > > Chelsio is fine with removing cxgb3.
> > > > > > 
> > > > > > Thanks a lot.
> > > > > 
> > > > > Which parts of cxgb3 can we remove? RDMA, scsi, net or
> > > > > everything?
> > > > 
> > > > I can only say RDMA. For net and scsi parts of cxgb3, the
> > > > corresponding
> > > > maintainers might request for their removal.
> > > > Should I send a patch removing RDMA cxgb3?
> > > 
> > > It will be the best variant.
> > > 
> > > Thanks
> > > 
> > > > Thanks.
> > 
> > I'm not entirely sure that I want it removed yet.  The cxgb3 isn't
> > the
> > most stellar device, but it will do 40GBit/s.  That's still a very
> > respectable speed (unlike say mthca that was mostly 10GBit/s with
> > only a
> > short run of 20GBit/s devices before it switched over to mlx4).  So
> > a
> > cxgb3 based home system is still something very usable.  Are we sure
> > we
> > want to remove this?
> 
> Hi Doug,
> Thanks for the suggestion. I took this discussion forward assuming
> that we 
> need to remove drivers which are not/least maintained. T3 adapters
> have 
> reached end of life long ago. Most of the times I see some
> features/changes 
> regressing due to cxgb3's limited support. based on all these I have
> put this 
> proposal of removing cxgb3 in front of the team at Chelsio. They are
> okay with 
> removing it.
> I now doubt if I missed something. Do you think otherwise?
> BTW cxgb3 has supported speed is 1/10 Gbps.

[ Adding the list back in because I don't want to have to repeat this ]

I could have sworn we have 40Gig cxgb3 hardware in our lab, but it
appears I was wrong.  If we had it, it's been pulled and what's left is
all 10GigE stuff.

I did a quick search on EBay (which is where I know a lot of people go
to get dirt cheap prices on stuff like old cards to build their home
networks with) and it didn't really turn up much in the way of cxgb3
gear.  There was plenty of gear that would use the cxgb4 driver instead.
So, I'm more on board with removing this driver now.
Jason Gunthorpe Aug. 6, 2019, 6:41 p.m. UTC | #12
On Tue, Aug 06, 2019 at 11:55:22AM -0400, Doug Ledford wrote:
 
> I did a quick search on EBay (which is where I know a lot of people go
> to get dirt cheap prices on stuff like old cards to build their home
> networks with) and it didn't really turn up much in the way of cxgb3
> gear.  There was plenty of gear that would use the cxgb4 driver instead.
> So, I'm more on board with removing this driver now.

I dislike the cxgb3 driver mostly because it is substantially similer
to the cxgb4 driver and every fix has to be done twice.

So lets drop it

Jason
diff mbox series

Patch

diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c
index 84711993ea32..b6f991529bdb 100644
--- a/providers/cxgb4/dev.c
+++ b/providers/cxgb4/dev.c
@@ -403,46 +403,6 @@  void dump_state(void)
  */
 int c4iw_abi_version = 1;
 
-static bool c4iw_device_match(struct verbs_sysfs_dev *sysfs_dev)
-{
-	char value[32], *cp;
-	unsigned int fw_maj, fw_min;
-
-	/* Rely on the core code to match PCI devices */
-	if (!sysfs_dev->match)
-		return false;
-
-	/*
-	 * Verify that the firmware major number matches.  Major number
-	 * mismatches are fatal.  Minor number mismatches are tolerated.
-	 */
-	if (ibv_get_fw_ver(value, sizeof(value), sysfs_dev))
-		return false;
-
-	cp = strtok(value+1, ".");
-	sscanf(cp, "%i", &fw_maj);
-	cp = strtok(NULL, ".");
-	sscanf(cp, "%i", &fw_min);
-
-	if ((signed int)fw_maj < FW_MAJ) {
-		fprintf(stderr, "libcxgb4: Fatal firmware version mismatch.  "
-			"Firmware major number is %u and libcxgb4 needs %u.\n",
-			fw_maj, FW_MAJ);
-		fflush(stderr);
-		return false;
-	}
-
-	DBGLOG("libcxgb4");
-
-	if ((signed int)fw_min < FW_MIN) {
-		PDBG("libcxgb4: non-fatal firmware version mismatch.  "
-			"Firmware minor number is %u and libcxgb4 needs %u.\n",
-			fw_min, FW_MIN);
-		fflush(stderr);
-	}
-	return true;
-}
-
 static struct verbs_device *c4iw_device_alloc(struct verbs_sysfs_dev *sysfs_dev)
 {
 	struct c4iw_dev *dev;
@@ -498,7 +458,6 @@  static const struct verbs_device_ops c4iw_dev_ops = {
 	.match_min_abi_version = 0,
 	.match_max_abi_version = INT_MAX,
 	.match_table = hca_table,
-	.match_device = c4iw_device_match,
 	.alloc_device = c4iw_device_alloc,
 	.uninit_device = c4iw_uninit_device,
 	.alloc_context = c4iw_alloc_context,