From owner-freebsd-net@FreeBSD.ORG Thu Jun 18 11:34:09 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 B4C666DB for ; Thu, 18 Jun 2015 11:34:09 +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 7905DAF7 for ; Thu, 18 Jun 2015 11:34:09 +0000 (UTC) (envelope-from stell@genossen.ru) Received: from mx.ddosprevention.ru ([212.65.69.58] helo=[127.0.0.1]) by dutch.chaklun.ru with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85 (FreeBSD)) (envelope-from ) id 1Z5Y59-000BaR-ID; Thu, 18 Jun 2015 14:34:07 +0300 Message-ID: <5582ACA7.2000307@genossen.ru> Date: Thu, 18 Jun 2015 14:33:59 +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: elof2@sentor.se CC: freebsd-net , Borja Marcos Subject: Re: oce(4) promiscous mode bug(?) References: <5581427D.9070007@genossen.ru> <106C87E2-7097-416B-841B-B1C4D74E9ABA@sarenet.es> <55816EE1.7030004@genossen.ru> <55817E80.7020003@genossen.ru> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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: Thu, 18 Jun 2015 11:34:09 -0000 On 17/06/2015 18:04, elof2@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.