From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id 45CC11B9B0 for ; Fri, 14 Dec 2018 16:48:13 +0100 (CET) Received: by mail-lf1-f67.google.com with SMTP id u18so4572132lff.10 for ; Fri, 14 Dec 2018 07:48:13 -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=UVVOEX3JVdXF71nSBCsP9L/R3yumVQO7N+UZSTN/xTo=; b=x7UfzA+hvPtvHIftw7fe+KUrDcenXD5YAgK72sEFNtlDCeyBv0ZuOkNLnJV5Han6q+ phLWc2dTLdyIRZhWeg3SRQxFqL6PirKdlm97ibZEVsJEXTGZBKK+dddTuOclMTexRib8 g7PnuLQKJJ4yzErGOK8M88FSqu73iwZRxtK1dQKWDiIWxgfZ0hAqTGgw/WF4Em+pkinW 6DmfbBgQG1NgkwS7XjMvyvhOTvNCyws2HZViVCxEIIsMafc0kesxRDJHMayQ1BAjH6LM XniIFI1ko96YUVAC6pQ0gCmMh5luclwg6c5n4rM3Pu0hwaUhaQNogCsLcWJWQNSnlBvP rA3w== 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=UVVOEX3JVdXF71nSBCsP9L/R3yumVQO7N+UZSTN/xTo=; b=HLobRnWXGP8al0wPi8wVLmaXuyInjLBgDGsujSA7Gt18uQDpAiJ4ZeDn/389LsLu1T QOri2GsoNaKi4MTr9uPg2L1NjnypcEsUEeAIDer2OyvDkgWbD4h1Ak9xeABZXgNs8vqZ j8sNO5Spa6tyawfkKKslR46+5BVQ1yp03Lq50OAjX0o4bNBYMwWqSQb2tY0+cOIkSvtH wwCXRo4ZdCAPX/VG7HtxP75hf3R5Wntun6iZuXZwKfbG2jeML/nK0CdEzunijX1pbXZH 8l9S6RQWCiweNIXPNI0sQjmgaRf988xfGdr2xmDiXWX3aULVNrIZ/07piiL7HGEP+QfV AoAA== X-Gm-Message-State: AA+aEWZ3rPiwVVOsyxBeD4ekGFS8+CidABnOFxp8K0cqN30Ocqmjhaiu Ri35LaQ9uqFxJs8JonDQ+TMcekJ2edFgF/IQU6uqRA== X-Google-Smtp-Source: AFSGD/WFaL7BFqQAOBz9DcQM8eyuZhkOEoFL7JUgpN39kdo3HP1guE4xTH8ZYO3KLj99USMyR1gIEA+wL5t2YwpEztU= X-Received: by 2002:a19:9fcd:: with SMTP id i196mr2138488lfe.82.1544802492645; Fri, 14 Dec 2018 07:48:12 -0800 (PST) MIME-Version: 1.0 References: <1542961382-5234-1-git-send-email-rk@semihalf.com> <15FDA5E7-5A45-4ACF-83B5-55328BA117EB@intel.com> <7E4EC658-807D-43FB-9622-4B72A13C1CE0@intel.com> In-Reply-To: <7E4EC658-807D-43FB-9622-4B72A13C1CE0@intel.com> From: =?UTF-8?B?UmFmYcWCIEtvemlr?= Date: Fri, 14 Dec 2018 16:48:01 +0100 Message-ID: To: "Wiles, Keith" Cc: Thomas Monjalon , "Yigit, Ferruh" , dev , 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 15:48:13 -0000 pt., 14 gru 2018 o 16:45 Wiles, Keith napisa=C5=82(= a): > > > > > On Dec 14, 2018, at 9:29 AM, Wiles, Keith wrote= : > > > > > > > >> On Dec 14, 2018, at 5:26 AM, Rafa=C5=82 Kozik 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 li= ne. Thank you for response. I apologies for wrong status line. > > > > Can you give more details as to how to reproduce the failure? It occurred when pktgen is set to send more packets the NIC is able to tran= sfer. I such cases there could by cycle, when no packets are send, as Tx ring is = full. > > I can not find your patch in patchwork, does anyone know why? It was set as Not Applicable: http://patchwork.dpdk.org/patch/48305/ > > >> > >> 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 qi= d, struct 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_tab= le[saved], > >>> nb_pkts); > >>> if (rc =3D=3D 0) { > >>> @@ -1070,7 +1071,8 @@ pktgen_send_pkts(port_info_t *info, uint16_t qi= d, struct 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_mbu= fs.m_table[saved], > >>> nb_pkts); > >>> if (rc =3D=3D 0) { > >>> -- > >>> 2.7.4 > >>> > > > > Regards, > > Keith > > Regards, > Keith >