From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 35557A0093;
	Mon,  7 Mar 2022 19:35:12 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id ECB1640688;
	Mon,  7 Mar 2022 19:35:11 +0100 (CET)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com
 [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 50BF94014E
 for <dev@dpdk.org>; Mon,  7 Mar 2022 19:35:11 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailout.nyi.internal (Postfix) with ESMTP id B5B995C0185;
 Mon,  7 Mar 2022 13:35:10 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Mon, 07 Mar 2022 13:35:10 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:cc:content-transfer-encoding:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm1; bh=voMNr47WoJDxjn
 rTyaFKMm5b2iuIc9b0mUU1arE0q8U=; b=lnE2Wkg+piZ8gdkHO/4gPCyKVV3Mzj
 E/UexOp/yYIXkc1/gIkvVeS0blT8gfoBtT5i6J+WcBpFHnAwWQWB9lubEPcpzKsJ
 QYEehCSB1oAMVpoiN0oICKBhk7WieDcR7atKSPuxgrn8W9VPLW9gFNZDws4jpjgC
 PXtZ258lOuAkPUN6K0z+0Ew3ow9wsmHw8Nggi1IiRLXiNcCSt5zqtaSdJ05KBMUr
 4M3yz0txfa2QyNH+Er4g2axlVcA2/JxvMg6kM5nuRbawobzlkb+b0ZQWt7GIK1sD
 3C07ILwAt+Xqmoyv+sx70Gf09sLcV6JCDD/1O21vU4OzvMMvr1i2zd+Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:date:date:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; bh=voMNr47WoJDxjnrTyaFKMm5b2iuIc9b0mUU1arE0q
 8U=; b=G8VETr4uEGbtJ3MWlAuLZBv0H7Fkr+M1QoVgT6kmZuglnTAVa5y2l2vRm
 yvF2OczVFmIN4/Qbi8EzgmL4qVL5uUuhSgn5xf/vPFomUKBJ8LNe9i8FX3JS8c8L
 0C09Uj0iapi6dCa3sDDrQwq0WsLG/FwxzhjTFYF1Arz2gcYzHCl93H8Rff3YMmkF
 6TXVbWcf73mj0LAa8u/Ng1dakMeSM1tSwolT4Y0aSlzhcIm3voCFwjNffKIrrZe1
 RpjXck5ZFcsIOumBDoKqUAcxHjcRzYw3aIFnKF5VQPAh9p8VF5K0zoWknv78fPCt
 mo4+z5fpJWMArbGxi3DYoFdplnCrQ==
X-ME-Sender: <xms:XVAmYrAVwP9zBCkIGwUWRuSWz5XzrfK9C72c8v_hqv8yLFfagwZKIg>
 <xme:XVAmYhh4e16b8x3h5XaedykIpdOLaizyGcjVxGx0FKnYhkN5TeGJkEsHDNLTSFsVm
 Wi5nB5zJYoa_7Kr2Q>
X-ME-Received: <xmr:XVAmYmkK-KXUrEkLu4zEGtGauEo1NNpGQQecZdaxKcV9bR-kB-dF0UERFwks9df_k2kGrzvelxwIhPW_iKvcdls3eg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddugedguddufecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej
 ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:XVAmYtwwpm--TqCdBOypl53TEyvl-wXxsMU1jN5DFxAs8FBpE4hR5w>
 <xmx:XVAmYgQ6vOh6seom4Y0MffBmIrKIhncbusRzpT0l25J5vEle7u3KZg>
 <xmx:XVAmYgbo2qhOeLsTbJMhIz-5kI0oQhRpcg6Lzt-ibE6EeBGMlmdJFQ>
 <xmx:XlAmYmcI2uKnrKfWHUmxp8Pmh8OSMXtTtOOafxJEO4Ot3mWOL7KtXQ>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 7 Mar 2022 13:35:08 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Weiguo Li <liwg06@foxmail.com>
Cc: cristian.dumitrescu@intel.com, dev@dpdk.org, jasvinder.singh@intel.com,
 Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH v5] sched: remove useless malloc in pie data init
Date: Mon, 07 Mar 2022 19:35:07 +0100
Message-ID: <39592950.J2Yia2DhmK@thomas>
In-Reply-To: <tencent_400C07CFD7297584B78EF737D60880484406@qq.com>
References: <DM8PR11MB567001E1EA7A38A4EB00F9F2EB029@DM8PR11MB5670.namprd11.prod.outlook.com>
 <tencent_400C07CFD7297584B78EF737D60880484406@qq.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

01/03/2022 21:32, Weiguo Li:
> 'rte_pie_rt_data_init(NULL)' is not expected, and it's ought to
> fail when this happen. The malloc inside the function didn't work.
> So remove the malloc otherwise will lead to a memory leak.
> 
> Fixes: 44c730b0e37971 ("sched: add PIE based congestion management")
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> ---
> v5:
> * fix compile error
> v4:
> * replace all assignments to zero by a memset.
> v3:
> * fix typo
> v2:
> * revise according to Stephen's suggestion.

Applied, thanks.