netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladislav Yasevich <vyasevich@gmail.com>
To: netdev@vger.kernel.org
Cc: prashant@broadcom.com, mchan@broadcom.com,
	sony.chacko@qlogic.com, Dept-HSGLinuxNICDev@qlogic.com,
	Vladislav Yasevich <vyasevic@redhat.com>
Subject: [PATCH v2 net 2/2] bnx2: Correctly receive full sized 802.1ad fragmes
Date: Tue, 30 Sep 2014 19:39:37 -0400	[thread overview]
Message-ID: <1412120377-11125-3-git-send-email-vyasevic@redhat.com> (raw)
In-Reply-To: <1412120377-11125-1-git-send-email-vyasevic@redhat.com>

This driver, similar to tg3, has a check that will
cause full sized 802.1ad frames to be dropped.  The
frame will be larger then the standard mtu due to the
presense of vlan header that has not been stripped.
The driver should not drop this frame and should process
it just like it does for 802.1q.

CC: Sony Chacko <sony.chacko@qlogic.com>
CC: Dept-HSGLinuxNICDev@qlogic.com
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
---
 drivers/net/ethernet/broadcom/bnx2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 2fee73b..823d01c 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -3236,8 +3236,9 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
 
 		skb->protocol = eth_type_trans(skb, bp->dev);
 
-		if ((len > (bp->dev->mtu + ETH_HLEN)) &&
-			(ntohs(skb->protocol) != 0x8100)) {
+		if (len > (bp->dev->mtu + ETH_HLEN) &&
+		    skb->protocol != htons(0x8100) &&
+		    skb->protocol != htons(ETH_P_8021AD)) {
 
 			dev_kfree_skb(skb);
 			goto next_rx;
-- 
1.9.3

  parent reply	other threads:[~2014-09-30 23:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 23:39 [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames Vladislav Yasevich
2014-09-30 23:39 ` [PATCH v2 net 1/2] tg3: Allow for recieve of full-size 8021AD frames Vladislav Yasevich
2014-09-30 23:39 ` Vladislav Yasevich [this message]
2014-10-01 20:45 ` [PATCH v2 net 0/2] Alow tg3/bnx recevie full sized 802.1ad frames David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412120377-11125-3-git-send-email-vyasevic@redhat.com \
    --to=vyasevich@gmail.com \
    --cc=Dept-HSGLinuxNICDev@qlogic.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=prashant@broadcom.com \
    --cc=sony.chacko@qlogic.com \
    --cc=vyasevic@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).