Re: Verify checksum of IP header and TCP header

2014-02-11 Thread Guibin(Bill) Tian
oh, thank you so much!!! On Tue, Feb 11, 2014 at 4:19 PM, John de la Garza wrote: > On Tue, Feb 11, 2014 at 03:03:42PM -0500, Guibin(Bill) Tian wrote: > > Hi, > > I am looking for the code in linux kernel that verifies the checksum of > TCP > > header and IP header for inbound packet. The packe

Re: Verify checksum of IP header and TCP header

2014-02-11 Thread John de la Garza
On Tue, Feb 11, 2014 at 03:03:42PM -0500, Guibin(Bill) Tian wrote: > Hi, > I am looking for the code in linux kernel that verifies the checksum of TCP > header and IP header for inbound packet. The packet supposes to be dropped > if the checksum doesn't match. Here is some code that checks the TCP

Verify checksum of IP header and TCP header

2014-02-11 Thread Guibin(Bill) Tian
Hi, I am looking for the code in linux kernel that verifies the checksum of TCP header and IP header for inbound packet. The packet supposes to be dropped if the checksum doesn't match. I tried tcp_input.c and ip_input.c, also with global search. But I couldn't find any code that does this job. Ca

Re: How can I get physical address from a struct dma_buf

2014-02-11 Thread naveen yadav
how about using define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) or virt_to_phys () On Sat, Feb 8, 2014 at 1:32 AM, m silverstri wrote: > Hi, > > If I have a struct dma_buf dma buffer, how can I the physical address? > >

Re: cache coherency guidelines for DMA buffer

2014-02-11 Thread naveen yadav
apart from this you need to be aware of your cache type used in system On Sat, Feb 8, 2014 at 8:41 PM, Miles MH Chen wrote: > Hi, > > dma_map_xxx / dma_unmap_xxx pair are used to do cache coherency. > see Documentation/DMA-API.txt. > > dma_map_xxx: "Maps a piece of processor virtual memory so it

Re: spinlock lockup suspected reasons

2014-02-11 Thread naveen yadav
Hi Ashish, In Kernel when enable spin_lock debugging, the code path and behavior of spin_lock is changed. when debugging is off, spin_lock() spin in tight loop, but in spin_lock_debug it work as try() lock (). So we can debug the system and find who hold the lock for long time. Below is sequenc

Re: When to submit into drivers/staging

2014-02-11 Thread Johannes Thumshirn
On Mon, Feb 10, 2014 at 09:45:20AM +0100, Bjørn Mork wrote: > Johannes Thumshirn writes: > > > Hi, > > > > I have a question regarding driver submission into mainline. I'm not exactly > > sure if my driver is ready to be submittet into normal drivers or if it > > would be > > better to submit it