summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2015-11-30 17:12:21 -0500
committerDavid S. Miller <davem@davemloft.net>2015-12-02 23:56:37 -0500
commit6f24e5d599896b5091af72e4b3edfce6307627f7 (patch)
tree96a1226d45f2c95e339f05ba53db778c69d5b955 /drivers/net/ethernet/sfc
parent7450aaf61f0ae2ee6cc6491138d11df2c25e7609 (diff)
sfc: use ALIGN macro for aligning frame sizes
Don't open-code it. CC: Solarflare linux maintainers <linux-net-drivers@solarflare.com> CC: Shradha Shah <sshah@solarflare.com> CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson <jarod@redhat.com> Acked-by: Bert Kenward <bkenward@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/net_driver.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index 5c0d0baa185c..38c422321cda 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -1504,8 +1504,9 @@ static inline struct efx_rx_buffer *efx_rx_buffer(struct efx_rx_queue *rx_queue,
* same cycle, the XMAC can miss the IPG altogether. We work around
* this by adding a further 16 bytes.
*/
+#define EFX_FRAME_PAD 16
#define EFX_MAX_FRAME_LEN(mtu) \
- ((((mtu) + ETH_HLEN + VLAN_HLEN + 4/* FCS */ + 7) & ~7) + 16)
+ (ALIGN(((mtu) + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN + EFX_FRAME_PAD), 8))
static inline bool efx_xmit_with_hwtstamp(struct sk_buff *skb)
{