[RESOLVED] Re: oce(4) promiscous mode bug(?)
Hello, In case someone's interested: I've contacted Emulex technical support and they've confirmed promisc mode bug, it would be fixed with the next driver update. Meanwhile Emulex kindly provided me updated version, the patch is very simple: --- sys/dev/oce/oce_mbox.c.orig 2015-06-24 15:51:28.0 +0300 +++ sys/dev/oce/oce_mbox.c 2015-06-24 15:51:32.0 +0300 @@ -865,7 +865,7 @@ req-iface_flags = MBX_RX_IFACE_FLAGS_PROMISCUOUS; if (enable 0x02) - req-iface_flags = MBX_RX_IFACE_FLAGS_VLAN_PROMISCUOUS; + req-iface_flags |= MBX_RX_IFACE_FLAGS_VLAN_PROMISCUOUS; req-if_id = sc-if_id; ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
Re: [RESOLVED] Re: oce(4) promiscous mode bug(?)
Really ? I had a problem with carp on emulex cards and it was the same fix !! The |= rather than = has made all the difference. I have to admit that Emulex provided a nice support, though... On 06/24/2015 03:00 PM, Sergey Akhmatov wrote: Hello, In case someone's interested: I've contacted Emulex technical support and they've confirmed promisc mode bug, it would be fixed with the next driver update. Meanwhile Emulex kindly provided me updated version, the patch is very simple: --- sys/dev/oce/oce_mbox.c.orig 2015-06-24 15:51:28.0 +0300 +++ sys/dev/oce/oce_mbox.c 2015-06-24 15:51:32.0 +0300 @@ -865,7 +865,7 @@ req-iface_flags = MBX_RX_IFACE_FLAGS_PROMISCUOUS; if (enable 0x02) - req-iface_flags = MBX_RX_IFACE_FLAGS_VLAN_PROMISCUOUS; + req-iface_flags |= MBX_RX_IFACE_FLAGS_VLAN_PROMISCUOUS; req-if_id = sc-if_id; ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org -- Phi-Phong NGUYEN Service informatique Institut de Biologie ENS 46 rue d'Ulm 75230 PARIS CEDEX 05 Tel: 01 44 32 36 34 Fax: 01 44 32 36 30 ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
Re: oce(4) promiscous mode bug(?)
On 17/06/2015 18:04, el...@sentor.se wrote: It sounds like a promisc bug in the driver, just as you say, but just to test it some more: I see that you are running both in PPROMISC and PROMISC. What happen if you remove the PPROMISC and only let tcpdump set it's own PROMISC? I've tried both. Without monitor mode, and without ppromisc Running in monitor mode is the correct way to sniff traffic. But just to rule out errors in the oce driver, what happen if you do not run in monitor mode? Do 'netstat -in' show the same input errors as your sysctl counter? (I assume you're running tcpdump with no bpf filter at all) No errors, Input packets counter counts only broadcast packets. As I wrote before, I see errors for unicast packets in sysctl counter: dev.oce.0.stats.rx.err.address_match_errors: 124171960 What do a couple of 'netstat -B' say while tcpdump is running? # netstat -B Pid Netif Flags Recv Drop Match Sblen Hblen Command 62679 oce0 p--s--- 2 0 2 0 0 tcpdump No drops. Doesn't seem the problem is BPF related. I've tried investigating further: promisc mode is enabled by actually reconfiguring hardware filter via oce_set_common_iface_rx_filter function in the driver. Maybe I'll be able to find difference with working Linux driver. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
oce(4) promiscous mode bug(?)
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: Emulex CNA NIC function:///10.0.664.0/// mem 0xfbff-0xfbff3fff,0xfbfc-0xfbfd,0xfbfa-0xfbfb irq 32 at device 0.0 on pci4 oce0: Ethernet address: 10:60:4b:01:12:48 oce1: Emulex CNA NIC function:///10.0.664.0/// mem 0xfbf9-0xfbf93fff,0xfbf6-0xfbf7,0xfbf4-0xfbf5 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=0x02 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=0x02 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: 1 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=0x02 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=68143UP,BROADCAST,RUNNING,PROMISC,MULTICAST,PPROMISC,MONITOR metric 0 mtu 1500 options=407bbRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO ether 10:60:4b:01:12:48 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL media: Ethernet autoselect (10Gbase-SR full-duplex) 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 ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
Re: oce(4) promiscous mode bug(?)
On Jun 17, 2015, at 11:48 AM, Sergey Akhmatov wrote: 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/ ) Beware The driver was unusable until fixes were applied on 21st December. http://svnweb.freebsd.org/base/stable/10/sys/dev/oce/?view=log Better use a recent 10-STABLE if possible. Borja. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
Re: oce(4) promiscous mode bug(?)
I've tried 10.1-RELEASE, then 10-STABLE and finaly 11-CURRENT with the same result. Beware The driver was unusable until fixes were applied on 21st December. http://svnweb.freebsd.org/base/stable/10/sys/dev/oce/?view=log Better use a recent 10-STABLE if possible. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
Re: oce(4) promiscous mode bug(?)
On Jun 17, 2015, at 2:58 PM, Sergey Akhmatov wrote: I've tried 10.1-RELEASE, then 10-STABLE and finaly 11-CURRENT with the same result. Sorry, in that case I don't know what it might be. Have you tried disabling adapter intelligence? rxcsum, txcsum, lro, etc? Borja. ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
Re: oce(4) promiscous mode bug(?)
Tried disabling all offloadings available, doesn't help. Sorry, in that case I don't know what it might be. Have you tried disabling adapter intelligence? rxcsum, txcsum, lro, etc? ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org
Re: oce(4) promiscous mode bug(?)
It sounds like a promisc bug in the driver, just as you say, but just to test it some more: I see that you are running both in PPROMISC and PROMISC. What happen if you remove the PPROMISC and only let tcpdump set it's own PROMISC? Running in monitor mode is the correct way to sniff traffic. But just to rule out errors in the oce driver, what happen if you do not run in monitor mode? Do 'netstat -in' show the same input errors as your sysctl counter? (I assume you're running tcpdump with no bpf filter at all) What do a couple of 'netstat -B' say while tcpdump is running? /Elof On Wed, 17 Jun 2015, Sergey Akhmatov wrote: Tried disabling all offloadings available, doesn't help. Sorry, in that case I don't know what it might be. Have you tried disabling adapter intelligence? rxcsum, txcsum, lro, etc? ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org ___ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to freebsd-net-unsubscr...@freebsd.org