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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061214110517.GA13377@infradead.org>
Date:	Thu, 14 Dec 2006 11:05:17 +0000
From:	Christoph Hellwig <hch@...radead.org>
To:	Linas Vepstas <linas@...tin.ibm.com>
Cc:	Andrew Morton <akpm@...l.org>, netdev@...r.kernel.org,
	linuxppc-dev@...abs.org, jgarzik@...ox.com,
	Christoph Hellwig <hch@...radead.org>,
	Ishizaki Kou <kou.ishizaki@...hiba.co.jp>,
	Jens Osterkamp <Jens.Osterkamp@....de>,
	James K Lewis <jim@...ewis.com>,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 1/14] Spidernet DMA coalescing

On Wed, Dec 13, 2006 at 03:06:59PM -0600, Linas Vepstas wrote:
> 
> The current driver code performs 512 DMA mappings of a bunch of 
> 32-byte ring descriptor structures. This is silly, as they are 
> all in contiguous memory. This patch changes the code to 
> dma_map_coherent() each rx/tx ring as a whole.

It's acutally dma_alloc_coherent now that you updated the patch :)

> +	chain->ring = dma_alloc_coherent(&card->pdev->dev, alloc_size,
> +		&chain->dma_addr, GFP_KERNEL);
>  
> +	if (!chain->ring)
> +		return -ENOMEM;
>  
> +	descr = chain->ring;
> +	memset(descr, 0, alloc_size);

dma_alloc_coherent is defined to zero the allocated memory, so you
won't need this memset.

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ