From owner-freebsd-net@FreeBSD.ORG Tue Jan 6 23:46:07 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 BF9E7EF4 for ; Tue, 6 Jan 2015 23:46:07 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 77A90643EE for ; Tue, 6 Jan 2015 23:46:07 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Y8dp0-0007bw-DZ; Wed, 07 Jan 2015 03:45:58 +0400 Date: Wed, 7 Jan 2015 03:45:58 +0400 From: Slawa Olhovchenkov To: Luigi Rizzo Subject: Re: netmap pipes Message-ID: <20150106234558.GG49169@zxy.spb.ru> References: <20150103164035.GC49169@zxy.spb.ru> <20150103172139.GB95134@onelab2.iet.unipi.it> <20150103173255.GD49169@zxy.spb.ru> <20150103174207.GC95134@onelab2.iet.unipi.it> <20150103175721.GE49169@zxy.spb.ru> <20150103181304.GE95134@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150103181304.GE95134@onelab2.iet.unipi.it> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: freebsd-net@freebsd.org 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: Tue, 06 Jan 2015 23:46:07 -0000 On Sat, Jan 03, 2015 at 07:13:04PM +0100, Luigi Rizzo wrote: > > Can I write to slave and read from master? > > pipes are bidirectional and blocking. So you can write > on one and read from the other, in any order. What you mean 'blocking'? Can't be used in select/poll (as blocking disk IO)? > This is a 'power user' feature which maybe is not what you need > (and at the moment I don't have time to explain in more detail > or update the manpage). > Pipes share memory with the netmap port (VALE port or NIC) with the > same basename, and since memory allocation occurs at once, on the > first open you need to tell the OS how many pipes need to share > memory with the same port -- that is the role of nr_arg1. Can you also explain relations between dev.netmap.ring_size dev.netmap.buf_num open interfaces rings per interfaces slots per rings and zerocopy conditions?