From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: [VLAN 06/18]: Kill useless check
Date: Sun, 20 Jan 2008 18:11:25 +0100 (MET) [thread overview]
Message-ID: <20080120171125.7980.42474.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080120171117.7980.67072.sendpatchset@localhost.localdomain>
[VLAN]: Kill useless check
vlan->real_dev is always equal to the device since thats what we used
for the lookup. It doesn't even seem worth a WARN_ON or BUG_ON.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 99c94d927602635ca0994a99bf75edc0d2f80871
tree b7455cbbe55a60f0d13a3b9b64694099e718e6d9
parent aa7c9ed461cf1cf1977a7d5735d464a7539d2518
author Patrick McHardy <kaber@trash.net> Sun, 20 Jan 2008 16:24:55 +0100
committer Patrick McHardy <kaber@trash.net> Sun, 20 Jan 2008 16:24:55 +0100
net/8021q/vlan_dev.c | 18 ------------------
1 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 51ce421..50d8edc 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -181,24 +181,6 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
/* Take off the VLAN header (4 bytes currently) */
skb_pull_rcsum(skb, VLAN_HLEN);
- /* Ok, lets check to make sure the device (dev) we
- * came in on is what this VLAN is attached to.
- */
-
- if (dev != VLAN_DEV_INFO(skb->dev)->real_dev) {
- rcu_read_unlock();
-
-#ifdef VLAN_DEBUG
- printk(VLAN_DBG "%s: dropping skb: %p because came in on wrong device, dev: %s real_dev: %s, skb_dev: %s\n",
- __FUNCTION__, skb, dev->name,
- VLAN_DEV_INFO(skb->dev)->real_dev->name,
- skb->dev->name);
-#endif
- kfree_skb(skb);
- stats->rx_errors++;
- return -1;
- }
-
/*
* Deal with ingress priority mapping.
*/
next prev parent reply other threads:[~2008-01-20 17:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-20 17:11 [VLAN 00/18]: Vlan update Patrick McHardy
2008-01-20 17:11 ` [VLAN 01/18]: Remove unnecessary structure declarations Patrick McHardy
2008-01-20 17:11 ` [VLAN 02/18]: Clean up vlan_hdr/vlan_ethhdr structs Patrick McHardy
2008-01-20 17:11 ` [VLAN 03/18]: Kill useless VLAN_NAME define Patrick McHardy
2008-01-20 17:11 ` [VLAN 04/18]: Use dev->stats Patrick McHardy
2008-01-20 17:11 ` [VLAN 05/18]: Move device setup to vlan_dev.c Patrick McHardy
2008-01-20 17:11 ` Patrick McHardy [this message]
2008-01-20 17:11 ` [ETHER 07/18]: Bring back MAC_FMT Patrick McHardy
2008-01-20 17:11 ` [VLAN 08/18]: Clean up debugging and printks Patrick McHardy
2008-01-20 17:11 ` [VLAN 09/18]: Remove non-implemented ioctls Patrick McHardy
2008-01-20 17:11 ` [VLAN 10/18]: Clean up initialization code Patrick McHardy
2008-01-20 17:11 ` [VLAN 11/18]: Clean up unregister_vlan_dev Patrick McHardy
2008-01-20 17:11 ` [VLAN 12/18]: Simplify vlan unregistration Patrick McHardy
2008-01-20 17:11 ` [VLAN 13/18]: Turn VLAN_DEV_INFO into inline function Patrick McHardy
2008-01-20 17:11 ` [VLAN 14/18]: Turn __constant_htons into htons where possible Patrick McHardy
2008-01-20 17:11 ` [VLAN 15/18]: checkpatch cleanups Patrick McHardy
2008-01-20 17:11 ` [VLAN 16/18]: Update list address Patrick McHardy
2008-01-20 17:11 ` [VLAN 17/18]: Clean up vlan_skb_recv() Patrick McHardy
2008-01-20 17:11 ` [VLAN 18/18]: Move protocol determination to seperate function Patrick McHardy
2008-01-21 8:34 ` [VLAN 00/18]: Vlan update David Miller
2008-01-21 17:48 ` [VLAN] sparse warning fix Stephen Hemminger
2008-01-22 1:28 ` 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=20080120171125.7980.42474.sendpatchset@localhost.localdomain \
--to=kaber@trash.net \
--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).