[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTiktJXEyofbaoOvSJEtqk5bL5VbzP7fbbFHZkru+@mail.gmail.com>
Date: Tue, 14 Dec 2010 13:46:39 -0800
From: Jesse Gross <jesse@...ira.com>
To: Matt Carlson <mcarlson@...adcom.com>
Cc: Michael Leun <lkml20101129@...ton.leun.net>,
Michael Chan <mchan@...adcom.com>,
Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>,
Ben Greear <greearb@...delatech.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 2.6.36] vlan: Avoid hwaccel vlan packets when vid not used
On Tue, Dec 14, 2010 at 11:15 AM, Matt Carlson <mcarlson@...adcom.com> wrote:
> @@ -9538,17 +9505,8 @@ static void __tg3_set_rx_mode(struct net_device *dev)
> /* When ASF is in use, we always keep the RX_MODE_KEEP_VLAN_TAG
> * flag clear.
> */
> -#if TG3_VLAN_TAG_USED
> - if (!tp->vlgrp &&
> - !(tp->tg3_flags & TG3_FLAG_ENABLE_ASF))
> - rx_mode |= RX_MODE_KEEP_VLAN_TAG;
> -#else
> - /* By definition, VLAN is disabled always in this
> - * case.
> - */
> if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF))
> rx_mode |= RX_MODE_KEEP_VLAN_TAG;
> -#endif
Just one comment:
I don't think this does quite the right thing: it will always disable
vlan stripping unless ASF is in use. However, it's now OK to always
use vlan stripping, so we might as well take advantage of it. Since
without the set_flags Ethtool op there is no way to change this
setting, we should be able to just drop this code block completely
(and the check for RX_MODE_KEEP_VLAN_TAG on receive).
In addition, this should also remove any differences between ASF
enabled/disabled firmware (at least with respect to vlans) since it
will no longer be a factor.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists