what is the difference between csum_tcpudp_nofold and csum_tcpudp_magic
Hi
I have below code in my kernel version in udp checksum init function(udp4_csum_init)
if (uh->check == 0)
{
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
else if (skb->ip_summed == CHECKSUM_COMPLETE)
{
if (!csum_tcpudp_magic(iph->saddr, iph->daddr, skb->len,
proto, skb->csum))
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
if (!skb_csum_unnecessary(skb))
skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr,
skb->len, proto, 0);
what is the difference between csum_tcpudp_magic and csum_tcpudp_nofold?are they computing only checksum of pseudo header or checksum of header and data also?
|