On Fri, May 15, 2020 at 4:51 PM Harman Kalra <hka...@marvell.com> wrote: > > 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") > > Signed-off-by: Harman Kalra <hka...@marvell.com>
Acked-by: Jerin Jacob <jer...@marvell.com> Applied to dpdk-next-eventdev/master. Thanks. > --- > drivers/event/octeontx/ssovf_worker.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/event/octeontx/ssovf_worker.c > b/drivers/event/octeontx/ssovf_worker.c > index d2d5eea8f..18b7926e8 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) \ > -- > 2.18.0 >