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: Geetha sowjanya <gakula@marvell.com> Change-Id: Iff4c8af226b894fe4e8531440294814ba4e65951 Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/101532 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
parent
9513ea37
Please register or sign in to comment