netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ron Mercer <ron.mercer@qlogic.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, ron.mercer@qlogic.com
Subject: [net-next PATCH 2/8] qlge: Drop inbound frames > MTU.
Date: Tue,  9 Jun 2009 08:39:28 -0700	[thread overview]
Message-ID: <1244561974-25662-2-git-send-email-ron.mercer@qlogic.com> (raw)
In-Reply-To: <1244561974-25662-1-git-send-email-ron.mercer@qlogic.com>

The max frame size register is set higher than the MTU to
accomodate FCoE frames.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
 drivers/net/qlge/qlge_main.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 45da405..7c17aa2 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -1525,6 +1525,15 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev,
 		dev_kfree_skb_any(skb);
 		return;
 	}
+
+	/* The max framesize filter on this chip is set higher than
+	 * MTU since FCoE uses 2k frames.
+	 */
+	if (skb->len > ndev->mtu + ETH_HLEN) {
+		dev_kfree_skb_any(skb);
+		return;
+	}
+
 	prefetch(skb->data);
 	skb->dev = ndev;
 	if (ib_mac_rsp->flags1 & IB_MAC_IOCB_RSP_M_MASK) {
-- 
1.6.0.2


  reply	other threads:[~2009-06-09 15:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09 15:39 [net-next PATCH 1/8] qlge: Drop inbound error frames Ron Mercer
2009-06-09 15:39 ` Ron Mercer [this message]
2009-06-10  8:05   ` [net-next PATCH 2/8] qlge: Drop inbound frames > MTU David Miller
2009-06-09 15:39 ` [net-next PATCH 3/8] qlge: Add support for retrieving firmware version Ron Mercer
2009-06-10  8:05   ` David Miller
2009-06-09 15:39 ` [net-next PATCH 4/8] qlge: Remove netif_set_gso_max_size() call Ron Mercer
2009-06-10  8:05   ` David Miller
2009-06-09 15:39 ` [net-next PATCH 5/8] qlge: Add set TX csum ethtool op Ron Mercer
2009-06-10  8:05   ` David Miller
2009-06-09 15:39 ` [net-next PATCH 6/8] qlge: Add support for varied pcie function numbers Ron Mercer
2009-06-10  8:05   ` David Miller
2009-06-09 15:39 ` [net-next PATCH 7/8] qlge: Add support for using alternate MAC address Ron Mercer
2009-06-10  8:05   ` David Miller
2009-06-09 15:39 ` [net-next PATCH 8/8] qlge: bugfix: Get rid of errant spin_unlock() Ron Mercer
2009-06-09 16:25   ` Ron Mercer
2009-06-09 16:35   ` Ron Mercer
2009-06-10  8:06     ` David Miller
2009-06-10  8:05 ` [net-next PATCH 1/8] qlge: Drop inbound error 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=1244561974-25662-2-git-send-email-ron.mercer@qlogic.com \
    --to=ron.mercer@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).