Skip to content

Commit

Permalink
tg3: Expand 4g_overflow_test workaround to skb fragments of any size.
Browse files Browse the repository at this point in the history
commit 3756791 upstream.

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.

Signed-off-by: Nithin Nayak Sujir <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Nithin Sujir authored and gregkh committed Jan 9, 2014
1 parent 36bbba0 commit 43ed0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -7608,7 +7608,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
Expand Down

0 comments on commit 43ed0ac

Please sign in to comment.