From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C20AAA00E6 for ; Wed, 17 Apr 2019 11:16:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC4851B5E0; Wed, 17 Apr 2019 11:16:00 +0200 (CEST) Received: from mail-ua1-f65.google.com (mail-ua1-f65.google.com [209.85.222.65]) by dpdk.org (Postfix) with ESMTP id 1C7371B558 for ; Wed, 17 Apr 2019 11:15:59 +0200 (CEST) Received: by mail-ua1-f65.google.com with SMTP id a46so7666727uae.2 for ; Wed, 17 Apr 2019 02:15:59 -0700 (PDT) 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; bh=JH3tLdFoJkMcTAtl67f6YGheU0T7BABkqLP+BErtm4c=; b=agR/kYxqciLopfmRBlfOcl27fZnlXjII4BW1q7a0TDRbbmRcXSmYPF1Iflz74sZkWv 9iCT5DDr+khQb0LcKqG4yH6BNuZ+4VovpWQoP5nBjHdpfYbsc2d54YRfihAq1500R/5l 9+Aq1F3KTmN/3YsMhccU8xBe6UgcdCPQYogd2m4gt/4pgei4x9px2+dvtfCy/UK4IIbL DAfl3/MoXBpdGnJ0XwcU00wVA0lJUX4CsKA3qLgSwGzGCmqKgl4Qy+8TIr2Ugv6Y3KHH 8+8HJwwy3jCBMIVolkixYN2KtGPhnQaJRCPRsUR3oluGWnyGksmvs04ni2HFY8CmPtyx IA2g== X-Gm-Message-State: APjAAAWnOCr5qY5x5UFqeyjV0NGCDGL7Butw0UnyyO9YBFZFvV1kTKgh DduQnbsbDwKTQTv0BbWH5mAzjX/Vsz4FJ0FOT9wNnWJU X-Google-Smtp-Source: APXvYqxB9fiOzwMwD3g4Mwyx+JotpV2yZrdj9nj7G4QqjCOOh1xhKADNGqqTLkLNKihBjM9Qgf4pm+5b8fxrbZOVKbU= X-Received: by 2002:ab0:4870:: with SMTP id c45mr17422745uad.21.1555492558420; Wed, 17 Apr 2019 02:15:58 -0700 (PDT) MIME-Version: 1.0 References: <20190417085653.110559-1-xiaolong.ye@intel.com> <20190417085653.110559-2-xiaolong.ye@intel.com> In-Reply-To: <20190417085653.110559-2-xiaolong.ye@intel.com> From: David Marchand Date: Wed, 17 Apr 2019 11:15:47 +0200 Message-ID: To: Xiaolong Ye Cc: dev , Ferruh Yigit , Qi Zhang , Karlsson Magnus , Topel Bjorn Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3 1/4] net/af_xdp: enqueue buf ring when allocate Tx queue fails 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190417091547.yZDl91cl_z5TiB9_q2zNagG-GQfU2YFBhXKaitrwZYA@z> On Wed, Apr 17, 2019 at 11:02 AM Xiaolong Ye wrote: > When it fails to allocate enough slots in Tx queue for transmitting > packets, we need to return the dequeued addrs to buf ring. > > Fixes: f1debd77efaf ("net/af_xdp: introduce AF_XDP PMD") > > Signed-off-by: Xiaolong Ye > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index 007a1c6b4..5cc643ce2 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -276,6 +276,7 @@ eth_af_xdp_tx(void *queue, struct rte_mbuf **bufs, > uint16_t nb_pkts) > > if (xsk_ring_prod__reserve(&txq->tx, nb_pkts, &idx_tx) != nb_pkts) > { > kick_tx(txq); > + rte_ring_enqueue_bulk(umem->buf_ring, addrs, nb_pkts, > NULL); > return 0; > } > > -- > 2.17.1 > When there is no change, please keep Review tags from previous versions. Reviewed-by: David Marchand -- David Marchand