mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
udp: Switch to ip_finish_skb
This patch converts UDP to use the new ip_finish_skb API. This would then allows us to more easily use ip_make_skb which allows UDP to run without a socket lock. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1c32c5ad6f
commit
f6b9664f8b
3 changed files with 99 additions and 59 deletions
|
@ -144,6 +144,17 @@ static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb)
|
|||
return csum;
|
||||
}
|
||||
|
||||
static inline __wsum udp_csum(struct sk_buff *skb)
|
||||
{
|
||||
__wsum csum = csum_partial(skb_transport_header(skb),
|
||||
sizeof(struct udphdr), skb->csum);
|
||||
|
||||
for (skb = skb_shinfo(skb)->frag_list; skb; skb = skb->next) {
|
||||
csum = csum_add(csum, skb->csum);
|
||||
}
|
||||
return csum;
|
||||
}
|
||||
|
||||
/* hash routines shared between UDPv4/6 and UDP-Litev4/6 */
|
||||
static inline void udp_lib_hash(struct sock *sk)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue