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 C4051A0597; Thu, 9 Apr 2020 16:51:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8F5F31C2BB; Thu, 9 Apr 2020 16:51:36 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id 979C51C2B9 for ; Thu, 9 Apr 2020 16:51:35 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id k15so4221702pfh.6 for ; Thu, 09 Apr 2020 07:51:35 -0700 (PDT) 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=kcHOTTp4xhSbzP0BBR9Wo8qNP7KrQv6VIesM9T6opdY=; b=yijN8T2uFfEsGsLOdtCeND/2PrV4NMwAcwRSMxfYpxalFpIQDDoPk/npRRsE5TYH/K T2PDlrt/zWJ/+0N9Xu41BMdKUVSP/vZEDqCR1YmCB3WSO6OySHT4YC1Qcazf8SJbFTWH 1cGOXa8jrceWKeQJ1vqdWy6BkqZ/1vxB0P3+X4+ssg8KaAg5+LbTSwU39eDipdqImKi4 q+M5MpFrnob1LZpVYCCOIVT0OtQqyUE6AGJ9qg1v++GGjHl+acPdbaCfCcqCI/27kxef NDBNg7I43dgZ/QUNkH6f3s4RUb1aL4app5A2pj4s/P24bfYSxJPolRa3hwYne86yKddj pgSw== 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=kcHOTTp4xhSbzP0BBR9Wo8qNP7KrQv6VIesM9T6opdY=; b=bzDLMUc1neTxskCRzzKd4TpnuH4u3dTRnMxKqMqm1gDiP/YtOuLM6RQuSESEXW7mbW JgoqX554OwEjDq5DhcDCEPlOmdH2YfNeSCYx681XVARAyrpGfqdoJpyRSvmoFHCNztVY rrH0SBJ7T/oZCbvkPqIaOZRFCV6XByezYPtaHn97NJOsTJJluyngyEdIPnemUQgtSTVb ER50TZBaZEP71LOhaPqTQx+GyGwBAjcmKa91lanPnC2KPyJ2XRL5F1qprFGP00t+O3Jg Ven1s+3583FxaqPLwOiGWIJk106AqDccaOV+5eXZKTFc5COoSuYZbF58mTCn2Efo4zvA UNxg== X-Gm-Message-State: AGi0PuZHVGJroIkjDK1sFViOAsOUK6mxzi1eXIjBAXV8Dt4jWt38426J Al2pxDnbLCegDiVTjD8ln8weYA== X-Google-Smtp-Source: APiQypIrsB6F6B+OFYL7/c8vld/hv42xlqjdswyTWkRL5QH5xifAaeb9A1nhbdfn1hRuit3tvKiHrg== X-Received: by 2002:a65:6405:: with SMTP id a5mr12163281pgv.255.1586443894560; Thu, 09 Apr 2020 07:51:34 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id y19sm20027291pfe.9.2020.04.09.07.51.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 07:51:34 -0700 (PDT) Date: Thu, 9 Apr 2020 07:51:24 -0700 From: Stephen Hemminger To: wangyunjian Cc: Ferruh Yigit , "dev@dpdk.org" , "keith.wiles@intel.com" , "Lilijun (Jerry)" , xudingke , "stable@dpdk.org" Message-ID: <20200409075124.018fd49e@hermes.lan> In-Reply-To: <34EFBCA9F01B0748BEB6B629CE643AE60CF5FDB2@DGGEMM533-MBX.china.huawei.com> References: <1586233357-2580-1-git-send-email-wangyunjian@huawei.com> <34EFBCA9F01B0748BEB6B629CE643AE60CF5FDB2@DGGEMM533-MBX.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v3 1/5] net/tap: fix mbuf double free when writev 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" On Thu, 9 Apr 2020 08:03:23 +0000 wangyunjian wrote: > error = tap_write_mbufs(txq, num_mbufs, mbuf, > &num_packets, &num_tx_bytes); > if (error == -1) { > txq->stats.errs++; > /* free tso mbufs */ > for (j = 0; j < ret; j++) > rte_pktmbuf_free(mbuf[j]); > break; > } There is a free bulk, and normally each buf counts against errors. if (error == -1) { txq->stats.errs += num_packets; rte_pktmbuf_free_bulk(mbuf, num_packets); break; }