Skip to content

Commit b0768a8

Browse files
Toshiaki Makitaborkmann
authored andcommitted
net: Export skb_headers_offset_update
This is needed for veth XDP which does skb_copy_expand()-like operation. v2: - Drop skb_copy_header part because it has already been exported now. Signed-off-by: Toshiaki Makita <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent c4c2021 commit b0768a8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/linux/skbuff.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,7 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
10381038
}
10391039

10401040
struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
1041+
void skb_headers_offset_update(struct sk_buff *skb, int off);
10411042
int skb_copy_ubufs(struct sk_buff *skb, gfp_t gfp_mask);
10421043
struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t priority);
10431044
void skb_copy_header(struct sk_buff *new, const struct sk_buff *old);

net/core/skbuff.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
12911291
}
12921292
EXPORT_SYMBOL(skb_clone);
12931293

1294-
static void skb_headers_offset_update(struct sk_buff *skb, int off)
1294+
void skb_headers_offset_update(struct sk_buff *skb, int off)
12951295
{
12961296
/* Only adjust this if it actually is csum_start rather than csum */
12971297
if (skb->ip_summed == CHECKSUM_PARTIAL)
@@ -1305,6 +1305,7 @@ static void skb_headers_offset_update(struct sk_buff *skb, int off)
13051305
skb->inner_network_header += off;
13061306
skb->inner_mac_header += off;
13071307
}
1308+
EXPORT_SYMBOL(skb_headers_offset_update);
13081309

13091310
void skb_copy_header(struct sk_buff *new, const struct sk_buff *old)
13101311
{

0 commit comments

Comments
 (0)