Skip to content

Commit

Permalink
net/dpaa: check multi-segment external buffers
Browse files Browse the repository at this point in the history
[ upstream commit 8299042 ]

This patch add check to return error as the handling
for external buffer packets with SG is currently missing.

Fixes: 37f9b54 ("net/dpaa: support Tx and Rx queue setup")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  • Loading branch information
hemantagr authored and kevintraynor committed Aug 28, 2019
1 parent 93606ec commit c4b686e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/net/dpaa/dpaa_rxtx.c
Expand Up @@ -952,6 +952,16 @@ dpaa_eth_queue_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
goto send_pkts;
}
} else {
/* TODO not supporting sg for external bufs*/
if (unlikely(mbuf->nb_segs > 1)) {
/* Set frames_to_send & nb_bufs so
* that packets are transmitted till
* previous frame.
*/
frames_to_send = loop;
nb_bufs = loop;
goto send_pkts;
}
state = tx_on_external_pool(q, mbuf,
&fd_arr[loop]);
if (unlikely(state)) {
Expand Down

0 comments on commit c4b686e

Please sign in to comment.