diff mbox

tg3: Allow for receive of full-size 8021AD frames

Message ID 542AFC14.6030304@redhat.com
State Deferred, archived
Delegated to: David Miller
Headers show

Commit Message

Vlad Yasevich Sept. 30, 2014, 6:53 p.m. UTC
When receiving a vlan-tagged frame that still contains
a vlan header, the length of the packet will be greater
then MTU+ETH_HLEN since it will account of the extra
vlan header.  TG3 checks this for the case for 802.1Q,
but not for 802.1ad.  As a result, full sized 802.1ad
frames get dropped by the card.

Add a check for 802.1ad protocol when receiving full
sized frames.

Suggested-by: Prashant Sreedharan <prashant@broadcom.com>
CC: Prashant Sreedharan <prashant@broadcom.com>
CC: Michael Chan <mchan@broadcom.com>
Acked-by: Prashant Sreedharan <prashant@broadcom.com>
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
This patch somehow got dropped.  Please apply and queue for stable.

 drivers/net/ethernet/broadcom/tg3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Sept. 30, 2014, 9:02 p.m. UTC | #1
From: Vlad Yasevich <vyasevic@redhat.com>
Date: Tue, 30 Sep 2014 14:53:08 -0400

> This patch somehow got dropped.  Please apply and queue for stable.

Because I applied your original patch:

	http://patchwork.ozlabs.org/patch/390834/

This patch here doesn't even apply to the 'net' tree because of that.

Please sort that out.

I'm marking this patch and the similar bnx2 one 'deferred'.  Please
resubmit everything once you've sorted things out.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 0a0938d..4f674f9 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6918,7 +6918,8 @@  static int tg3_rx(struct tg3_napi *tnapi, int budget)
 		skb->protocol = eth_type_trans(skb, tp->dev);
  		if (len > (tp->dev->mtu + ETH_HLEN) &&
-		    skb->protocol != htons(ETH_P_8021Q)) {
+		    skb->protocol != htons(ETH_P_8021Q) &&
+		    skb->protocol != htons(ETH_P_8021AD)) {
 			dev_kfree_skb_any(skb);
 			goto drop_it_no_recycle;
 		}
-- 
1.9.3