From owner-freebsd-net@FreeBSD.ORG Thu Jan 29 11:25:28 2015 Return-Path: Delivered-To: freebsd-net@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 90218251 for ; Thu, 29 Jan 2015 11:25:28 +0000 (UTC) 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 50B75ADA for ; Thu, 29 Jan 2015 11:25:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by farmermaggot.shire.sentor.se (Postfix) with ESMTP id 70F61B61D250; Thu, 29 Jan 2015 12:25:25 +0100 (CET) Date: Thu, 29 Jan 2015 12:25:25 +0100 (CET) From: elof2@sentor.se To: freebsd-net Subject: Zerocopy bpf 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.18-1 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, 29 Jan 2015 11:25:28 -0000 Hi! q1) I assume that libpcap has builtin support for checking if sysctl net.bpf.zerocopy_enable is set to 1, and if so uses zerocopy. Correct? q2) This should mean that all normal sniffing tools like tcpdump, tshark, ngrep, argus, etc do NOT need any specific options in order to use zerocopy. Correct? q3) How do I see if zerocopy is used or not? 'netstat -B' don't tell me much, and the tool 'bpfstat' don't seem to exist any more. q4) When activating zerocopy, should I immediately see a performance boost on the machine? (like less drops on a heavily loaded sniffer NIC (running in monitor mode)) /Elof