Networking Forums

Networking Forums > Computer Networking > Linux Networking > sk_buff & DMA

Reply
Thread Tools Display Modes

sk_buff & DMA

 
 
Bill
Guest
Posts: n/a

 
      04-18-2008, 03:31 AM
I am having difficulty DMA'ing into sk_buffs. I have DMA code that
works except when the destination is the data buffer in an sk_buff.
No transfer error is reported in the status register but the sk_buff
data buffer (the destination) is all zeros following the DMA while the
source buffer is nonzero. I am running Linux 2.6.10 on an MPC8248.
 
Reply With Quote
 
 
 
 
Janaka
Guest
Posts: n/a

 
      04-20-2008, 11:57 PM
On Apr 18, 1:31 pm, Bill <jobhunt...@aol.com> wrote:
> I am having difficulty DMA'ing into sk_buffs. I have DMA code that
> works except when the destination is the data buffer in an sk_buff.
> No transfer error is reported in the status register but the sk_buff
> data buffer (the destination) is all zeros following the DMA while the
> source buffer is nonzero. I am running Linux 2.6.10 on an MPC8248.


These are classic symptoms of caching issues. My guess is because the
DMA HW does the transfer of your data, the processor cache is not
aware of the changes in actual memory. Try manually flushing /
reloading your cache for the destination memory.
BTW "dma_map_single /dma_unmap_single" does not work for some ppc
architectures. So manually flush the cache using "flush_dcache_range"
 
Reply With Quote
 
Bill
Guest
Posts: n/a

 
      04-23-2008, 07:36 AM
On Apr 20, 4:57 pm, Janaka <jana...@optiscan.com> wrote:
> On Apr 18, 1:31 pm, Bill <jobhunt...@aol.com> wrote:
>
> > I am having difficulty DMA'ing into sk_buffs. I have DMA code that
> > works except when the destination is the data buffer in an sk_buff.
> > No transfer error is reported in the status register but the sk_buff
> > data buffer (the destination) is all zeros following the DMA while the
> > source buffer is nonzero. I am running Linux 2.6.10 on an MPC8248.

>
> These are classic symptoms of caching issues. My guess is because the
> DMA HW does the transfer of your data, the processor cache is not
> aware of the changes in actual memory. Try manually flushing /
> reloading your cache for the destination memory.
> BTW "dma_map_single /dma_unmap_single" does not work for some ppc
> architectures. So manually flush the cache using "flush_dcache_range"


Thank you for the suggestion. My problem turned out to be the program
I was using to read memory was not able to read from the memory
location of the DMA's destination. When I read the memory location
within my driver I saw that the DMA was successful.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
obtain ARP header from 'sk_buff' Mark Linux Networking 0 10-07-2010 09:16 AM
How to send a tcp packet to same machine from a kernel module by creating a sk_buff struct will_u_tellmemore Linux Networking 0 01-11-2007 12:45 PM
problems with sk_buff implementation Venu Linux Networking 0 06-24-2004 02:59 AM
how to construct the sk_buff structure by myself? fangweiwei Linux Networking 0 02-17-2004 10:13 AM



1 2 3 4 5 6 7 8 9 10 11