netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net] tg3: Expand 4g_overflow_test workaround to skb fragments of any size.
@ 2013-12-20  1:44 Nithin Nayak Sujir
  2013-12-27 17:52 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Nithin Nayak Sujir @ 2013-12-20  1:44 UTC (permalink / raw)
  To: davem; +Cc: netdev, Nithin Nayak Sujir, stable, Michael Chan

The current driver assumes that an skb fragment can only be upto jumbo
size. Presumably this was a fast-path optimization. This assumption is
no longer true as fragments can be upto 32k.

v2: Remove unnecessary parantheses per Eric Dumazet.

Cc: stable@vger.kernel.org
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/ethernet/broadcom/tg3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index f3dd93b..15a66e4 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -7622,7 +7622,7 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len)
 {
 	u32 base = (u32) mapping & 0xffffffff;
 
-	return (base > 0xffffdcc0) && (base + len + 8 < base);
+	return base + len + 8 < base;
 }
 
 /* Test for TSO DMA buffers that cross into regions which are within MSS bytes
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 net] tg3: Expand 4g_overflow_test workaround to skb fragments of any size.
  2013-12-20  1:44 [PATCH v2 net] tg3: Expand 4g_overflow_test workaround to skb fragments of any size Nithin Nayak Sujir
@ 2013-12-27 17:52 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-12-27 17:52 UTC (permalink / raw)
  To: nsujir; +Cc: netdev, stable, mchan

From: Nithin Nayak Sujir <nsujir@broadcom.com>
Date: Thu, 19 Dec 2013 17:44:11 -0800

> The current driver assumes that an skb fragment can only be upto jumbo
> size. Presumably this was a fast-path optimization. This assumption is
> no longer true as fragments can be upto 32k.
> 
> v2: Remove unnecessary parantheses per Eric Dumazet.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-27 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-20  1:44 [PATCH v2 net] tg3: Expand 4g_overflow_test workaround to skb fragments of any size Nithin Nayak Sujir
2013-12-27 17:52 ` 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).