From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DczlQFgt92Aw3pmdlg/ulerTYdTZLAIwKI5jvNmoSB8=; b=tMjrudrnk2WhFQZCAzHD0Kj6PmDDmgfI3g+UOxxq2RAJBiI50A9+NXaw7unMdogLuj wEAMiROxv7kjll7dgeCrx8LrnPNEhihHchmIU975Ectrdgpe68g9nWMJ15x/PCiwMzID rheJCwwV1Gzj9vfw56Z5D4sJn7FlCeJuL4yrrhVHPEDMhWKq0jFtOkVmGof+91tvuHww 7C+5ltOQs3N9MbGqkG8RcaYvuaxrYbHDAUR2inLEbA7SMBYcLAuoMvvZZ3Rf7Do/UP4v hIbLHHGsKbhyeOE05sSWc46ECG+OoUMxD5YxbONZLCHutPnkEIrTVi3Xaza791Elmat+ d4DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DczlQFgt92Aw3pmdlg/ulerTYdTZLAIwKI5jvNmoSB8=; b=F5km4JGPjg/b2hCLsKPSUv7qHi/6C384Gu7O15XGVeJz0zjgoUopjv6Sats83r/PoK bKg4HZjqXGgoRRTxJ2hQtuL8AU7YG+cdmOp+TZfSuzG1SRz87rzvZJ+KqdAeLq3VWndV vSczZdUkOQBcSatz30Nk0CcDasquU3NLHM/RsxaIEbwI8/9O6JcfMqIhDaJt8MeEvebT io9trBbTjy6XKmd9jS6qSJJfC+xAdlJUWi9C37C5XRNky+Vklxk4FM5nuS0RfHSejeVW mM91LeI8L7nEkEUjtNhRphG0PiKUi3qYlVLY3A6+b2a/MurmAnOArRrA1ndPzRXItZdv unbQ== X-Gm-Message-State: AJcUukdzlDXSu/YEpnlXfm/lVHr+QIoGLv8BpF6EXwyEwcH8rBQ/Wa5c dbUFQw3C1tPo6ug+8Jk48iWTbg== X-Google-Smtp-Source: ALg8bN4APLEjqZr5PMxP7ZNqR/W0bGEwbML1YDgjfGAp9MYfpCC+5EnYrMU3EHUvznS/XxR+B/eOjw== X-Received: by 2002:a62:61c3:: with SMTP id v186mr16641066pfb.55.1547249836055; Fri, 11 Jan 2019 15:37:16 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d80sm220786553pfm.146.2019.01.11.15.37.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 15:37:15 -0800 (PST) Date: Fri, 11 Jan 2019 15:37:09 -0800 From: Stephen Hemminger To: "Soni, Shivam" Cc: "dev@dpdk.org" , "users@dpdk.org" Message-ID: <20190111153709.3117c539@hermes.lan> In-Reply-To: <454CCFA5-5843-441F-9C6D-33E807419574@amazon.com> References: <454CCFA5-5843-441F-9C6D-33E807419574@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] TX unable to enqueue packets to NIC due to no free TX descriptor 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, 11 Jan 2019 23:37:17 -0000 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