* [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes
@ 2015-11-30 22:12 Jarod Wilson
2015-12-01 11:58 ` Bert Kenward
2015-12-03 4:56 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Jarod Wilson @ 2015-11-30 22:12 UTC (permalink / raw)
To: linux-kernel
Cc: Jarod Wilson, Solarflare linux maintainers, Shradha Shah, netdev
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes
2015-11-30 22:12 [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes Jarod Wilson
@ 2015-12-01 11:58 ` Bert Kenward
2015-12-03 4:56 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Bert Kenward @ 2015-12-01 11:58 UTC (permalink / raw)
To: Jarod Wilson, linux-kernel
Cc: Solarflare linux maintainers, Shradha Shah, netdev
On 30/11/15 22:12, Jarod Wilson wrote:
> 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>
> ---
> 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)
> {
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes
2015-11-30 22:12 [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes Jarod Wilson
2015-12-01 11:58 ` Bert Kenward
@ 2015-12-03 4:56 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-12-03 4:56 UTC (permalink / raw)
To: jarod; +Cc: linux-kernel, linux-net-drivers, sshah, netdev
From: Jarod Wilson <jarod@redhat.com>
Date: Mon, 30 Nov 2015 17:12:21 -0500
> 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>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-03 4:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 22:12 [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes Jarod Wilson
2015-12-01 11:58 ` Bert Kenward
2015-12-03 4:56 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).