xsk: remove @first_frag from xsk_build_skb()
Instead of using auxiliary boolean that tracks if we are at first frag when gathering all elements of skb, same functionality can be achieved with checking if skb_shared_info::nr_frags is 0. Remove @first_frag but be careful around xsk_build_skb_zerocopy() and NULL the skb pointer when it failed so that common error path does not incorrectly interpret it during decision whether to call kfree_skb(). Signed-off-by:Maciej Fijalkowski <maciej.fijalkowski@intel.com> Acked-by:
Stanislav Fomichev <sdf@fomichev.me> Reviewed-by:
Jason Xing <kerneljasonxing@gmail.com> Acked-by:
Martin KaFai Lau <martin.lau@kernel.org> Link: https://patch.msgid.link/20250925160009.2474816-3-maciej.fijalkowski@intel.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
Loading
Please sign in to comment