[v2] examples/vmdq: fix the output of pools/queues
Checks
Commit Message
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
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Junyu Jiang
> Sent: Wednesday, February 26, 2020 16:35
> To: dev@dpdk.org
> Cc: Li, Xiaoyun <xiaoyun.li@intel.com>; Jiang, JunyuX
> <junyux.jiang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] 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..dcba3a708 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 % (num_vmdq_queues / num_pools) == 0)
What's the different between num_vmdq_queues and num_queues?
> + 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
Hi
> -----Original Message-----
> From: Jiang, JunyuX
> Sent: Wednesday, February 26, 2020 16:35
> To: dev@dpdk.org
> Cc: Li, Xiaoyun <xiaoyun.li@intel.com>; Jiang, JunyuX <junyux.jiang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v2] 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..dcba3a708 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 % (num_vmdq_queues / num_pools) == 0)
In your logic, this should be 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
@@ -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 % (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);