net: flow_dissector: add __skb_get_poff to get a start offset to payload
__skb_get_poff() returns the offset to the payload as far as it could be dissected. The main user is currently BPF, so that we can dynamically truncate packets without needing to push actual payload to the user space and instead can analyze headers only. Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
61816596d1
commit
f77668dc25
@@ -2840,6 +2840,8 @@ static inline void skb_checksum_none_assert(const struct sk_buff *skb)
|
||||
|
||||
bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off);
|
||||
|
||||
u32 __skb_get_poff(const struct sk_buff *skb);
|
||||
|
||||
/**
|
||||
* skb_head_is_locked - Determine if the skb->head is locked down
|
||||
* @skb: skb to check
|
||||
|
Reference in New Issue
Block a user