Skip to content

Commit

Permalink
sfc: Use CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS where appropriate
Browse files Browse the repository at this point in the history
For some buffers we use a starting offset of either NET_IP_ALIGN or 0
depending on whether we believe the architecture supports efficient
access to unaligned words.  There is now a config macro specifying
whether this is the case, so check that rather than checking for
specific architectures.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Ben Hutchings authored and Jeff Garzik committed Sep 24, 2008
1 parent 951f46a commit 13e9ab1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/sfc/net_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ enum nic_state {
* This is the equivalent of NET_IP_ALIGN [which controls the alignment
* of the skb->head for hardware DMA].
*/
#if defined(__i386__) || defined(__x86_64__)
#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
#define EFX_PAGE_IP_ALIGN 0
#else
#define EFX_PAGE_IP_ALIGN NET_IP_ALIGN
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/sfc/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ void efx_remove_tx_queue(struct efx_tx_queue *tx_queue)
/* Number of bytes inserted at the start of a TSO header buffer,
* similar to NET_IP_ALIGN.
*/
#if defined(__i386__) || defined(__x86_64__)
#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
#define TSOH_OFFSET 0
#else
#define TSOH_OFFSET NET_IP_ALIGN
Expand Down

0 comments on commit 13e9ab1

Please sign in to comment.