* [PATCH] examples/qos_sched: fix flow pause after 2M packets @ 2014-07-03 8:59 Yong Liu [not found] ` <1404377976-9231-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Yong Liu @ 2014-07-03 8:59 UTC (permalink / raw) To: dev-VfR2kkLFssw 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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Acked-by: Cristian Dumitrescu <cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Tested-by: Waterman Cao <waterman.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> --- 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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1404377976-9231-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] examples/qos_sched: fix flow pause after 2M packets [not found] ` <1404377976-9231-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2014-07-03 10:07 ` Xie, Huawei [not found] ` <C37D651A908B024F974696C65296B57B0F2283B0-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> 2014-07-03 10:55 ` Dumitrescu, Cristian 2014-07-03 14:43 ` Thomas Monjalon 2 siblings, 1 reply; 5+ messages in thread From: Xie, Huawei @ 2014-07-03 10:07 UTC (permalink / raw) To: Liu, Yong, dev-VfR2kkLFssw@public.gmane.org > -----Original Message----- > From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Yong Liu > Sent: Thursday, July 03, 2014 5:00 PM > To: dev-VfR2kkLFssw@public.gmane.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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Acked-by: Cristian Dumitrescu <cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Tested-by: Waterman Cao <waterman.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > --- > 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 How about "mbufs += ret" rather than "mbufs = (struct rte_mbuf **)&mbufs[ret]"? ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <C37D651A908B024F974696C65296B57B0F2283B0-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: [PATCH] examples/qos_sched: fix flow pause after 2M packets [not found] ` <C37D651A908B024F974696C65296B57B0F2283B0-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> @ 2014-07-03 10:54 ` Dumitrescu, Cristian 0 siblings, 0 replies; 5+ messages in thread From: Dumitrescu, Cristian @ 2014-07-03 10:54 UTC (permalink / raw) To: Xie, Huawei, Liu, Yong, dev-VfR2kkLFssw@public.gmane.org >>How about "mbufs += ret" rather than "mbufs = (struct rte_mbuf **)&mbufs[ret]"? Functionally it is the same, but "mbufs = (struct rte_mbuf **)&mbufs[ret]" is likely less prone to compiler warnings, so my vote is to keep it as it is and get this patch integrated asap into 1.7. Regards, Cristian -------------------------------------------------------------- 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] examples/qos_sched: fix flow pause after 2M packets [not found] ` <1404377976-9231-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2014-07-03 10:07 ` Xie, Huawei @ 2014-07-03 10:55 ` Dumitrescu, Cristian 2014-07-03 14:43 ` Thomas Monjalon 2 siblings, 0 replies; 5+ messages in thread From: Dumitrescu, Cristian @ 2014-07-03 10:55 UTC (permalink / raw) To: Liu, Yong, dev-VfR2kkLFssw@public.gmane.org Acked-by: Cristian Dumitrescu <cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> -----Original Message----- From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Yong Liu Sent: Thursday, July 3, 2014 10:00 AM To: dev-VfR2kkLFssw@public.gmane.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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Acked-by: Cristian Dumitrescu <cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Tested-by: Waterman Cao <waterman.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> --- 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. ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] examples/qos_sched: fix flow pause after 2M packets [not found] ` <1404377976-9231-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2014-07-03 10:07 ` Xie, Huawei 2014-07-03 10:55 ` Dumitrescu, Cristian @ 2014-07-03 14:43 ` Thomas Monjalon 2 siblings, 0 replies; 5+ messages in thread From: Thomas Monjalon @ 2014-07-03 14:43 UTC (permalink / raw) To: Yong Liu; +Cc: dev-VfR2kkLFssw 2014-07-03 16:59, Yong Liu: > 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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Acked-by: Cristian Dumitrescu <cristian.dumitrescu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > Tested-by: Waterman Cao <waterman.cao-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Applied for version 1.7.0 as it was a blocker for vectorized ixgbe + QoS. -- Thomas ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-03 14:43 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-07-03 8:59 [PATCH] examples/qos_sched: fix flow pause after 2M packets Yong Liu [not found] ` <1404377976-9231-1-git-send-email-yong.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 2014-07-03 10:07 ` Xie, Huawei [not found] ` <C37D651A908B024F974696C65296B57B0F2283B0-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> 2014-07-03 10:54 ` Dumitrescu, Cristian 2014-07-03 10:55 ` Dumitrescu, Cristian 2014-07-03 14:43 ` 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).