From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15022334C1F for ; Sat, 7 Feb 2026 12:19:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770466771; cv=none; b=s7wusoUGRfForTz4eBI6fF6I/m2HINy9FjFyG/oF0F5xaPFvnuPWIphVvWSkQeYll89wwo7XKQ/lslW08cYOEAnSDwx+mMULDuWfV989vnE3QB97DW4WkC6pKT8RVQyKdUlxioebKnbj7iz+jvnOecdLN/yiWzAF6zsrx3+YKRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770466771; c=relaxed/simple; bh=QeYL53Ak2yFcYMpP/Jpj3GNpZ4BwuGAfpHotmU0PslI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DRoowODo26e9ZiXomfmqrZ/QQvk5ZoR9HNIxPhcWZa371v0uBWoiPNf+SR1N5Lhjwp0xrbqT9Q5lPwRuNaMFmGE3A5MMhHyzIejeFzQyvjemGMsmyPuFDJsLZWLrW7Dz8CncYOxSE/dVQpfYyXnjeZBPZ8ldPJw15BmA8ARrhlo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SCwfFz5f; arc=none smtp.client-ip=95.215.58.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SCwfFz5f" Message-ID: <68fb4b7c-0747-4e2f-bc52-ab2b3554abd0@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770466769; 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=6yNB8KrLv+X4Xp438IC+Wvmk9yS8xXuVwescnw8Z0QQ=; b=SCwfFz5fliI5GJBc47KN6cQ6bn8mMyqtQLW3nVuMETkFWaxK35ndwFnOXMlWpTCzAtiHr3 XN0SuSbMCYcuLTs/gtb6pjNpCGyaMuA2AoOIckWn+3k5qqSmwpIufjhYUFcIJaZAJIK9KU NeNEUnXOYTQRQbSTxfBiR5wofWOpCXU= Date: Sat, 7 Feb 2026 12:19:07 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net v2 2/2] octeontx2-af: CGX: replace kfree() with rvu_free_bitmap() To: Bo Sun , kuba@kernel.org, pabeni@redhat.com Cc: gakula@marvell.com, sgoutham@marvell.com, sbhatta@marvell.com, hkelam@marvell.com, horms@kernel.org, bbhushan2@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, sumang@marvell.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260206130925.1087588-1-bo@mboxify.com> <20260206130925.1087588-3-bo@mboxify.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20260206130925.1087588-3-bo@mboxify.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 06/02/2026 13:09, Bo Sun wrote: > mac_to_index_bmap is allocated with rvu_alloc_bitmap(), so free it > with rvu_free_bitmap() instead of open-coding kfree(.bmap) to keep > the alloc/free API pairing consistent. > > Signed-off-by: Bo Sun > --- > drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > index fd4792e432bf..29f5def796ba 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c > @@ -1822,7 +1822,7 @@ static int cgx_lmac_exit(struct cgx *cgx) > continue; > cgx->mac_ops->mac_pause_frm_config(cgx, lmac->lmac_id, false); > cgx_configure_interrupt(cgx, lmac, lmac->lmac_id, true); > - kfree(lmac->mac_to_index_bmap.bmap); > + rvu_free_bitmap(&lmac->mac_to_index_bmap); > rvu_free_bitmap(&lmac->rx_fc_pfvf_bmap); > rvu_free_bitmap(&lmac->tx_fc_pfvf_bmap); > kfree(lmac->name); The code LGTM, but as Jakub metioned in v1, the cleanup should be a separate patch targeting net-next. On respin you can add: Reviewed-by: Vadim Fedorenko