From owner-freebsd-net@FreeBSD.ORG Wed Jun 17 12:38:05 2015 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8B3D27E7 for ; Wed, 17 Jun 2015 12:38:05 +0000 (UTC) (envelope-from stell@genossen.ru) Received: from dutch.chaklun.ru (unknown [IPv6:2a01:7c8:aab0:135::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1378C06 for ; Wed, 17 Jun 2015 12:38:05 +0000 (UTC) (envelope-from stell@genossen.ru) Received: from mx.ddosprevention.ru ([212.65.69.58] helo=[IPv6:::1]) by dutch.chaklun.ru with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1Z59xl-0009Jo-DN for freebsd-net@freebsd.org; Wed, 17 Jun 2015 12:48:53 +0300 Message-ID: <5581427D.9070007@genossen.ru> Date: Wed, 17 Jun 2015 12:48:45 +0300 From: Sergey Akhmatov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: oce(4) promiscous mode bug(?) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2015 12:38:06 -0000 Hi, I’ve got problems with HP NC550SFP NIC (http://www.emulex.com/products/ethernet-networking-storage-connectivity/ethernet-networking-adapters/hp-branded/nc550sfp/overview/ ) Setup information: I’m intended to use this system for traffic monitoring: switchport configured for traffic mirroring to 10 Gbit port of NC550SFP adapter. Adapter is detected by oce(4) driver: $ dmesg … oce0: mem 0xfbff0000-0xfbff3fff,0xfbfc0000-0xfbfdffff,0xfbfa0000-0xfbfbffff irq 32 at device 0.0 on pci4 oce0: Ethernet address: 10:60:4b:01:12:48 oce1: mem 0xfbf90000-0xfbf93fff,0xfbf60000-0xfbf7ffff,0xfbf40000-0xfbf5ffff irq 42 at device 0.1 on pci4 oce1: Ethernet address: 10:60:4b:01:12:4c $ pciconf –vl oce0@pci0:4:0:0: class=0x020000 card=0x1747103c chip=0x070019a2 rev=0x02 hdr=0x00 vendor = 'Emulex Corporation' device = 'OneConnect 10Gb NIC' class = network subclass = ethernet oce1@pci0:4:0:1: class=0x020000 card=0x1747103c chip=0x070019a2 rev=0x02 hdr=0x00 vendor = 'Emulex Corporation' device = 'OneConnect 10Gb NIC' class = network subclass = Ethernet sysctl info: dev.oce.0.sfp_vpd_dump: 0 dev.oce.0.aic_enable: 0 dev.oce.0.fw_upgrade: dev.oce.0.loop_back: 0 dev.oce.0.speed: 10000 dev.oce.0.max_rsp_handled: 64 dev.oce.0.firmware_version: 4.9.416.2 dev.oce.0.component_revision: ///10.0.664.0/// dev.oce.0.%parent: pci4 dev.oce.0.%pnpinfo: vendor=0x19a2 device=0x0700 subvendor=0x103c subdevice=0x1747 class=0x020000 dev.oce.0.%location: pci0:4:0:0 handle=\_SB_.PCI0.PT09.PES1 dev.oce.0.%driver: oce dev.oce.0.%desc: Emulex CNA NIC function:///10.0.664.0/// Problem: It is switched to promiscuous mode: $ ifconfig oce0 oce0: flags=68143 metric 0 mtu 1500 options=407bb ether 10:60:4b:01:12:48 nd6 options=29 media: Ethernet autoselect (10Gbase-SR ) status: active Via tcpdump I see only broadcast frames. Via sysctl I see constantly increasing error counter: dev.oce.0.stats.rx.err.address_match_errors: 124171960 It seems that all unicast frames not addressed to adapter's MAC-address are dropped at hardware, which means that promiscuous mode is not working as intended. Behavior is similar under 10.1 RELEASE, and 11.0-CURRENT (FreeBSD 11.0-CURRENT #0 r284443). GENERIK kernel. The same box works fine under Linux with be2net driver, so It’s definitely not a hardware problem and seems like a problem with FreeBSD oce(4) driver Any suggestions? Thanks in advance. Best regards, Sergey Akhmatov