From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A500BA046B for ; Wed, 24 Jul 2019 09:15:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 77A0F1C12E; Wed, 24 Jul 2019 09:15:56 +0200 (CEST) Received: from mail-vk1-f195.google.com (mail-vk1-f195.google.com [209.85.221.195]) by dpdk.org (Postfix) with ESMTP id 7D1521C11B for ; Wed, 24 Jul 2019 09:15:52 +0200 (CEST) Received: by mail-vk1-f195.google.com with SMTP id s16so9180573vke.7 for ; Wed, 24 Jul 2019 00:15:52 -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=h4fUuw+B/u5n9QtW7TlYMR8XkhZ+FYjzWdYG9/dHYEY=; b=jiyvIRlSR94/R+xzy97bK871+UjawH8XSytaJ8Zli16u90BXVctdg/JzjqagsXKyaI XQ3w+T4N4ocAf566Amq/20+AQQIKv20OirG7RBf4Hlh0mffryseErkCFuamlVfgGrfr+ d0unLXCAjxMWJPetn0f2i+XSXGL84I347HGZPRBv7u2B3lPJQrftP4ZAETWK3F4n67Td MmTFj+KSktlccinaNpwB95klWtphp/g31u29DMUsYZSi6MGJXUZtSD7IdXTU07R+GMsr 90TRDi+Nr6x5K6XkCPKzb7gaaLOMykAam7t9BTaK4vETMt50uap/GEqx/P7HFNcTaHVd 7r8w== X-Gm-Message-State: APjAAAUxZYmUyGc6/C4bgAmOk3ZE8/zEhgYMNdyX3ijWSL1CYCbkJ4mw CgahpqX9IdO0oeuRdPKMLoT2EXub1sWAlX5X3X091g== X-Google-Smtp-Source: APXvYqxD9Zlrc2/pwgl4ieWjhtknCd8jLC05MK9v7CEYshvaHuutQtSZPDlGqP6jZ4+tLNVBMCwlyHeLmSyv3veBZz4= X-Received: by 2002:a1f:c18e:: with SMTP id r136mr31710914vkf.53.1563952551845; Wed, 24 Jul 2019 00:15:51 -0700 (PDT) MIME-Version: 1.0 References: <20190711135946.811-1-aideen.mcloughlin@intel.com> In-Reply-To: <20190711135946.811-1-aideen.mcloughlin@intel.com> From: David Marchand Date: Wed, 24 Jul 2019 09:15:40 +0200 Message-ID: To: "A.McLoughlin" Cc: Ferruh Yigit , dev , dpdk stable , tero.aho@coriant.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH] net/pcap: fix issue with unnecessary mbufs freeing X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Thu, Jul 11, 2019 at 4:00 PM A.McLoughlin wrote: > > In the eth_pcap_tx() and eth_pcap_tx_dumper() functions mbufs were freed > without incrementing num_tx. To fix the issue, the mbuf freeing was > removed as it was not of any benefit. > > Fixes: 6db141c91e1f ("pcap: support jumbo frames") > Cc: stable@dpdk.org > Cc: tero.aho@coriant.com > > Signed-off-by: A.McLoughlin > --- > drivers/net/pcap/rte_eth_pcap.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c > index 26e85183e..77bb66337 100644 > --- a/drivers/net/pcap/rte_eth_pcap.c > +++ b/drivers/net/pcap/rte_eth_pcap.c > @@ -349,7 +349,6 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > mbuf->pkt_len, > RTE_ETHER_MAX_JUMBO_FRAME_LEN); > > - rte_pktmbuf_free(mbuf); > break; > } > } > @@ -435,7 +434,6 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > mbuf->pkt_len, > RTE_ETHER_MAX_JUMBO_FRAME_LEN); > > - rte_pktmbuf_free(mbuf); > break; > } > } > -- > 2.17.1 > If a driver cannot xmit a packet (it is not a temporary situation but it is just that it can't), then it must free it and report it as handled because the application can do nothing more. Imagine an application that retries to send the packet right away, it ends up in a liveloop. The freeing of the packet was correct, what needs to be fixed is the return value. I am preparing fixes (found another issue in this part of the driver). I would be for reverting this patch, so that the fix is more straightforward, but we can discuss this once I sent my patches. > -------------------------------------------------------------- > Intel Research and Development Ireland Limited > Registered in Ireland > Registered Office: Collinstown Industrial Park, Leixlip, County Kildare > Registered Number: 308263 > > > This e-mail and any attachments may contain confidential material for the sole > use of the intended recipient(s). Any review or distribution by others is > strictly prohibited. If you are not the intended recipient, please contact the > sender and delete all copies. > Please contact your IT and do something about this footer. -- David Marchand