Commit 513c84c
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 <[email protected]>1 parent b3e9925 commit 513c84c
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
733 | | - | |
734 | 733 | | |
735 | 734 | | |
736 | 735 | | |
737 | 736 | | |
738 | 737 | | |
739 | 738 | | |
| 739 | + | |
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
751 | | - | |
752 | 750 | | |
753 | 751 | | |
754 | 752 | | |
| |||
798 | 796 | | |
799 | 797 | | |
800 | 798 | | |
801 | | - | |
| 799 | + | |
802 | 800 | | |
803 | 801 | | |
804 | 802 | | |
| |||
840 | 838 | | |
841 | 839 | | |
842 | 840 | | |
843 | | - | |
| 841 | + | |
844 | 842 | | |
845 | 843 | | |
846 | 844 | | |
| |||
0 commit comments