public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Amit Salecha <amit.salecha@qlogic.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Ameen Rahman <ameen.rahman@qlogic.com>,
	Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Subject: RE: [PATCH] qlcnic: dma address align check
Date: Tue, 26 Oct 2010 12:30:33 +0200	[thread overview]
Message-ID: <1288089033.3169.73.camel@edumazet-laptop> (raw)
In-Reply-To: <99737F4847ED0A48AECC9F4A1974A4B80F871A817A@MNEXMB2.qlogic.org>

Le mardi 26 octobre 2010 à 05:04 -0500, Amit Salecha a écrit :

> Is it ? I am not aware about such calculation.

Yes it is

> Is pci_alloc_consistent guarantee to give PAGE align dma address ?

I believe so

By the way, you should use dma_alloc_coherent() instead of
pci_alloc_consistent() so that you can use GFP_KERNEL allocations
instead of GFP_ATOMIC, it might help in low memory conditions (if you
dont hold a spinlock at this point)


If TX_DESC_RINGSIZE(tx_ring) is not a power of two, then yes you could
probably add 64 bytes and avoid allocating a full page only for the u32
field ;)




  reply	other threads:[~2010-10-26 10:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26  9:37 [PATCH 0/4]qlcnic: bug fixes Amit Kumar Salecha
2010-10-26  9:37 ` [PATCH] qlcnic: fix mac learning Amit Kumar Salecha
2010-10-26  9:38 ` [PATCH] qlcnic: reduce RX ring size for nic partition Amit Kumar Salecha
2010-10-26  9:38 ` [PATCH] qlcnic: define valid vlan id range Amit Kumar Salecha
2010-10-26  9:38 ` [PATCH] qlcnic: dma address align check Amit Kumar Salecha
2010-10-26  9:54   ` Eric Dumazet
2010-10-26 10:04     ` Amit Salecha
2010-10-26 10:30       ` Eric Dumazet [this message]
2010-10-26 10:52         ` Amit Salecha
2010-10-26 12:03         ` [PATCH net-next-2.6] tg3: use dma_alloc_coherent() instead of pci_alloc_consistent() Eric Dumazet
2010-10-26 17:04           ` Matt Carlson
2010-10-26 15:37 ` [PATCH 0/4]qlcnic: bug fixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288089033.3169.73.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=ameen.rahman@qlogic.com \
    --cc=amit.salecha@qlogic.com \
    --cc=anirban.chakraborty@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox