Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1280357 > unrolled thread
| Started by | Jarod Wilson <jarod@redhat.com> |
|---|---|
| First post | 2015-11-30 23:20 +0100 |
| Last post | 2015-12-03 06:00 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH net-next] sfc: use ALIGN macro for aligning frame sizes Jarod Wilson <jarod@redhat.com> - 2015-11-30 23:20 +0100
Re: [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes Bert Kenward <bkenward@solarflare.com> - 2015-12-01 13:10 +0100
Re: [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes David Miller <davem@davemloft.net> - 2015-12-03 06:00 +0100
| From | Jarod Wilson <jarod@redhat.com> |
|---|---|
| Date | 2015-11-30 23:20 +0100 |
| Subject | [PATCH net-next] sfc: use ALIGN macro for aligning frame sizes |
| Message-ID | <qAEXF-11R-35@gated-at.bofh.it> |
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
--
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/
[toc] | [next] | [standalone]
| From | Bert Kenward <bkenward@solarflare.com> |
|---|---|
| Date | 2015-12-01 13:10 +0100 |
| Message-ID | <qARUR-10a-7@gated-at.bofh.it> |
| In reply to | #1280357 |
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)
> {
>
--
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/
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-12-03 06:00 +0100 |
| Message-ID | <qBu9P-eh-5@gated-at.bofh.it> |
| In reply to | #1280357 |
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. -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web