Commit a580ea9
net: mirror skb frag ref/unref helpers
Refactor some of the skb frag ref/unref helpers for improved clarity.
Implement napi_pp_get_page() to be the mirror counterpart of
napi_pp_put_page().
Implement skb_page_ref() to be the mirror of skb_page_unref().
Improve __skb_frag_ref() to become a mirror counterpart of
__skb_frag_unref(). Previously unref could handle pp & non-pp pages,
while the ref could only handle non-pp pages. Now both the ref & unref
helpers can correctly handle both pp & non-pp pages.
Now that __skb_frag_ref() can handle both pp & non-pp pages, remove
skb_pp_frag_ref(), and use __skb_frag_ref() instead. This lets us
remove pp specific handling from skb_try_coalesce.
Additionally, since __skb_frag_ref() can now handle both pp & non-pp
pages, a latent issue in skb_shift() should now be fixed. Previously
this function would do a non-pp ref & pp unref on potential pp frags
(fragfrom). After this patch, skb_shift() should correctly do a pp
ref/unref on pp frags.
Signed-off-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240410190505.1225848-3-almasrymina@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent f6d827b commit a580ea9
File tree
6 files changed
+44
-51
lines changed- drivers/net
- ethernet
- chelsio/inline_crypto/ch_ktls
- sun
- include/linux
- net
- core
- tls
6 files changed
+44
-51
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
1662 | | - | |
| 1662 | + | |
1663 | 1663 | | |
1664 | 1664 | | |
1665 | 1665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2000 | 2000 | | |
2001 | 2001 | | |
2002 | 2002 | | |
2003 | | - | |
| 2003 | + | |
2004 | 2004 | | |
2005 | 2005 | | |
2006 | 2006 | | |
| |||
2024 | 2024 | | |
2025 | 2025 | | |
2026 | 2026 | | |
2027 | | - | |
| 2027 | + | |
2028 | 2028 | | |
2029 | 2029 | | |
2030 | 2030 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
717 | 717 | | |
718 | 718 | | |
719 | 719 | | |
720 | | - | |
| 720 | + | |
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
11 | 39 | | |
12 | 40 | | |
13 | 41 | | |
14 | 42 | | |
| 43 | + | |
15 | 44 | | |
16 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
17 | 48 | | |
18 | | - | |
| 49 | + | |
19 | 50 | | |
20 | | - | |
| 51 | + | |
21 | 52 | | |
22 | 53 | | |
23 | 54 | | |
| |||
29 | 60 | | |
30 | 61 | | |
31 | 62 | | |
32 | | - | |
| 63 | + | |
33 | 64 | | |
34 | 65 | | |
35 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | 910 | | |
916 | 911 | | |
917 | 912 | | |
| |||
1033 | 1028 | | |
1034 | 1029 | | |
1035 | 1030 | | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | | - | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
1067 | 1031 | | |
1068 | 1032 | | |
1069 | 1033 | | |
| |||
4176 | 4140 | | |
4177 | 4141 | | |
4178 | 4142 | | |
4179 | | - | |
| 4143 | + | |
4180 | 4144 | | |
4181 | 4145 | | |
4182 | 4146 | | |
| |||
4826 | 4790 | | |
4827 | 4791 | | |
4828 | 4792 | | |
4829 | | - | |
| 4793 | + | |
4830 | 4794 | | |
4831 | 4795 | | |
4832 | 4796 | | |
| |||
5957 | 5921 | | |
5958 | 5922 | | |
5959 | 5923 | | |
5960 | | - | |
5961 | | - | |
5962 | | - | |
5963 | | - | |
| 5924 | + | |
| 5925 | + | |
5964 | 5926 | | |
5965 | 5927 | | |
5966 | 5928 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| |||
0 commit comments