From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: TX unable to enqueue packets to NIC due to no free TX descriptor Date: Fri, 11 Jan 2019 15:37:09 -0800 Message-ID: <20190111153709.3117c539@hermes.lan> References: <454CCFA5-5843-441F-9C6D-33E807419574@amazon.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "users@dpdk.org" To: "Soni, Shivam" Return-path: Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by dpdk.org (Postfix) with ESMTP id 781CF1BBE4 for ; Sat, 12 Jan 2019 00:37:17 +0100 (CET) Received: by mail-pg1-f179.google.com with SMTP id c25so6948124pgb.4 for ; Fri, 11 Jan 2019 15:37:17 -0800 (PST) In-Reply-To: <454CCFA5-5843-441F-9C6D-33E807419574@amazon.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 11 Jan 2019 22:10:39 +0000 "Soni, Shivam" wrote: > Hi All, >=20 > We are trying to debug and fix an issue. After the deployment, in few of = the hosts we see an issue where TX is unable to enqueue packets to NIC. On = rebouncing or restarting our packet processor daemon, issue gets resolved. >=20 > We are using IntelDPDK version 17.11.4 and i40e drivers. >=20 > On looking into driver=E2=80=99s code, we found that whenever the issue i= s happening the value for nb_tx_free is =E2=80=980=E2=80=99. And then it tr= ies to free the buffer by calling function =E2=80=98i40e_tx_free_bufs=E2=80= =99. >=20 > This method returns early as the buffer its trying to free says it hasn= =E2=80=99t finished transmitting yet. The method returns at this if conditi= on: >=20 > /* check DD bits on threshold descriptor */ > if ((txq->tx_ring[txq->tx_next_dd].cmd_type_offset_bsz & > rte_cpu_to_le_64(I40E_TXD_QW1_DTYPE_MASK)) !=3D > rte_cpu_to_le_64(I40E_TX_DESC_DTYPE_DESC_DONE)) { > return 0; > } >=20 > Hence nb_tx_free remains 0. >=20 > Our tx descriptor count is 1024. >=20 > How can we fix this issue. Can someone help us out here please Use bigger mbuf pool. For safety the mbuf pool has to be big enough for Nports * (NRxd + NTxd) + NCore * (mbuf_pool_cache_size + burst_size) Each NIC might get full receive ring and full transmit ring and each active core might be processing a burst of packets and have free buffers sitting in the mbuf pool cache. This doesn't account for addit= ional mbuf's created if doing things like reassembly, encryption, re-encapsulatio= n, or compression Anything smaller and your application is relying on statistical averages to never see resource exhaustion; overcommitment