lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <565D8B70.6050005@solarflare.com>
Date:	Tue, 1 Dec 2015 11:58:40 +0000
From:	Bert Kenward <bkenward@...arflare.com>
To:	Jarod Wilson <jarod@...hat.com>, <linux-kernel@...r.kernel.org>
CC:	Solarflare linux maintainers <linux-net-drivers@...arflare.com>,
	"Shradha Shah" <sshah@...arflare.com>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes

On 30/11/15 22:12, Jarod Wilson wrote:
> Don't open-code it.
> 
> CC: Solarflare linux maintainers <linux-net-drivers@...arflare.com>
> CC: Shradha Shah <sshah@...arflare.com>
> CC: netdev@...r.kernel.org
> Signed-off-by: Jarod Wilson <jarod@...hat.com>

Acked-by: Bert Kenward <bkenward@...arflare.com>

> ---
>  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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ