提交 13e9ab11 编写于 作者: B Ben Hutchings 提交者: Jeff Garzik

sfc: Use CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS where appropriate

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: NBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 951f46a1
...@@ -474,7 +474,7 @@ enum nic_state { ...@@ -474,7 +474,7 @@ enum nic_state {
* This is the equivalent of NET_IP_ALIGN [which controls the alignment * This is the equivalent of NET_IP_ALIGN [which controls the alignment
* of the skb->head for hardware DMA]. * 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 #define EFX_PAGE_IP_ALIGN 0
#else #else
#define EFX_PAGE_IP_ALIGN NET_IP_ALIGN #define EFX_PAGE_IP_ALIGN NET_IP_ALIGN
......
...@@ -516,7 +516,7 @@ void efx_remove_tx_queue(struct efx_tx_queue *tx_queue) ...@@ -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, /* Number of bytes inserted at the start of a TSO header buffer,
* similar to NET_IP_ALIGN. * similar to NET_IP_ALIGN.
*/ */
#if defined(__i386__) || defined(__x86_64__) #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
#define TSOH_OFFSET 0 #define TSOH_OFFSET 0
#else #else
#define TSOH_OFFSET NET_IP_ALIGN #define TSOH_OFFSET NET_IP_ALIGN
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册