From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Rafał Kozik" <rk@semihalf.com>,
"Thomas Monjalon" <thomas@monjalon.net>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>
Cc: dev <dev@dpdk.org>, "Marcin Wojtas" <mw@semihalf.com>,
"Michał Krawczyk" <mk@semihalf.com>,
"Tzalik, Guy" <gtzalik@amazon.com>,
"Schmeilin, Evgeny" <evgenys@amazon.com>,
"Matushevsky, Alexander" <matua@amazon.com>,
"Chauskin, Igor" <igorch@amazon.com>
Subject: Re: [dpdk-dev] [PATCH][pktgen] fix repopulation of tx_mbufs table
Date: Fri, 14 Dec 2018 15:45:01 +0000 [thread overview]
Message-ID: <7E4EC658-807D-43FB-9622-4B72A13C1CE0@intel.com> (raw)
In-Reply-To: <15FDA5E7-5A45-4ACF-83B5-55328BA117EB@intel.com>
> On Dec 14, 2018, at 9:29 AM, Wiles, Keith <keith.wiles@intel.com> wrote:
>
>
>
>> On Dec 14, 2018, at 5:26 AM, Rafał Kozik <rk@semihalf.com> wrote:
>>
>> Hello Keith,
>>
>> as from my last post passed about three weeks I would kindly ask
>> if you could provide any comments about this patch?
>
> Missed this patch originally as it did not have pktgen on the status line.
>
> Can you give more details as to how to reproduce the failure?
I can not find your patch in patchwork, does anyone know why?
>>
>> Best regards,
>> Rafal Kozik
>>
>> pt., 23 lis 2018 o 09:23 Rafal Kozik <rk@semihalf.com> napisał(a):
>>>
>>> If in one TX cycle NIC does not send any packet, pktgen tries
>>> to allocate 0 mbufs from pool. In such case DPDK return error
>>> and packets will not be send. As no packet will be send in
>>> next iteration this situation will repeat.
>>>
>>> Checking if taking more mbufs is needed will prevent this situation.
>>>
>>> Fixes: f034b381d19f ("cleanup and fix for FVL NIC performance")
>>>
>>> Signed-off-by: Rafal Kozik <rk@semihalf.com>
>>> ---
>>> app/pktgen.c | 6 ++++--
>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/app/pktgen.c b/app/pktgen.c
>>> index 2d9ff59..b4d3dfe 100644
>>> --- a/app/pktgen.c
>>> +++ b/app/pktgen.c
>>> @@ -1054,7 +1054,8 @@ pktgen_send_pkts(port_info_t *info, uint16_t qid, struct rte_mempool *mp)
>>> uint16_t saved = info->q[qid].tx_mbufs.len;
>>> uint16_t nb_pkts = info->tx_burst - saved;
>>>
>>> - rc = pg_pktmbuf_alloc_bulk(mp,
>>> + if (likely(nb_pkts > 0))
>>> + rc = pg_pktmbuf_alloc_bulk(mp,
>>> &info->q[qid].tx_mbufs.m_table[saved],
>>> nb_pkts);
>>> if (rc == 0) {
>>> @@ -1070,7 +1071,8 @@ pktgen_send_pkts(port_info_t *info, uint16_t qid, struct rte_mempool *mp)
>>> uint16_t saved = info->q[qid].tx_mbufs.len;
>>> uint16_t nb_pkts = txCnt - saved;
>>>
>>> - rc = pg_pktmbuf_alloc_bulk(mp,
>>> + if (likely(nb_pkts > 0))
>>> + rc = pg_pktmbuf_alloc_bulk(mp,
>>> &info->q[qid].tx_mbufs.m_table[saved],
>>> nb_pkts);
>>> if (rc == 0) {
>>> --
>>> 2.7.4
>>>
>
> Regards,
> Keith
Regards,
Keith
next prev parent reply other threads:[~2018-12-14 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-23 8:23 [dpdk-dev] [PATCH] " Rafal Kozik
2018-12-14 11:26 ` [dpdk-dev] [PATCH][pktgen] " Rafał Kozik
2018-12-14 15:29 ` Wiles, Keith
2018-12-14 15:45 ` Wiles, Keith [this message]
2018-12-14 15:48 ` Rafał Kozik
2018-12-14 15:52 ` Wiles, Keith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7E4EC658-807D-43FB-9622-4B72A13C1CE0@intel.com \
--to=keith.wiles@intel.com \
--cc=dev@dpdk.org \
--cc=evgenys@amazon.com \
--cc=ferruh.yigit@intel.com \
--cc=gtzalik@amazon.com \
--cc=igorch@amazon.com \
--cc=matua@amazon.com \
--cc=mk@semihalf.com \
--cc=mw@semihalf.com \
--cc=rk@semihalf.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).