sk_buff & DMA - Embedded

This is a discussion on sk_buff & DMA - Embedded ; 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) ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: sk_buff & DMA

  1. sk_buff & DMA

    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.

  2. Re: sk_buff & DMA

    On Apr 18, 1:31 pm, Bill 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"

  3. Re: sk_buff & DMA

    On Apr 20, 4:57 pm, Janaka wrote:
    > On Apr 18, 1:31 pm, Bill 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 to Thread