event/cnxk: fix incorrect return value

Message ID 20220518140411.5284-1-pbhagavatula@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series event/cnxk: fix incorrect return value |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Pavan Nikhilesh Bhagavatula May 18, 2022, 2:04 p.m. UTC
  From: Pavan Nikhilesh <pbhagavatula@marvell.com>

The `rte_event_eth_tx_adapter_enqueue()` function expects driver layer
to return the total number of events successfully transmitted.
Fix cn10k driver returning the number of packets transmitted in a
event vector instead of number of events.

Fixes: 761a321acf91 ("event/cnxk: support vectorized Tx event fast path")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/cnxk/cn10k_worker.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jerin Jacob June 13, 2022, 5:57 a.m. UTC | #1
On Wed, May 18, 2022 at 7:34 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> The `rte_event_eth_tx_adapter_enqueue()` function expects driver layer
> to return the total number of events successfully transmitted.
> Fix cn10k driver returning the number of packets transmitted in a
> event vector instead of number of events.
>
> Fixes: 761a321acf91 ("event/cnxk: support vectorized Tx event fast path")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Applied to dpdk-next-net-eventdev/for-main. Thanks


> ---
>  drivers/event/cnxk/cn10k_worker.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
> index 034f508dd8..0915f404e0 100644
> --- a/drivers/event/cnxk/cn10k_worker.h
> +++ b/drivers/event/cnxk/cn10k_worker.h
> @@ -651,7 +651,7 @@ cn10k_sso_hws_event_tx(struct cn10k_sso_hws *ws, struct rte_event *ev,
>                 }
>                 rte_mempool_put(rte_mempool_from_obj(ev->vec), ev->vec);
>                 rte_prefetch0(ws);
> -               return (meta & 0xFFFF);
> +               return 1;
>         }
>
>         m = ev->mbuf;
> --
> 2.25.1
>
  

Patch

diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
index 034f508dd8..0915f404e0 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -651,7 +651,7 @@  cn10k_sso_hws_event_tx(struct cn10k_sso_hws *ws, struct rte_event *ev,
 		}
 		rte_mempool_put(rte_mempool_from_obj(ev->vec), ev->vec);
 		rte_prefetch0(ws);
-		return (meta & 0xFFFF);
+		return 1;
 	}
 
 	m = ev->mbuf;