patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/2] net/dpaa: fix to add SG check for ext bufs pkts
@ 2019-07-19 10:06 Hemant Agrawal
  2019-07-19 10:06 ` [dpdk-stable] [PATCH 2/2] net/dpaa2: fix the ctrl bits in Tx SG FD Hemant Agrawal
  2019-07-22 14:41 ` [dpdk-stable] [PATCH 1/2] net/dpaa: fix to add SG check for ext bufs pkts Ferruh Yigit
  0 siblings, 2 replies; 3+ messages in thread
From: Hemant Agrawal @ 2019-07-19 10:06 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: stable

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

Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index f16b7e0bc..30b183607 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -957,6 +957,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)) {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-stable] [PATCH 2/2] net/dpaa2: fix the ctrl bits in Tx SG FD
  2019-07-19 10:06 [dpdk-stable] [PATCH 1/2] net/dpaa: fix to add SG check for ext bufs pkts Hemant Agrawal
@ 2019-07-19 10:06 ` Hemant Agrawal
  2019-07-22 14:41 ` [dpdk-stable] [PATCH 1/2] net/dpaa: fix to add SG check for ext bufs pkts Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Hemant Agrawal @ 2019-07-19 10:06 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: Nipun Gupta, stable

From: Nipun Gupta <nipun.gupta@nxp.com>

This patch resets frc and ctrl in sg tx fd to avoid corruption.

Fixes: 774e9ea91992 ("net/dpaa2: add support for multi seg buffers")
Cc: stable@dpdk.org

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 1 +
 drivers/net/dpaa2/dpaa2_rxtx.c          | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 92fc76211..8644761db 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -229,6 +229,7 @@ enum qbman_fd_format {
 	((fd)->simple.frc = (0x80000000 | (len)))
 #define DPAA2_GET_FD_FRC_PARSE_SUM(fd)	\
 			((uint16_t)(((fd)->simple.frc & 0xffff0000) >> 16))
+#define DPAA2_RESET_FD_FRC(fd)		((fd)->simple.frc = 0)
 #define DPAA2_SET_FD_FRC(fd, _frc)	((fd)->simple.frc = _frc)
 #define DPAA2_RESET_FD_CTRL(fd)	 ((fd)->simple.ctrl = 0)
 
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index c6e50123c..6ca5071e0 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -370,8 +370,9 @@ eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf,
 	DPAA2_SET_FD_LEN(fd, mbuf->pkt_len);
 	DPAA2_SET_ONLY_FD_BPID(fd, bpid);
 	DPAA2_SET_FD_OFFSET(fd, temp->data_off);
-	DPAA2_SET_FD_ASAL(fd, DPAA2_ASAL_VAL);
 	DPAA2_FD_SET_FORMAT(fd, qbman_fd_sg);
+	DPAA2_RESET_FD_FRC(fd);
+	DPAA2_RESET_FD_CTRL(fd);
 	/*Set Scatter gather table and Scatter gather entries*/
 	sgt = (struct qbman_sge *)(
 			(size_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd))
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH 1/2] net/dpaa: fix to add SG check for ext bufs pkts
  2019-07-19 10:06 [dpdk-stable] [PATCH 1/2] net/dpaa: fix to add SG check for ext bufs pkts Hemant Agrawal
  2019-07-19 10:06 ` [dpdk-stable] [PATCH 2/2] net/dpaa2: fix the ctrl bits in Tx SG FD Hemant Agrawal
@ 2019-07-22 14:41 ` Ferruh Yigit
  1 sibling, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-07-22 14:41 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: stable

On 7/19/2019 11:06 AM, Hemant Agrawal wrote:
> This patch add check to return error as the handling
> for external buffer packets with SG is currently missing.
> 
> Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-22 14:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 10:06 [dpdk-stable] [PATCH 1/2] net/dpaa: fix to add SG check for ext bufs pkts Hemant Agrawal
2019-07-19 10:06 ` [dpdk-stable] [PATCH 2/2] net/dpaa2: fix the ctrl bits in Tx SG FD Hemant Agrawal
2019-07-22 14:41 ` [dpdk-stable] [PATCH 1/2] net/dpaa: fix to add SG check for ext bufs pkts Ferruh Yigit

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).