From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net-next-2.6 PATCH 3/8] vxge: Align the memory only if it is misaligned. Date: Mon, 29 Mar 2010 16:59:45 -0700 (PDT) Message-ID: <20100329.165945.157920838.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, support@neterion.com To: Sreenivasa.Honnur@neterion.com Return-path: Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:37179 "EHLO sunset.davemloft.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753252Ab0C2X7o (ORCPT ); Mon, 29 Mar 2010 19:59:44 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Sreenivasa Honnur Date: Mon, 29 Mar 2010 04:09:47 -0400 (EDT) > - Align the memory only if it is misaligned. > > Signed-off-by: Sreenivasa Honnur > Signed-off-by: Ramkrishna Vepa Applied, but this vxge_os_dma_malloc code is completely unnecessary. If you want to allocate 4K chunks and make sure they are at least 128 byte aligned, you can allocated pages (which are always PAGE_SIZE aligned) and chop them up into the appropriate block size as needed. This is exactly how drivers/net/niu.c handles this situation. See drivers/net/niu.c:niu_rbr_add_page()