From patchwork Tue Sep 30 23:39:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Yasevich X-Patchwork-Id: 395374 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 23681140272 for ; Wed, 1 Oct 2014 09:39:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751053AbaI3Xjt (ORCPT ); Tue, 30 Sep 2014 19:39:49 -0400 Received: from mail-qa0-f47.google.com ([209.85.216.47]:63282 "EHLO mail-qa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbaI3Xjr (ORCPT ); Tue, 30 Sep 2014 19:39:47 -0400 Received: by mail-qa0-f47.google.com with SMTP id cm18so10185qab.20 for ; Tue, 30 Sep 2014 16:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6NrvtQT5SRm3mAikg4fYGD4iOTrbDwqC+JuM3P2wHus=; b=igEEe7qIph9yihFJ9TNHckA/tYHv1xGFFCbEBGu6f2l8hNcKptvQlBsdMBiZYdp2po TrS6lhwh6ZOUcrItAckDrXn+5qmjkhvJMwUQWGDBiYp4Y9WR8NOf0TpRvOyfWVwCnxFO Isp4HuO/1DK0WF0c4fwW7/iw71OZP+4MBIV2QsmeMbyuAWil7QYm3+//q0rz32ITLu1T cp+UyHOXGwVtzUL8oLkxxD3j2hBuN9Eu7Po5SW9b1BAWfrARyYPHpCtlP1By3yTXazGk EvmrHlkSmyjcQ6FfrV+p0idpfI6T/MZ5Yy61LZQeTh1Ra3GKiGdGyUOJLTv2l13VDoQK nKOw== X-Received: by 10.224.127.131 with SMTP id g3mr24925930qas.81.1412120387120; Tue, 30 Sep 2014 16:39:47 -0700 (PDT) Received: from flash.redhat.com (pool-70-109-148-253.cncdnh.east.myfairpoint.net. [70.109.148.253]) by mx.google.com with ESMTPSA id n46sm15008935qgn.9.2014.09.30.16.39.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Sep 2014 16:39:46 -0700 (PDT) From: Vladislav Yasevich X-Google-Original-From: Vladislav Yasevich To: netdev@vger.kernel.org Cc: prashant@broadcom.com, mchan@broadcom.com, sony.chacko@qlogic.com, Dept-HSGLinuxNICDev@qlogic.com, Vladislav Yasevich Subject: [PATCH v2 net 1/2] tg3: Allow for recieve of full-size 8021AD frames Date: Tue, 30 Sep 2014 19:39:36 -0400 Message-Id: <1412120377-11125-2-git-send-email-vyasevic@redhat.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1412120377-11125-1-git-send-email-vyasevic@redhat.com> References: <1412120377-11125-1-git-send-email-vyasevic@redhat.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 receving 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 e7d3a62..ba49948 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; }