Skip to content
Commit 1afc9e4e authored by Geetha sowjanya's avatar Geetha sowjanya Committed by Ruiqiang Hao
Browse files

octeontx2-pf: Using compound/head page ref count



commit 9c2ad17745287aa9b236151135865b72642f07a2 from
git@git.assembla.com:cavium/WindRiver.linux.git

Rx and Tx packet buffers are allocated using napi_alloc_frags()
function, which internally combines multiple pages into a
compound page and alloc fragments from it. The user count
for the fragments is mantained by the head/compound page.

The current code checks for the positive ref count of
the fragment instead of head_page to free the page.
As the ref count of the fragment is always zero this
leads memory leak.

This patch fixes the issue by checking the head page ref count
and also replaces put_page API with napi_frag_free.

fixes: b58ece6ebd87("octeontx2-af: Re-enable mac tx in otx2_stop routine")
Signed-off-by: default avatarGeetha sowjanya <gakula@marvell.com>
Change-Id: Iff4c8af226b894fe4e8531440294814ba4e65951
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/101532
Tested-by: default avatarsa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com>
Reviewed-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: default avatarRuiqiang Hao <Ruiqiang.Hao@windriver.com>
parent 9513ea37
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment