From owner-freebsd-net@freebsd.org Thu Nov 5 15:01:24 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85ABEA27154 for ; Thu, 5 Nov 2015 15:01:24 +0000 (UTC) (envelope-from elof2@sentor.se) Received: from smtp-out.sentor.se (smtp-out.sentor.se [176.124.225.2]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0B91BB2 for ; Thu, 5 Nov 2015 15:01:23 +0000 (UTC) (envelope-from elof2@sentor.se) Received: from localhost (localhost [127.0.0.1]) by farmermaggot.shire.sentor.se (Postfix) with ESMTP id 2EEE0B61D235 for ; Thu, 5 Nov 2015 16:01:22 +0100 (CET) Date: Thu, 5 Nov 2015 16:01:22 +0100 (CET) From: elof2@sentor.se To: freebsd-net Subject: ngrep/ixgbe bpf bug Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII 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, 05 Nov 2015 15:01:24 -0000 Hi all! Why don't ngrep work on ix interfaces? It shows nice values if I sniff on other interfaces, e.g. igb0 and bridge0: # ngrep -d igb0 "q" ip I see some matching packets. Everything looks good. # netstat -B Pid Netif Flags Recv Drop Match Sblen Hblen Command 1800 igb0 p--s--- 135 0 129 380 0 ngrep The BPF stats show Recv and Match values. Good. # ngrep -d bridge0 "q" ip I see some matching packets. Good. # netstat -B Pid Netif Flags Recv Drop Match Sblen Hblen Command 1901 bridge0 p--s--- 661897 0 659170 425606 0 ngrep Again, the BPF stats show Recv and Match values. Good. However, if I sniff on an ix interface: # ngrep -d ix1 "q" ip I get no matching packets! # netstat -B Pid Netif Flags Recv Drop Match Sblen Hblen Command 1816 ix1 p--s--- 45340 0 0 0 0 ngrep ^^^ ...and the BPF stats always show zero Matches. Bug in the ixgbe driver or in ngrep? /Elof