From owner-freebsd-net@FreeBSD.ORG Thu Jul 17 19:54:12 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 922775AF for ; Thu, 17 Jul 2014 19:54:12 +0000 (UTC) Received: from smtp1.bushwire.net (f5.bushwire.net [199.48.133.46]) by mx1.freebsd.org (Postfix) with SMTP id 417572AC2 for ; Thu, 17 Jul 2014 19:54:10 +0000 (UTC) Received: (qmail 37369 invoked by uid 1001); 17 Jul 2014 19:47:28 -0000 Delivered-To: qmda-intercept-freebsd-net@freebsd.org DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=s384; d=romeo.emu.st; b=PAyCzCGW1cOCD7uQ54tbh3ub8h+RyrWFS84RHERIo/Um4ajH9M+HqHEz8PI0ovoX; Comments: DomainKeys? See http://en.wikipedia.org/wiki/DomainKeys DomainKey-Trace-MD: h=14; b=29; l=C18R71D32M65F38T27S42R39?29?28M17C39C27I40; Comments: QMDA 0.3 Received: (qmail 37362 invoked by uid 1001); 17 Jul 2014 19:47:28 -0000 Date: 17 Jul 2014 19:47:28 +0000 Message-ID: <20140717194728.37361.qmail@f5-external.bushwire.net> From: "Mark Delany" To: freebsd-net@freebsd.org Subject: Re: netmap, selective processing. References: <53C71196.4030501@rlwinm.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18 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, 17 Jul 2014 19:54:12 -0000 On 17Jul14, Daniel Corbe allegedly wrote: > From the perspective of totally wrecking the performance of the host > network stack: how much more overhead am I really introducing by looking > at every packet inside of the netmap framework and going "am I really > interested in this? Or should I simply pass it through to the host." If you haven't look at netmap in detail yet, then the main thing to remember is that once netmap is active on an interface, *all* packets on that interface enter (and potentially leave) your netmap handler via an excursion into user space. If the majority of packets are untouched and merely pushed back thru the stack, then for each batch of packets you've introduced an additional user-space context switch, at least one system call and the cost of your own packet selection code. I'm not sure that constitutes "totally wrecking" but something to keep in mind if you plan to run on a busy system. Another thing to keep in mind is, if you netmap app has bugs you could break all the regular applications sitting on top of sockets. You are probably right that OSPF in netmap may not be directly useful to anyone else, but I think more people using netmap to implement interesting applications is of value to netmap, frankly. Mark.