From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladislav Yasevich Subject: [PATCH v2 2/2] tg3: Allow for receive of full-size 8021AD frames Date: Fri, 19 Sep 2014 18:23:09 -0400 Message-ID: <1411165389-21276-3-git-send-email-vyasevic@redhat.com> References: <1411165389-21276-1-git-send-email-vyasevic@redhat.com> Cc: Vladislav Yasevich , Prashant Sreedharan , Michael Chan To: netdev@vger.kernel.org Return-path: Received: from mail-qa0-f50.google.com ([209.85.216.50]:41645 "EHLO mail-qa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932195AbaISWXX (ORCPT ); Fri, 19 Sep 2014 18:23:23 -0400 Received: by mail-qa0-f50.google.com with SMTP id k15so3208845qaq.23 for ; Fri, 19 Sep 2014 15:23:22 -0700 (PDT) In-Reply-To: <1411165389-21276-1-git-send-email-vyasevic@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 CC: Prashant Sreedharan CC: Michael Chan Signed-off-by: Vladislav Yasevich --- drivers/net/ethernet/broadcom/tg3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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