LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-03-2017, 04:27 AM   #1
kavitha reddy
LQ Newbie
 
Registered: Mar 2017
Posts: 6

Rep: Reputation: Disabled
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
#What's the difference between these? user2002 Linux - Newbie 6 05-20-2016 07:14 AM
Does csum_tcpudp_magic() calculate UDP checksum same way as kernel does ? android2009 Linux - Networking 0 04-09-2014 04:45 AM
'su' vs 'su -' - What's the difference? junior-s Linux - Newbie 2 09-16-2013 03:32 AM
LXer: Making a Difference; Selling a Difference LXer Syndicated Linux News 0 09-23-2010 05:00 AM
shell script to find the difference betwwn two file and place the difference to other kittunot4u Linux - General 3 07-19-2010 04:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration