lkml.org 
[lkml]   [2010]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2.6.36] vlan: Avoid hwaccel vlan packets when vid not used
From
On Tue, Dec 14, 2010 at 11:15 AM, Matt Carlson <mcarlson@broadcom.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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-12-14 22:49    [W:0.122 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site