lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 25 Oct 2012 09:21:54 -0700
From:	Alexander Duyck <alexander.h.duyck@...el.com>
To:	ratheesh kannoth <ratheesh.ksz@...il.com>
CC:	e1000-devel@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: Re: [E1000-devel] dma_map_page and dma_map_single

We use dma_map_single here because we have a virtual pointer and not a
page.  If you look in the kernel at the file
include/asm-generic/dma-mapping-common.h you will see that
dma_map_single_attrs which is what ends up being called when we call
dma_map_single will convert the pointer to a page and then call
map_page.  This way we don't have to place the overhead for the code
directly in our driver.

Thanks,

Alex

On 10/25/2012 01:58 AM, ratheesh kannoth wrote:
> Hi ,
>
> I was looking at tx_map ( igb-3.3.6  ) in igb driver. I could see that
> dma_map_single is used for first buffer and dma_map_page is used for
> the fragments.
>
> What is the real difference  between these api ?  we can replace
> dma_map_single with dma_map_page. then  why  we used dma_map_single
> here ?.
>
> Thanks,
> Ratheesh
>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists