net: add skb_checksum_setup
This patch adds a function to set up the partial checksum offset for IP packets (and optionally re-calculate the pseudo-header checksum) into the core network code. The implementation was previously private and duplicated between xen-netback and xen-netfront, however it is not xen-specific and is potentially useful to any network driver. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Veaceslav Falico <vfalico@redhat.com> Cc: Alexander Duyck <alexander.h.duyck@intel.com> Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b86f81cca9
commit
ed1f50c3a7
2 changed files with 275 additions and 0 deletions
|
@ -2893,6 +2893,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);
|
||||
|
||||
int skb_checksum_setup(struct sk_buff *skb, bool recalculate);
|
||||
|
||||
u32 __skb_get_poff(const struct sk_buff *skb);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue