DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/dpaa2: enable Tx congestion state check
@ 2017-07-24  7:31 Hemant Agrawal
  2017-07-24  7:31 ` [dpdk-dev] [PATCH] crypto/dpaa2_sec: reduce init log prints Hemant Agrawal
  2017-07-30 18:45 ` [dpdk-dev] [PATCH] net/dpaa2: enable Tx congestion state check Thomas Monjalon
  0 siblings, 2 replies; 4+ messages in thread
From: Hemant Agrawal @ 2017-07-24  7:31 UTC (permalink / raw)
  To: dev; +Cc: Nipun Gupta

For larger packet size congestion is observed on Tx Queues.
This patch enables Tx Queue congestion state check support.
If congested, try to resend the packet few times.

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.h |  4 +++-
 drivers/net/dpaa2/dpaa2_rxtx.c   | 11 ++++++++---
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index c662505..429b3a0 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -488,7 +488,7 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	}
 	dpaa2_q->tc_index = tc_id;
 
-	if (priv->flags & DPAA2_TX_CGR_SUPPORT) {
+	if (!(priv->flags & DPAA2_TX_CGR_OFF)) {
 		struct dpni_congestion_notification_cfg cong_notif_cfg;
 
 		cong_notif_cfg.units = DPNI_CONGESTION_UNIT_FRAMES;
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index ea7c0db..a2902da 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -55,6 +55,8 @@
  */
 #define CONG_EXIT_TX_THRESHOLD    480
 
+#define CONG_RETRY_COUNT 18000
+
 /* RX queue tail drop threshold
  * currently considering 32 KB packets
  */
@@ -66,7 +68,7 @@
 /* Enable TX Congestion control support
  * default is disable
  */
-#define DPAA2_TX_CGR_SUPPORT	0x01
+#define DPAA2_TX_CGR_OFF	0x01
 
 /* Disable RX tail drop, default is enable */
 #define DPAA2_RX_TAILDROP_OFF	0x04
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 3db91d8..3c057a3 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -524,7 +524,7 @@ uint16_t
 dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 {
 	/* Function to transmit the frames to given device and VQ*/
-	uint32_t loop;
+	uint32_t loop, retry_count;
 	int32_t ret;
 	struct qbman_fd fd_arr[MAX_TX_RING_SLOTS];
 	struct rte_mbuf *mi;
@@ -559,8 +559,13 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	/*Clear the unused FD fields before sending*/
 	while (nb_pkts) {
 		/*Check if the queue is congested*/
-		if (qbman_result_SCN_state_in_mem(dpaa2_q->cscn))
-			goto skip_tx;
+		retry_count = 0;
+		if (qbman_result_SCN_state_in_mem(dpaa2_q->cscn)) {
+			retry_count++;
+			/* Retry for some time before giving up */
+			if (retry_count > CONG_RETRY_COUNT)
+				goto skip_tx;
+		}
 
 		frames_to_send = (nb_pkts >> 3) ? MAX_TX_RING_SLOTS : nb_pkts;
 
-- 
2.7.4

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

* [dpdk-dev] [PATCH] crypto/dpaa2_sec: reduce init log prints
  2017-07-24  7:31 [dpdk-dev] [PATCH] net/dpaa2: enable Tx congestion state check Hemant Agrawal
@ 2017-07-24  7:31 ` Hemant Agrawal
  2017-07-27  7:28   ` De Lara Guarch, Pablo
  2017-07-30 18:45 ` [dpdk-dev] [PATCH] net/dpaa2: enable Tx congestion state check Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Hemant Agrawal @ 2017-07-24  7:31 UTC (permalink / raw)
  To: dev; +Cc: Shreyansh Jain

From: Shreyansh Jain <shreyansh.jain@nxp.com>

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index f422937..03f5050 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1912,9 +1912,7 @@ dpaa2_sec_dev_init(struct rte_cryptodev *cryptodev)
 	if (!internals->fle_pool) {
 		RTE_LOG(ERR, PMD, "%s create failed\n", str);
 		goto init_error;
-	} else
-		RTE_LOG(INFO, PMD, "%s created: %p\n", str,
-				internals->fle_pool);
+	}
 
 	PMD_INIT_LOG(DEBUG, "driver %s: created\n", cryptodev->data->name);
 	return 0;
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] crypto/dpaa2_sec: reduce init log prints
  2017-07-24  7:31 ` [dpdk-dev] [PATCH] crypto/dpaa2_sec: reduce init log prints Hemant Agrawal
@ 2017-07-27  7:28   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-27  7:28 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: Shreyansh Jain



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Hemant Agrawal
> Sent: Monday, July 24, 2017 8:32 AM
> To: dev@dpdk.org
> Cc: Shreyansh Jain <shreyansh.jain@nxp.com>
> Subject: [dpdk-dev] [PATCH] crypto/dpaa2_sec: reduce init log prints
> 
> From: Shreyansh Jain <shreyansh.jain@nxp.com>
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

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

* Re: [dpdk-dev] [PATCH] net/dpaa2: enable Tx congestion state check
  2017-07-24  7:31 [dpdk-dev] [PATCH] net/dpaa2: enable Tx congestion state check Hemant Agrawal
  2017-07-24  7:31 ` [dpdk-dev] [PATCH] crypto/dpaa2_sec: reduce init log prints Hemant Agrawal
@ 2017-07-30 18:45 ` Thomas Monjalon
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-07-30 18:45 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dev, Nipun Gupta

24/07/2017 09:31, Hemant Agrawal:
> For larger packet size congestion is observed on Tx Queues.
> This patch enables Tx Queue congestion state check support.
> If congested, try to resend the packet few times.
> 
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Applied, thanks

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

end of thread, other threads:[~2017-07-30 18:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-24  7:31 [dpdk-dev] [PATCH] net/dpaa2: enable Tx congestion state check Hemant Agrawal
2017-07-24  7:31 ` [dpdk-dev] [PATCH] crypto/dpaa2_sec: reduce init log prints Hemant Agrawal
2017-07-27  7:28   ` De Lara Guarch, Pablo
2017-07-30 18:45 ` [dpdk-dev] [PATCH] net/dpaa2: enable Tx congestion state check Thomas Monjalon

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