From: Harman Kalra Date: Fri, 15 May 2020 11:21:24 +0000 (+0530) Subject: event/octeontx: fix memory corruption X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=50ea81d24c94203f103bd252167a645b47e0257f;p=dpdk.git event/octeontx: fix memory corruption Since PMD enqueues a single event at a time, fixing the issue by passing 1 rather than nb_events to avoid any out of bound access as reported by coverity. Coverity issue: 358447 Fixes: 56a96aa42464 ("event/octeontx: add framework for Rx/Tx offloads") Cc: stable@dpdk.org Signed-off-by: Harman Kalra Acked-by: Jerin Jacob --- diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c index d2d5eea8f1..18b7926e8c 100644 --- a/drivers/event/octeontx/ssovf_worker.c +++ b/drivers/event/octeontx/ssovf_worker.c @@ -282,6 +282,7 @@ __sso_event_tx_adapter_enqueue(void *port, struct rte_event ev[], struct ssows *ws = port; struct octeontx_txq *txq; + RTE_SET_USED(nb_events); switch (ev->sched_type) { case SSO_SYNC_ORDERED: ssows_swtag_norm(ws, ev->event, SSO_SYNC_ATOMIC); @@ -305,7 +306,7 @@ __sso_event_tx_adapter_enqueue(void *port, struct rte_event ev[], ethdev = &rte_eth_devices[port_id]; txq = ethdev->data->tx_queues[queue_id]; - return __octeontx_xmit_pkts(txq, &m, nb_events, cmd, flag); + return __octeontx_xmit_pkts(txq, &m, 1, cmd, flag); } #define T(name, f3, f2, f1, f0, sz, flags) \