[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080304111832.GA20494@ee.oulu.fi>
Date: Tue, 4 Mar 2008 13:18:32 +0200
From: Pekka Pietikainen <pp@...oulu.fi>
To: Pavel Krauz <krauz@...z.cz>
Cc: netdev@...r.kernel.org
Subject: Re: capturing vlan on 2.6.18
On Thu, Feb 28, 2008 at 12:26:08PM +0100, Pavel Krauz wrote:
> >> Is this a kernel bug or am I supposed to set something?
> > It's an unfortunate side effect of hardware VLAN acceleration. It
> > can't be turned off (apart from patching the driver to not advertise
> > VLAN acceleration support).
> I think that enabling VLAN tags shall be at least kernel run-time or boot time
> configurable option.
>
> For a test I have tried to enable VLAN tags in the Broadcom NX2 network driver (drivers/net/bnx2.c)
> and I got the VLAN back. Can you tell me if this is the correct way:
>
> --- bnx2.c.bak 2008-02-28 11:47:29.000000000 +0100
> +++ bnx2.c 2008-02-28 11:47:43.000000000 +0100
> @@ -2039,6 +2039,7 @@
> #endif
> if (dev->flags & IFF_PROMISC) {
> /* Promiscuous mode. */
> + rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG;
> rx_mode |= BNX2_EMAC_RX_MODE_PROMISCUOUS;
> sort_mode |= BNX2_RPM_SORT_USER0_PROM_EN;
> }
>
Oh, the no VLAN tags with bnx2 is a slightly different matter,
I've used the patch
#ifdef BCM_VLAN
if (!bp->vlgrp && !(bp->flags & ASF_ENABLE_FLAG))
rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG;
#else
->
if (!bp->vlgrp) // && !(bp->flags & ASF_ENABLE_FLAG))
rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG;
Apparently there's a DOS tool that can be used to disable the ASF bit
(It's some enterprise management thing that I haven't ever figured out what
it's even useful for) permanently,
http://www.broadcom.com/support/ethernet_nic/netxtremeii.php
Since I need lots of ports on my monitoring boxes anyway, I just use
external dual-port e1000's for monitoring and use the on-board bnx2 for
managment. Much easier :-)
--
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