From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66C77A0561 for ; Tue, 2 Mar 2021 16:53:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C5D940693; Tue, 2 Mar 2021 16:53:22 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 165E740142 for ; Tue, 2 Mar 2021 16:53:21 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id p5so12273962plo.4 for ; Tue, 02 Mar 2021 07:53:20 -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=XEqpT0aEAhzFJb74B1/0qqxYUxaV7U/iz7zn9BmKH3Q=; b=AeIh36oT6SdpKd0kMdob9Ymn/qBL0AGasFQy5gninBOvRqugUbmLOfz3ILzv71J+gv ajP9Jm4RpmZeCruE5Z/JfZlOtJCx5n47aDs1lLNFYjhAo0tJRjcWegacKB691wzc4hD1 QsyQ8s2Jt5TfFXueCGVIMEuO8vGgZl9e9yIFdzqwE3ssXXLX04qIKzTZ63ziUWzPpuzt mn4/3yfC6yyjki6luh7e9zKutI2KB2/B5lGVgnia/PyrpiGrfV13K5ShhOac1wZ6LmcQ tC7EUqX4SbnHhIZvcnzH9VhXngX7dgNUgP84i9WUzHUwZZlUeTlwdUbblkRvpo0jwdmT Wwdg== 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=XEqpT0aEAhzFJb74B1/0qqxYUxaV7U/iz7zn9BmKH3Q=; b=UQ+aL63j/H0NmCaFzXMwJ138kaqsq1Xwaze4tW2mZn8zC4puvPL7ZlgeVrSMzpSKjC yMEQ8uHqwfKg4JTmAEt6E2REcYF+cZB/m474NW+06ckWeEtB/fpikvDhD6n4AEeX2H/l OX0E4RPOCgi4NilYjy4XvMwKJpyF2VfTGGGyKvPzSAQcfs0AWrmLW9rVOgZqSDUfolyQ 03KdapDYCT+Fm2fDJPtxYmZgPDbbVo98w7Qe9nm8U9TcFntJal99RCd5y67rTuc/W4w7 E3viqiRaNI0WwWn0NNswUMUQ3bFjNpgVIKBsQbAzYa+9cAR7zKryp6TTh9ocWckZDOrk OZvw== X-Gm-Message-State: AOAM533MzwYVj5d1s7NdUQU3j+LRhQalg/B9ER1UQmxDyzlVbhfOwhsQ WAWYOwYOA7gIrbtRDckjQ8C218f88Y3UnA== X-Google-Smtp-Source: ABdhPJx3QOL7hlZiie7m0QTo8C26mwutwbmeIkktkXxlH5pBlAQqFrTcwNRbvCDGMEoJ1uIGovbvGg== X-Received: by 2002:a17:90a:5510:: with SMTP id b16mr5057798pji.87.1614700400162; Tue, 02 Mar 2021 07:53:20 -0800 (PST) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id b3sm3981512pjg.41.2021.03.02.07.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 07:53:19 -0800 (PST) Date: Tue, 2 Mar 2021 07:53:10 -0800 From: Stephen Hemminger To: John Alexander Cc: "users@dpdk.org" Message-ID: <20210302075310.58c9da1c@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Transmit Completion X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Tue, 2 Mar 2021 10:26:24 +0000 John Alexander wrote: > Hi, > > Once a packet has been transmitted using an API call such as rte_eth_tx_burst(), what is the preferred method of determining that the packet has been transmitted? I need to provide a notification to an application so that it can re-use/re-claim some application resources that were associated with the mbuf in the mbuf custom private data; this is a lazy re-claim, we're not after immediate per-packets events just eventual reclaim. > > I've been finding that rte_eth_tx_done_cleanup() isn't very widely supported by many PMDs and when used with the Intel i40e PMD, it doesn't flush out mbufs where the associated descriptor hasn't yet been updated due to the descriptor update granularity (setting that down to 1 seems to result in at least 1 mbuf still remaining stuck in the PMD). The reclaim cycle works fine when I'm continually sending, when I pause or stop sending, I never get my mbufs back so I'm wondering what the preferred way of achieving this is? > > Many Thanks, > John A. > > DPDK has no such mechanism built in. You might be able to do something like this by creating a new memory pool type and doing an action in the mempool enqueue operation. Transmit done -> rte_pktmbuf_free -> rte_mempool_put calls mempool_ops->enqueue