* [dpdk-dev] [PATCH] event/octeontx: fix memory corruption
@ 2020-05-15 11:21 Harman Kalra
2020-05-15 14:36 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: Harman Kalra @ 2020-05-15 11:21 UTC (permalink / raw)
To: Jerin Jacob; +Cc: dev, Harman Kalra
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 <hkalra@marvell.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] event/octeontx: fix memory corruption
2020-05-15 11:21 [dpdk-dev] [PATCH] event/octeontx: fix memory corruption Harman Kalra
@ 2020-05-15 14:36 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2020-05-15 14:36 UTC (permalink / raw)
To: Harman Kalra; +Cc: Jerin Jacob, dpdk-dev
On Fri, May 15, 2020 at 4:51 PM Harman Kalra <hkalra@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 <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-15 14:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 11:21 [dpdk-dev] [PATCH] event/octeontx: fix memory corruption Harman Kalra
2020-05-15 14:36 ` Jerin Jacob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).