]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bnxt_en: refactor tpa_info alloc/free into helpers
authorDavid Wei <dw@davidwei.uk>
Wed, 4 Dec 2024 04:10:20 +0000 (20:10 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2025 19:54:12 +0000 (12:54 -0700)
commitfa36f457eec34cb8d2217c58fe75901ec1bccc69
treecc3fb5c1e90b577aa6bc495fef4a79274748e050
parentf49bc4d7ff3dbb1f7438f8bb0054189f3f5bad23
bnxt_en: refactor tpa_info alloc/free into helpers

[ Upstream commit 5883a3e0babf55d85422fddec3422f211c853f6e ]

Refactor bnxt_rx_ring_info->tpa_info operations into helpers that work
on a single tpa_info in prep for queue API using them.

There are 2 pairs of operations:

* bnxt_alloc_one_tpa_info()
* bnxt_free_one_tpa_info()

These alloc/free the tpa_info array itself.

* bnxt_alloc_one_tpa_info_data()
* bnxt_free_one_tpa_info_data()

These alloc/free the frags stored in tpa_info array.

Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: David Wei <dw@davidwei.uk>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://patch.msgid.link/20241204041022.56512-2-dw@davidwei.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 87dd2850835d ("eth: bnxt: fix memory leak in queue reset")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c