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 8B0E3A0547; Tue, 31 Aug 2021 12:00:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 738C140E2D; Tue, 31 Aug 2021 12:00:11 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 4CC5E406A2 for ; Tue, 31 Aug 2021 12:00:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630404009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2wpvQkliXf64oftf9CYMOEhxJEI1iP4rYx2Qg9PUMU8=; b=U1hQVN43kzFw111Ff6vIRqDsUqwmBRUOoe0k07OnbHNr4FwD+4MEts/lZKXN0DfW8Zv25R 60dcdFL47xCEpkTCzx/f5x17bAufVjebZ/fwhvVo+yqWl5hXcdk9X3u/b7tH8Zk32AfnuR kXS/B4xBdpvrk7uOexX3c6HTDN1U83w= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-lkCkrn4-MQKVpkPwMNx0dQ-1; Tue, 31 Aug 2021 06:00:07 -0400 X-MC-Unique: lkCkrn4-MQKVpkPwMNx0dQ-1 Received: by mail-wm1-f70.google.com with SMTP id g3-20020a1c2003000000b002e751c4f439so1027949wmg.7 for ; Tue, 31 Aug 2021 03:00:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:subject:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2wpvQkliXf64oftf9CYMOEhxJEI1iP4rYx2Qg9PUMU8=; b=f3OWX7EcDZYZvNbu1TwbegrLBLLr4qd2nacPj6GDQV+12LkNyXuxqKGy5ti+v6X2mQ qtRZ8fIb2tMPV6bRysfGLhGbLs8KrBFidk9uSP+FuPbJUIU8KX6s4K40a46EoJogBoP6 7WO4peK7VrOyoA3FVB+373LvNvi/Xd3Hl0TZI+kXurEcMUpWFd21YNM+KgTB70P113qQ elbgxaoVjy8K+ZYb8mK6kf23BA6kYTofUFG8bejplosqh9+gUQMgKaUbiZmFXfDzrF3c H4norTtXQSTazPmVHtMe9cLXQuymMaR7V9harMzSdv4L5jciaPOFW3m2QZGdj94tthun 0oXQ== X-Gm-Message-State: AOAM530bQ5zTYoDiuEqc5WL5Q37v1uCudzNCulpLEMfbd/3M/hkIpbW9 2YgjAXi4QT/brG++9WbeLFFsePep6pPnRrqTUPqsqO+0tBPxCa07x4geW9RhVsXSV1Qozh6Bkib v7B8= X-Received: by 2002:a1c:1f49:: with SMTP id f70mr3185014wmf.13.1630404006599; Tue, 31 Aug 2021 03:00:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxViR9oHD6uLQ/9n5mP8F+rCyVtyEy0CuKXkCGoPDKszzv5Il/vocDcKIgtfit5y9oAo+3Oug== X-Received: by 2002:a1c:1f49:: with SMTP id f70mr3184992wmf.13.1630404006366; Tue, 31 Aug 2021 03:00:06 -0700 (PDT) Received: from [192.168.0.36] ([78.18.17.175]) by smtp.gmail.com with ESMTPSA id q14sm11300177wrc.31.2021.08.31.03.00.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Aug 2021 03:00:05 -0700 (PDT) To: Qiming Chen , dev@dpdk.org Cc: haiyue.wang@intel.com, stable@dpdk.org References: <20210831032805.5520-1-chenqiming_huawei@163.com> <20210831080630.5719-1-chenqiming_huawei@163.com> From: Kevin Traynor Message-ID: <32c26bad-9da6-baa0-e810-b3efa1d729fd@redhat.com> Date: Tue, 31 Aug 2021 11:00:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210831080630.5719-1-chenqiming_huawei@163.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix mbuf leak X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 31/08/2021 09:06, Qiming Chen wrote: > A local test found that repeated port start and stop operations during > the continuous SSE vector bufflist receiving process will cause the mbuf > resource to run out. The final positioning is when the port is stopped, > the mbuf of the pkt_first_seg pointer is not released. Resources leak. > The patch scheme is to judge whether the pointer is empty when the port > is stopped, and release the corresponding mbuf if it is not empty. > > Fixes: abf7275bbaa2 ("ixgbe: move to drivers/net/") That is a file rename, it should be when the functionality was introduced, so in this case: Fixes: af75078fece3 ("first public release") > Cc: stable@dpdk.org > > Signed-off-by: Qiming Chen > --- > v2: > Sync to stable@dpdk.org > --- > drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c > index c814a28cb4..bfdfd5e755 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > @@ -2981,6 +2981,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq) > rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1); > rxq->rx_tail = 0; > rxq->nb_rx_hold = 0; > + > + if (rxq->pkt_first_seg != NULL) > + rte_pktmbuf_free(rxq->pkt_first_seg); > + > rxq->pkt_first_seg = NULL; > rxq->pkt_last_seg = NULL; > >