em promiscuous mode bug?

Ian FREISLICH if at hetzner.co.za
Mon Jul 31 11:26:05 UTC 2006


Pyun YongHyeon wrote:
> On Mon, Jul 31, 2006 at 07:16:03AM +0200, Ian FREISLICH wrote:
>  > Pyun YongHyeon wrote:
>  > > Hardware VLAN tagging was disabled in em(4) when it operates
>  > > in promiscuous mode and em(4) will insert a VLAN tag in the
>  > > driver.
>  > 
>  > Um, no.  When an em interface with hardware VLAN tagging enabled
>  > is placed in promiscuous mode, it just _stops_ tagging.  Entirely.
>  > The 802.1Q vlan just breaks.
>  > 
> 
> Would you try latest em(4) in CURRENT?(if_em.c, rev. 1.122)

No change with r1.122 (used to be r1.116).  Note that with
VLAN_HWTAGGING enabled, both hosts bring up their carp interface
as master.  This is because none of the frames are tagged when the
carp driver puts the vlan interface which in turn puts the em
interface into promiscuous mode.

You stated that in an earlier email that VLAN_HWTAGGING is disabled
when the interface is placed in promiscuous mode.  Is there any
reason for this appart from not being to view the VLAN header with
tcpdump?  My site runs a lot of VLANS (500+) and it would be nice
to offload this work to the card.

With vlanhwtag enabled:

Host1
em1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        options=db<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,POLLING,VLAN_HWCSUM>
        ether 00:04:23:ce:cc:cd
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
vlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        options=3<RXCSUM,TXCSUM>
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
        ether 00:04:23:ce:cc:cd
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
        vlan: 1 parent interface: em1
carp2: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
        inet 10.0.0.3 netmask 0xffffff00 
        carp: MASTER vhid 2 advbase 1 advskew 0

Host2
em1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        options=cb<RXCSUM,TXCSUM,VLAN_MTU,POLLING,VLAN_HWCSUM>
        ether 00:04:23:ce:ca:a1
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
vlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
        ether 00:04:23:ce:ca:a1
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
        vlan: 1 parent interface: em1
carp2: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
        inet 10.0.0.3 netmask 0xffffff00 
        carp: MASTER vhid 2 advbase 1 advskew 0


With vlanhwtag disabled:
Host1
em1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        options=cb<RXCSUM,TXCSUM,VLAN_MTU,POLLING,VLAN_HWCSUM>
        ether 00:04:23:ce:cc:cd
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
vlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
        ether 00:04:23:ce:cc:cd
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
        vlan: 1 parent interface: em1
carp2: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
        inet 10.0.0.3 netmask 0xffffff00 
        carp: MASTER vhid 2 advbase 1 advskew 0

Host2
em1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        options=cb<RXCSUM,TXCSUM,VLAN_MTU,POLLING,VLAN_HWCSUM>
        ether 00:04:23:ce:ca:a1
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
vlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
        ether 00:04:23:ce:ca:a1
        media: Ethernet autoselect (1000baseTX <full-duplex>)
        status: active
        vlan: 1 parent interface: em1
carp2: flags=49<UP,LOOPBACK,RUNNING> mtu 1500
        inet 10.0.0.3 netmask 0xffffff00 
        carp: BACKUP vhid 2 advbase 1 advskew 0


Ian

--
Ian Freislich


More information about the freebsd-current mailing list