From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by dpdk.org (Postfix) with ESMTP id 55E961B212 for ; Fri, 14 Dec 2018 12:26:30 +0100 (CET) Received: by mail-lf1-f42.google.com with SMTP id f23so3957852lfc.13 for ; Fri, 14 Dec 2018 03:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=THjVJ4fuZvIzubO/mzJ1WnG9PBiD+aTnv/WU7eoJhcs=; b=CEZPwuf7y+GMe+0neIwD8kBW6IXQQHadHZz3d2K1fXiodrH8ow+tFgxPyG6wkx5+CP BN5CgEZhqusPvXXCau5yFWUuuXVwMwKNawl7EmFjOmRVwy3xYp4SFDoY+nzhH1rxeOgT QtsLCzmMvLwUv/FrKkMaa8o94F/Zg4bMVuuzVFgNcy1EOSv0INHKljwbNhw/AU75hjgS ZRM3pAYAU+4PhWWGW8p84JJ0eMXXqFGquHkc85S7OqX0y3xOYeQHJgnYSOAUwZbgI6PK EaD92JU6k5vkEx/px18ViXSYS//RyBRaTCEreWQ5YTfuMn2j28lO9WbXQ2wwzWHMZucg VO+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=THjVJ4fuZvIzubO/mzJ1WnG9PBiD+aTnv/WU7eoJhcs=; b=bcrCFTPhWULGRQOOz1dLt17fMG5T66jdkNlaprQdf3iyDauvZVLirYYpwKpqw+RZQs WGUsxhsAhVHFru5l8kuayUfP2KU8EIu+rG/Z3gxm0WcQmeN3yeqEwku78wcbi1pXUo2v jYAbR1UBlH7k7r4V6pdMhXDRc4/kZnlkHKq4KYWSUXTZxj6Hkg7y4CvzQIR1T0W3he/v Zl9yT5RsYrjRo39+thQxfMAGk0Jj708fW5iioKhWTMVEHOaqkgKkz5e1nwSlT6cmQeK2 6C6WeVPuF7rP+m3GrzNx8KL3uGeVl7wYiMPFUQo1TJWhtWnl+J66RT1VDeBapN4Q9CyU Cbow== X-Gm-Message-State: AA+aEWYe+8qPttXV6zbJcOEaPX7rjCICRgmZTdhCShS5BrbUjwvXIHc0 m+OQqh+aTkgdQ4oeFG+3dFCyrDaXlXCJPovcjWx3gZYAaqY= X-Google-Smtp-Source: AFSGD/WtjpMpu4aSsNPFO2kmUtFk2W6TO1E+9bH2JuidNmg/M1wde00BJRlzeeW9L9h7aivbF03sOXeJq8F7WfBbMtU= X-Received: by 2002:a19:9fcd:: with SMTP id i196mr1575558lfe.82.1544786789283; Fri, 14 Dec 2018 03:26:29 -0800 (PST) MIME-Version: 1.0 References: <1542961382-5234-1-git-send-email-rk@semihalf.com> In-Reply-To: <1542961382-5234-1-git-send-email-rk@semihalf.com> From: =?UTF-8?B?UmFmYcWCIEtvemlr?= Date: Fri, 14 Dec 2018 12:26:18 +0100 Message-ID: To: dev@dpdk.org, keith.wiles@intel.com Cc: Marcin Wojtas , =?UTF-8?Q?Micha=C5=82_Krawczyk?= , "Tzalik, Guy" , "Schmeilin, Evgeny" , "Matushevsky, Alexander" , "Chauskin, Igor" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH][pktgen] fix repopulation of tx_mbufs table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2018 11:26:30 -0000 Hello Keith, as from my last post passed about three weeks I would kindly ask if you could provide any comments about this patch? Best regards, Rafal Kozik pt., 23 lis 2018 o 09:23 Rafal Kozik napisa=C5=82(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 > --- > 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, s= truct rte_mempool *mp) > uint16_t saved =3D info->q[qid].tx_mbufs.len; > uint16_t nb_pkts =3D info->tx_burst - saved; > > - rc =3D pg_pktmbuf_alloc_bulk(mp, > + if (likely(nb_pkts > 0)) > + rc =3D pg_pktmbuf_alloc_bulk(mp, > &info->q[qid].tx_mbufs.m_table= [saved], > nb_pkts); > if (rc =3D=3D 0) { > @@ -1070,7 +1071,8 @@ pktgen_send_pkts(port_info_t *info, uint16_t qid, s= truct rte_mempool *mp) > uint16_t saved =3D info->q[qid].tx_mbufs.len; > uint16_t nb_pkts =3D txCnt - saved; > > - rc =3D pg_pktmbuf_alloc_bulk(mp, > + if (likely(nb_pkts > 0)) > + rc =3D pg_pktmbuf_alloc_bulk(mp, > &info->q[qid].tx_mbufs= .m_table[saved], > nb_pkts); > if (rc =3D=3D 0) { > -- > 2.7.4 >