Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756067AbbLAMI5 (ORCPT ); Tue, 1 Dec 2015 07:08:57 -0500 Received: from nbfkord-smmo03.seg.att.com ([209.65.160.84]:62590 "EHLO nbfkord-smmo03.seg.att.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755185AbbLAMI4 (ORCPT ); Tue, 1 Dec 2015 07:08:56 -0500 X-Greylist: delayed 609 seconds by postgrey-1.27 at vger.kernel.org; Tue, 01 Dec 2015 07:08:56 EST X-MXL-Hash: 565d8dd80d09237b-56db34759706898ab079e083bf2d97599907db16 X-MXL-Hash: 565d8b7870d48af9-43ae008134043a51da616f004e75fa492a01f376 Subject: Re: [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes To: Jarod Wilson , References: <1448921541-13343-1-git-send-email-jarod@redhat.com> CC: Solarflare linux maintainers , "Shradha Shah" , From: Bert Kenward Organization: Solarflare Message-ID: <565D8B70.6050005@solarflare.com> Date: Tue, 1 Dec 2015 11:58:40 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1448921541-13343-1-git-send-email-jarod@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.17.20.82] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ocex03.SolarFlarecom.com (10.20.40.36) X-AnalysisOut: [v=2.0 cv=VvKU9ZKn c=1 sm=1 a=8BlWFWvVlq5taO8ncb8nKg==:17 a] X-AnalysisOut: [=zRKbQ67AAAAA:8 a=OjXlt12Agc0A:10 a=wUQvQvOEmiQA:10 a=VwQb] X-AnalysisOut: [UJbxAAAA:8 a=20KFwNOVAAAA:8 a=UoSFhl_AfEVm1boNheYA:9 a=pIL] X-AnalysisOut: [NOxqGKmIA:10] X-Spam: [F=0.2693202565; CM=0.500; S=0.269(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [12.187.104.26] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1385 Lines: 35 On 30/11/15 22:12, Jarod Wilson wrote: > Don't open-code it. > > CC: Solarflare linux maintainers > CC: Shradha Shah > CC: netdev@vger.kernel.org > Signed-off-by: Jarod Wilson Acked-by: Bert Kenward > --- > 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) > { > -- 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/