Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755387AbbK3WMw (ORCPT ); Mon, 30 Nov 2015 17:12:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53859 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754358AbbK3WM3 (ORCPT ); Mon, 30 Nov 2015 17:12:29 -0500 From: Jarod Wilson To: linux-kernel@vger.kernel.org Cc: Jarod Wilson , Solarflare linux maintainers , Shradha Shah , netdev@vger.kernel.org Subject: [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes Date: Mon, 30 Nov 2015 17:12:21 -0500 Message-Id: <1448921541-13343-1-git-send-email-jarod@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1255 Lines: 33 Don't open-code it. CC: Solarflare linux maintainers CC: Shradha Shah CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson --- drivers/net/ethernet/sfc/net_driver.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index a8ddd12..746d591 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h @@ -1502,8 +1502,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) { -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/