diff mbox

[net-next-2.6,04/17] bnx2x: Use netif_set_real_num_{rx,tx}_queues()

Message ID 1285611927.2263.296.camel@achroite.uk.solarflarecom.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ben Hutchings Sept. 27, 2010, 6:25 p.m. UTC
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/bnx2x/bnx2x_cmn.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Comments

Vladislav Zolotarov Sept. 28, 2010, 9:26 a.m. UTC | #1
> -----Original Message-----

> From: netdev-owner@vger.kernel.org [mailto:netdev-

> owner@vger.kernel.org] On Behalf Of Ben Hutchings

> Sent: Monday, September 27, 2010 8:25 PM

> To: David Miller

> Cc: netdev@vger.kernel.org; linux-net-drivers@solarflare.com; Eilon

> Greenstein

> Subject: [PATCH net-next-2.6 04/17] bnx2x: Use

> netif_set_real_num_{rx,tx}_queues()

> 

> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

> ---

>  drivers/net/bnx2x/bnx2x_cmn.c |    6 ++++--

>  1 files changed, 4 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/net/bnx2x/bnx2x_cmn.c

> b/drivers/net/bnx2x/bnx2x_cmn.c

> index efc7be4..05c05a4 100644

> --- a/drivers/net/bnx2x/bnx2x_cmn.c

> +++ b/drivers/net/bnx2x/bnx2x_cmn.c

> @@ -1207,8 +1207,8 @@ static int bnx2x_set_num_queues(struct bnx2x *bp)

>  			bp->num_queues = 1;

>  		break;

>  	}

> -	bp->dev->real_num_tx_queues = bp->num_queues;

> -	return rc;

> +	netif_set_real_num_tx_queues(bp->dev, bp->num_queues);

> +	return netif_set_real_num_rx_queues(bp->dev, bp->num_queues);

>  }

> 

>  static void bnx2x_release_firmware(struct bnx2x *bp)

> @@ -1240,6 +1240,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int

> load_mode)

>  	bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD;

> 

>  	rc = bnx2x_set_num_queues(bp);

> +	if (rc)

> +		return rc;

> 

>  	if (bnx2x_alloc_mem(bp)) {

>  		bnx2x_free_irq(bp, true);

> --

> 1.7.2.1

> 


This patch breaks our interrupt enablement flow. I'll send the new one that incorporates the netif_set_real_num_rx_queues() shortly.

Thanks,
vlad

> 

> 

> --

> Ben Hutchings, Senior Software Engineer, Solarflare Communications

> Not speaking for my employer; that's the marketing department's job.

> They asked us to note that Solarflare product names are trademarked.

> 

> --

> To unsubscribe from this list: send the line "unsubscribe netdev" in

> the body of a message to majordomo@vger.kernel.org

> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vladislav Zolotarov Sept. 28, 2010, 12:59 p.m. UTC | #2
> -----Original Message-----

> From: netdev-owner@vger.kernel.org [mailto:netdev-

> owner@vger.kernel.org] On Behalf Of Vladislav Zolotarov

> Sent: Tuesday, September 28, 2010 11:26 AM

> To: Ben Hutchings; David Miller

> Cc: netdev@vger.kernel.org; linux-net-drivers@solarflare.com; Eilon

> Greenstein

> Subject: RE: [PATCH net-next-2.6 04/17] bnx2x: Use

> netif_set_real_num_{rx,tx}_queues()

> 

> 

> 

> > -----Original Message-----

> > From: netdev-owner@vger.kernel.org [mailto:netdev-

> > owner@vger.kernel.org] On Behalf Of Ben Hutchings

> > Sent: Monday, September 27, 2010 8:25 PM

> > To: David Miller

> > Cc: netdev@vger.kernel.org; linux-net-drivers@solarflare.com; Eilon

> > Greenstein

> > Subject: [PATCH net-next-2.6 04/17] bnx2x: Use

> > netif_set_real_num_{rx,tx}_queues()

> >

> > Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

> > ---

> >  drivers/net/bnx2x/bnx2x_cmn.c |    6 ++++--

> >  1 files changed, 4 insertions(+), 2 deletions(-)

> >

> > diff --git a/drivers/net/bnx2x/bnx2x_cmn.c

> > b/drivers/net/bnx2x/bnx2x_cmn.c

> > index efc7be4..05c05a4 100644

> > --- a/drivers/net/bnx2x/bnx2x_cmn.c

> > +++ b/drivers/net/bnx2x/bnx2x_cmn.c

> > @@ -1207,8 +1207,8 @@ static int bnx2x_set_num_queues(struct bnx2x

> *bp)

> >  			bp->num_queues = 1;

> >  		break;

> >  	}

> > -	bp->dev->real_num_tx_queues = bp->num_queues;

> > -	return rc;

> > +	netif_set_real_num_tx_queues(bp->dev, bp->num_queues);

> > +	return netif_set_real_num_rx_queues(bp->dev, bp->num_queues);

> >  }

> >

> >  static void bnx2x_release_firmware(struct bnx2x *bp)

> > @@ -1240,6 +1240,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int

> > load_mode)

> >  	bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD;

> >

> >  	rc = bnx2x_set_num_queues(bp);

> > +	if (rc)

> > +		return rc;

> >

> >  	if (bnx2x_alloc_mem(bp)) {

> >  		bnx2x_free_irq(bp, true);

> > --

> > 1.7.2.1

> >

> 

> This patch breaks our interrupt enablement flow. I'll send the new one

> that incorporates the netif_set_real_num_rx_queues() shortly.


Ben, I'm going to fix the bnx2x the way your patch would apply. I suspect this would probably require u to respin the bnx2x patch.
Sorry for the inconvenience.

Thanks,
vlad

> 

> Thanks,

> vlad

> 

> >

> >

> > --

> > Ben Hutchings, Senior Software Engineer, Solarflare Communications

> > Not speaking for my employer; that's the marketing department's job.

> > They asked us to note that Solarflare product names are trademarked.

> >

> > --

> > To unsubscribe from this list: send the line "unsubscribe netdev" in

> > the body of a message to majordomo@vger.kernel.org

> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

> 

> ��칻�&�~�&���+-��ݶ��w��˛���m�޵ׯ�{ay�ʇڙ�,j
��f���h���z��w���

> 

> ���j:+v���w�j�m����
����zZ+�����ݢj"��!�i
David Miller Sept. 28, 2010, 5:39 p.m. UTC | #3
From: "Vladislav Zolotarov" <vladz@broadcom.com>
Date: Tue, 28 Sep 2010 05:59:15 -0700

> Ben, I'm going to fix the bnx2x the way your patch would apply. I
> suspect this would probably require u to respin the bnx2x patch.
> Sorry for the inconvenience.

Ben's patch is already in the tree, so you need to send me patches
relative to his.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index efc7be4..05c05a4 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -1207,8 +1207,8 @@  static int bnx2x_set_num_queues(struct bnx2x *bp)
 			bp->num_queues = 1;
 		break;
 	}
-	bp->dev->real_num_tx_queues = bp->num_queues;
-	return rc;
+	netif_set_real_num_tx_queues(bp->dev, bp->num_queues);
+	return netif_set_real_num_rx_queues(bp->dev, bp->num_queues);
 }
 
 static void bnx2x_release_firmware(struct bnx2x *bp)
@@ -1240,6 +1240,8 @@  int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
 	bp->state = BNX2X_STATE_OPENING_WAIT4_LOAD;
 
 	rc = bnx2x_set_num_queues(bp);
+	if (rc)
+		return rc;
 
 	if (bnx2x_alloc_mem(bp)) {
 		bnx2x_free_irq(bp, true);