[v3] examples/vmdq: fix the output of pools/queues
diff mbox series

Message ID 20200302064121.60561-1-junyux.jiang@intel.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • [v3] examples/vmdq: fix the output of pools/queues
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/checkpatch success coding style OK

Commit Message

Junyu Jiang March 2, 2020, 6:41 a.m. UTC
To match the pools/queues configuration, the pools/queues output
should start from VMDQ base queue. This patch fixed the issue.

Fixes: 6bb97df521aa ("examples/vmdq: new app")
Cc: stable@dpdk.org

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 examples/vmdq/main.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Xiaoyun Li March 2, 2020, 7:19 a.m. UTC | #1
Hi
> -----Original Message-----
> From: Jiang, JunyuX
> Sent: Monday, March 2, 2020 14:41
> To: dev@dpdk.org
> Cc: Li, Xiaoyun <xiaoyun.li@intel.com>; Yang, Qiming <qiming.yang@intel.com>;
> Jiang, JunyuX <junyux.jiang@intel.com>; stable@dpdk.org
> Subject: [PATCH v3] examples/vmdq: fix the output of pools/queues
> 
> To match the pools/queues configuration, the pools/queues output should start
> from VMDQ base queue. This patch fixed the issue.
> 
> Fixes: 6bb97df521aa ("examples/vmdq: new app")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> ---
>  examples/vmdq/main.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index
> 011110920..5ab3427c0 100644
> --- a/examples/vmdq/main.c
> +++ b/examples/vmdq/main.c
> @@ -441,10 +441,11 @@ update_mac_address(struct rte_mbuf *m, unsigned
> dst_port)  static void  sighup_handler(int signum)  {
> -	unsigned q;
> -	for (q = 0; q < num_queues; q++) {
> -		if (q % (num_queues/num_pools) == 0)
> -			printf("\nPool %u: ", q/(num_queues/num_pools));
> +	unsigned int q = vmdq_queue_base;
> +	for (; q < num_queues; q++) {
> +		if ((q - vmdq_queue_base) % (num_vmdq_queues / num_pools)
> == 0)
> +			printf("\nPool %u: ", (q - vmdq_queue_base) /
> +			       (num_vmdq_queues / num_pools));
>  		printf("%lu ", rxPackets[q]);
>  	}
>  	printf("\nFinished handling signal %d\n", signum);
> --
> 2.17.1

Acked-by: Xiaoyun Li <Xiaoyun.li@intel.com>
Han, YingyaX March 30, 2020, 2:21 a.m. UTC | #2
Tested-by: Han,YingyaX <yingyax.han@intel.com>

BRs,
Yingya
-----Original Message-----
From: stable <stable-bounces@dpdk.org> On Behalf Of Li, Xiaoyun
Sent: Monday, March 2, 2020 3:19 PM
To: Jiang, JunyuX <junyux.jiang@intel.com>; dev@dpdk.org
Cc: Yang, Qiming <qiming.yang@intel.com>; stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH v3] examples/vmdq: fix the output of pools/queues

Hi
> -----Original Message-----
> From: Jiang, JunyuX
> Sent: Monday, March 2, 2020 14:41
> To: dev@dpdk.org
> Cc: Li, Xiaoyun <xiaoyun.li@intel.com>; Yang, Qiming 
> <qiming.yang@intel.com>; Jiang, JunyuX <junyux.jiang@intel.com>; 
> stable@dpdk.org
> Subject: [PATCH v3] examples/vmdq: fix the output of pools/queues
> 
> To match the pools/queues configuration, the pools/queues output 
> should start from VMDQ base queue. This patch fixed the issue.
> 
> Fixes: 6bb97df521aa ("examples/vmdq: new app")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
> ---
>  examples/vmdq/main.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index
> 011110920..5ab3427c0 100644
> --- a/examples/vmdq/main.c
> +++ b/examples/vmdq/main.c
> @@ -441,10 +441,11 @@ update_mac_address(struct rte_mbuf *m, unsigned
> dst_port)  static void  sighup_handler(int signum)  {
> -	unsigned q;
> -	for (q = 0; q < num_queues; q++) {
> -		if (q % (num_queues/num_pools) == 0)
> -			printf("\nPool %u: ", q/(num_queues/num_pools));
> +	unsigned int q = vmdq_queue_base;
> +	for (; q < num_queues; q++) {
> +		if ((q - vmdq_queue_base) % (num_vmdq_queues / num_pools)
> == 0)
> +			printf("\nPool %u: ", (q - vmdq_queue_base) /
> +			       (num_vmdq_queues / num_pools));
>  		printf("%lu ", rxPackets[q]);
>  	}
>  	printf("\nFinished handling signal %d\n", signum);
> --
> 2.17.1

Acked-by: Xiaoyun Li <Xiaoyun.li@intel.com>
Ferruh Yigit March 31, 2020, 2:35 p.m. UTC | #3
On 3/30/2020 3:21 AM, Han, YingyaX wrote:
> Tested-by: Han,YingyaX <yingyax.han@intel.com>
> 
> BRs,
> Yingya
> -----Original Message-----
> From: stable <stable-bounces@dpdk.org> On Behalf Of Li, Xiaoyun
> Sent: Monday, March 2, 2020 3:19 PM
> To: Jiang, JunyuX <junyux.jiang@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; stable@dpdk.org
> Subject: Re: [dpdk-stable] [PATCH v3] examples/vmdq: fix the output of pools/queues
> 
> Hi
>> -----Original Message-----
>> From: Jiang, JunyuX
>> Sent: Monday, March 2, 2020 14:41
>> To: dev@dpdk.org
>> Cc: Li, Xiaoyun <xiaoyun.li@intel.com>; Yang, Qiming 
>> <qiming.yang@intel.com>; Jiang, JunyuX <junyux.jiang@intel.com>; 
>> stable@dpdk.org
>> Subject: [PATCH v3] examples/vmdq: fix the output of pools/queues
>>
>> To match the pools/queues configuration, the pools/queues output 
>> should start from VMDQ base queue. This patch fixed the issue.
>>
>> Fixes: 6bb97df521aa ("examples/vmdq: new app")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
>> ---
>>  examples/vmdq/main.c | 9 +++++----
>>  1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index
>> 011110920..5ab3427c0 100644
>> --- a/examples/vmdq/main.c
>> +++ b/examples/vmdq/main.c
>> @@ -441,10 +441,11 @@ update_mac_address(struct rte_mbuf *m, unsigned
>> dst_port)  static void  sighup_handler(int signum)  {
>> -	unsigned q;
>> -	for (q = 0; q < num_queues; q++) {
>> -		if (q % (num_queues/num_pools) == 0)
>> -			printf("\nPool %u: ", q/(num_queues/num_pools));
>> +	unsigned int q = vmdq_queue_base;
>> +	for (; q < num_queues; q++) {
>> +		if ((q - vmdq_queue_base) % (num_vmdq_queues / num_pools)
>> == 0)
>> +			printf("\nPool %u: ", (q - vmdq_queue_base) /
>> +			       (num_vmdq_queues / num_pools));
>>  		printf("%lu ", rxPackets[q]);
>>  	}
>>  	printf("\nFinished handling signal %d\n", signum);
>> --
>> 2.17.1
> 
> Acked-by: Xiaoyun Li <Xiaoyun.li@intel.com>
> 

Applied to dpdk-next-net/master, thanks.

Patch
diff mbox series

diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 011110920..5ab3427c0 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -441,10 +441,11 @@  update_mac_address(struct rte_mbuf *m, unsigned dst_port)
 static void
 sighup_handler(int signum)
 {
-	unsigned q;
-	for (q = 0; q < num_queues; q++) {
-		if (q % (num_queues/num_pools) == 0)
-			printf("\nPool %u: ", q/(num_queues/num_pools));
+	unsigned int q = vmdq_queue_base;
+	for (; q < num_queues; q++) {
+		if ((q - vmdq_queue_base) % (num_vmdq_queues / num_pools) == 0)
+			printf("\nPool %u: ", (q - vmdq_queue_base) /
+			       (num_vmdq_queues / num_pools));
 		printf("%lu ", rxPackets[q]);
 	}
 	printf("\nFinished handling signal %d\n", signum);