[dpdk-dev] [PATCH] examples/qos_sched: fix flow pause after 2M packets

Dumitrescu, Cristian cristian.dumitrescu at intel.com
Thu Jul 3 12:55:32 CEST 2014


Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>

-----Original Message-----
From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yong Liu
Sent: Thursday, July 3, 2014 10:00 AM
To: dev at dpdk.org
Subject: [dpdk-dev] [PATCH] examples/qos_sched: fix flow pause after 2M packets

    After enable vector pmd, qos_sched only send 32 packets every burst.
    That will cause some packets not transmitted and therefore mempool
    will be drain after a while.
    App qos_sched now will re-send the packets which failed to send out in 
    previous tx function.

Signed-off-by: Yong Liu <yong.liu at intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
Tested-by: Waterman Cao <waterman.cao at intel.com>
---
 examples/qos_sched/app_thread.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c
index 7501147..59c4014 100755
--- a/examples/qos_sched/app_thread.c
+++ b/examples/qos_sched/app_thread.c
@@ -139,17 +139,11 @@ app_send_burst(struct thread_conf *qconf)
 
 	do {
 		ret = rte_eth_tx_burst(qconf->tx_port, qconf->tx_queue, mbufs, (uint16_t)n);
-		if (unlikely(ret < n)) { /* we cannot drop the packets, so re-send */
-			/* update number of packets to be sent */
-			n -= ret;
-			mbufs = (struct rte_mbuf **)&mbufs[ret];
-			/* limit number of retries to avoid endless loop */
-			/* reset retry counter if some packets were sent */
-			if (likely(ret != 0)) {
-				continue;
-			}
-		}
-	} while (ret != n);
+		/* we cannot drop the packets, so re-send */
+		/* update number of packets to be sent */
+		n -= ret;
+		mbufs = (struct rte_mbuf **)&mbufs[ret];
+	} while (n);
 }
 
 
-- 
1.7.7.6

--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.




More information about the dev mailing list