Commit 1827f77
net: xdp: pass full flags to xdp_update_skb_shared_info()
xdp_update_skb_shared_info() needs to update skb state which
was maintained in xdp_buff / frame. Pass full flags into it,
instead of breaking it out bit by bit. We will need to add
a bit for unreadable frags (even tho XDP doesn't support
those the driver paths may be common), at which point almost
all call sites would become:
xdp_update_skb_shared_info(skb, num_frags,
sinfo->xdp_frags_size,
MY_PAGE_SIZE * num_frags,
xdp_buff_is_frag_pfmemalloc(xdp),
xdp_buff_is_frag_unreadable(xdp));
Keep a helper for accessing the flags, in case we need to
transform them somehow in the future (e.g. to cover up xdp_buff
vs xdp_frame differences).
While we are touching call callers - rename the helper to
xdp_update_skb_frags_info(), previous name may have implied that
it's shinfo that's updated. We are updating flags in struct sk_buff
based on frags that got attched.
Signed-off-by: Jakub Kicinski <[email protected]>
Acked-by: Jesper Dangaard Brouer <[email protected]>
Link: https://patch.msgid.link/[email protected]
Acked-by: Stanislav Fomichev <[email protected]>
Reviewed-by: Alexander Lobakin <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>1 parent db1b600 commit 1827f77
File tree
8 files changed
+55
-63
lines changed- drivers/net
- ethernet
- broadcom/bnxt
- intel
- i40e
- ice
- marvell
- mellanox/mlx5/core
- include/net
- net/core
8 files changed
+55
-63
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
475 | 474 | | |
476 | 475 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2151 | 2151 | | |
2152 | 2152 | | |
2153 | 2153 | | |
2154 | | - | |
2155 | | - | |
2156 | | - | |
2157 | | - | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
2158 | 2158 | | |
2159 | 2159 | | |
2160 | 2160 | | |
| |||
2206 | 2206 | | |
2207 | 2207 | | |
2208 | 2208 | | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
2213 | 2212 | | |
2214 | 2213 | | |
2215 | 2214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1035 | 1035 | | |
1036 | 1036 | | |
1037 | 1037 | | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1042 | 1041 | | |
1043 | 1042 | | |
1044 | 1043 | | |
| |||
1115 | 1114 | | |
1116 | 1115 | | |
1117 | 1116 | | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
1122 | 1121 | | |
1123 | 1122 | | |
1124 | 1123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2416 | 2416 | | |
2417 | 2417 | | |
2418 | 2418 | | |
2419 | | - | |
2420 | | - | |
2421 | | - | |
2422 | | - | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
2423 | 2422 | | |
2424 | 2423 | | |
2425 | 2424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1796 | 1796 | | |
1797 | 1797 | | |
1798 | 1798 | | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
1802 | | - | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
1803 | 1802 | | |
1804 | 1803 | | |
1805 | 1804 | | |
| |||
2105 | 2104 | | |
2106 | 2105 | | |
2107 | 2106 | | |
2108 | | - | |
2109 | | - | |
2110 | | - | |
2111 | | - | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
2112 | 2111 | | |
2113 | 2112 | | |
2114 | 2113 | | |
| |||
2122 | 2121 | | |
2123 | 2122 | | |
2124 | 2123 | | |
2125 | | - | |
2126 | | - | |
2127 | | - | |
2128 | | - | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
2129 | 2128 | | |
2130 | 2129 | | |
2131 | 2130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2185 | 2185 | | |
2186 | 2186 | | |
2187 | 2187 | | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
2192 | 2191 | | |
2193 | 2192 | | |
2194 | 2193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | | - | |
| 121 | + | |
123 | 122 | | |
124 | 123 | | |
125 | | - | |
| 124 | + | |
126 | 125 | | |
127 | | - | |
| 126 | + | |
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
| |||
294 | 293 | | |
295 | 294 | | |
296 | 295 | | |
297 | | - | |
298 | | - | |
| 296 | + | |
| 297 | + | |
299 | 298 | | |
300 | | - | |
| 299 | + | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
| |||
334 | 333 | | |
335 | 334 | | |
336 | 335 | | |
337 | | - | |
338 | | - | |
339 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
340 | 339 | | |
341 | 340 | | |
342 | 341 | | |
| |||
350 | 349 | | |
351 | 350 | | |
352 | 351 | | |
353 | | - | |
| 352 | + | |
354 | 353 | | |
355 | 354 | | |
356 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
667 | | - | |
668 | | - | |
| 666 | + | |
| 667 | + | |
669 | 668 | | |
670 | 669 | | |
671 | 670 | | |
| |||
692 | 691 | | |
693 | 692 | | |
694 | 693 | | |
695 | | - | |
| 694 | + | |
696 | 695 | | |
697 | 696 | | |
698 | 697 | | |
| |||
714 | 713 | | |
715 | 714 | | |
716 | 715 | | |
717 | | - | |
| 716 | + | |
| 717 | + | |
718 | 718 | | |
719 | 719 | | |
720 | | - | |
721 | | - | |
| 720 | + | |
| 721 | + | |
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
830 | 829 | | |
831 | 830 | | |
832 | 831 | | |
| |||
0 commit comments