Patchwork [5/6,v2] net/ucc_geth: Assign six threads to Rx for UEC

login
register
mail settings
Submitter Haiying Wang
Date May 1, 2009, 7:40 p.m.
Message ID <1241206851-27749-3-git-send-email-Haiying.Wang@freescale.com>
Download mbox | patch
Permalink /patch/26776/
State Accepted
Commit 674e4f93e2524e5710d5f2081feaedfd08f924a7
Delegated to: Kumar Gala
Headers show

Comments

Haiying Wang - May 1, 2009, 7:40 p.m.
in the case the QE has 46 SNUMs for the threads to support four UCC Ethernet at
1000Base-T simultaneously.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
---
v2 change: Add comments for the Rx threads change.
 drivers/net/ucc_geth.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
Timur Tabi - May 1, 2009, 8:17 p.m.
On Fri, May 1, 2009 at 2:40 PM, Haiying Wang <Haiying.Wang@freescale.com> wrote:
> in the case the QE has 46 SNUMs for the threads to support four UCC Ethernet at
> 1000Base-T simultaneously.
>
> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>

Acked-by: Timur Tabi <timur@freescale.com>

FYI, this should have been cross-posted to the netdev mailing list.
Kumar Gala - May 1, 2009, 9:56 p.m.
On May 1, 2009, at 2:40 PM, Haiying Wang wrote:

> in the case the QE has 46 SNUMs for the threads to support four UCC  
> Ethernet at
> 1000Base-T simultaneously.
>
> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
> ---
> v2 change: Add comments for the Rx threads change.
> drivers/net/ucc_geth.c |   10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)

Dave,

One more patch for you to Ack and let me handle via the powerpc tree  
because of dependencies.

- k

>
>
> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
> index 44f8392..1cb2710 100644
> --- a/drivers/net/ucc_geth.c
> +++ b/drivers/net/ucc_geth.c
> @@ -3702,7 +3702,15 @@ static int ucc_geth_probe(struct of_device*  
> ofdev, const struct of_device_id *ma
> 		ug_info->uf_info.utfet = UCC_GETH_UTFET_GIGA_INIT;
> 		ug_info->uf_info.utftt = UCC_GETH_UTFTT_GIGA_INIT;
> 		ug_info->numThreadsTx = UCC_GETH_NUM_OF_THREADS_4;
> -		ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4;
> +
> +		/* If QE's snum number is 46 which means we need to support
> +		 * 4 UECs at 1000Base-T simultaneously, we need to allocate
> +		 * more Threads to Rx.
> +		 */
> +		if (qe_get_num_of_snums() == 46)
> +			ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_6;
> +		else
> +			ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4;
> 	}
>
> 	if (netif_msg_probe(&debug))
> -- 
> 1.6.0.2
David Miller - May 1, 2009, 10:03 p.m.
From: Kumar Gala <galak@kernel.crashing.org>
Date: Fri, 1 May 2009 16:56:19 -0500

> 
> On May 1, 2009, at 2:40 PM, Haiying Wang wrote:
> 
>> in the case the QE has 46 SNUMs for the threads to support four UCC
>> Ethernet at
>> 1000Base-T simultaneously.
>>
>> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
>> ---
>> v2 change: Add comments for the Rx threads change.
>> drivers/net/ucc_geth.c |   10 +++++++++-
>> 1 files changed, 9 insertions(+), 1 deletions(-)
> 
> Dave,
> 
> One more patch for you to Ack and let me handle via the powerpc tree
> because of dependencies.

Acked-by: David S. Miller <davem@davemloft.net>
Kumar Gala - May 1, 2009, 10:12 p.m.
On May 1, 2009, at 2:40 PM, Haiying Wang wrote:

> in the case the QE has 46 SNUMs for the threads to support four UCC  
> Ethernet at
> 1000Base-T simultaneously.
>
> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
> ---
> v2 change: Add comments for the Rx threads change.
> drivers/net/ucc_geth.c |   10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)

applied to next

- k

Patch

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 44f8392..1cb2710 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3702,7 +3702,15 @@  static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
 		ug_info->uf_info.utfet = UCC_GETH_UTFET_GIGA_INIT;
 		ug_info->uf_info.utftt = UCC_GETH_UTFTT_GIGA_INIT;
 		ug_info->numThreadsTx = UCC_GETH_NUM_OF_THREADS_4;
-		ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4;
+
+		/* If QE's snum number is 46 which means we need to support
+		 * 4 UECs at 1000Base-T simultaneously, we need to allocate
+		 * more Threads to Rx.
+		 */
+		if (qe_get_num_of_snums() == 46)
+			ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_6;
+		else
+			ug_info->numThreadsRx = UCC_GETH_NUM_OF_THREADS_4;
 	}
 
 	if (netif_msg_probe(&debug))