Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Apr 2017 11:00:38 +0100
From:      Joe Jones <joe@stream-technologies.com>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: cxgbe netmap promiscuous mode?
Message-ID:  <58F49246.801@stream-technologies.com>
In-Reply-To: <20170414163215.GA9358@ox>
References:  <58D3C6F4.6010500@stream-technologies.com> <CAPFoGT-F86Y-yxEK03rmmJkr0LbP4ocgq27pqw3g=yqkdud4=Q@mail.gmail.com> <58D521C0.1000804@stream-technologies.com> <CAPFoGT9EFNcjpjszMVyGhB7ktKG2ir-srG5noPziPK=4mbXj_g@mail.gmail.com> <58F0E683.7050806@stream-technologies.com> <20170414163215.GA9358@ox>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Navdeep

running "ifconfig up" and then "ifconfig promisc" works. Running 
"ifconfig promisc" and then "ifconfig up" does not work. Running 
"ifconfig up promisc" together does work. Running "ifconfig promisc up" 
does not work.

The combination that does not work leaves the interface in a state where 
it reports it's self as being in promiscuous mode.

Joe Jones

On 14/04/17 17:32, Navdeep Parhar wrote:
> On Fri, Apr 14, 2017 at 04:10:59PM +0100, Joe Jones wrote:
>> Hi Navdeep,
>>
>> I think I have found a driver bug. Earlier today I set up the switch I'm
>> using so that two of the ports mirror the traffic on one of the other ports.
>> We are planning on using a similar setup to allow packet tracing without
>> stressing the boxes our application is running on any more then they are
>> already.
>>
>> I connected both ports to one of our cxgbe cards, My intention was to use
>> tcpdump to check that my switch config was doing what I thought it should. I
>> ran
>>
>> ifconfig cxl? promisc -vlanhwtag up
> Does the problem occur only if you use this form of ifconfig?  Can you
> please try "ifconfig up" and "ifconfig cxl? promisc" separately and see
> what happens?
>
> Regards,
> Navdeep
>
>> on both interfaces, this is what the interfaces looked like
>>
>> cxl0: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,PPROMISC>
>> metric 0 mtu 1500
>> options=ec07ab<RXCSUM,TXCSUM,VLAN_MTU,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
>>      ether 00:07:43:33:8a:20
>>      nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>>      media: Ethernet 10Gbase-Twinax <full-duplex>
>>      status: active
>> vcxl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
>> options=ec07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
>>      ether 00:07:43:33:8a:22
>>      nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>>      media: Ethernet 10Gbase-Twinax <full-duplex>
>>      status: active
>> cxl1: flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,PPROMISC>
>> metric 0 mtu 1500
>> options=ec07ab<RXCSUM,TXCSUM,VLAN_MTU,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
>>      ether 00:07:43:33:8a:28
>>      nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>>      media: Ethernet 10Gbase-Twinax <full-duplex>
>>      status: active
>> vcxl1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
>> options=ec07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
>>      ether 00:07:43:33:8a:2a
>>      nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>>      media: Ethernet 10Gbase-Twinax <full-duplex>
>>      status: active
>>
>> The interesting thing is, a tcpdump on cxl0 showed all the traffic I
>> expected to see, while tcpdump on cxl1 showed only broadcast traffic. After
>> playing with the switch config to make sure the difference was not on the
>> switch I pulled both patch cables out and into another server with the same
>> card. On the second server I could use tcpdump and see all the traffic I
>> expected on either interface.
>>
>> Then back on the original server, I reloaded the device driver and tried
>> again. Now I got only broadcast on cxl0 and cxl1. Then finally I got all the
>> traffic to show up by doing
>>
>> ifconfig cxl1 -promisc
>> ifconfig cxl1 promisc
>>
>> It would appearer to me that the card can get into a state where ifconfig
>> reports that it is in promiscuous mode when it is not.
>>
>>
>> Joe Jones




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58F49246.801>