From owner-freebsd-net@freebsd.org Mon Jun 29 15:17:59 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 D2BBF98FE14 for ; Mon, 29 Jun 2015 15:17:59 +0000 (UTC) (envelope-from slw@zxy.spb.ru) 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 929112FF3 for ; Mon, 29 Jun 2015 15:17:59 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Z9aog-0004b8-Bq for freebsd-net@freebsd.org; Mon, 29 Jun 2015 18:17:50 +0300 Date: Mon, 29 Jun 2015 18:17:50 +0300 From: Slawa Olhovchenkov To: freebsd-net@freebsd.org Subject: netmap custom RSS and custom packet info Message-ID: <20150629151750.GD1647@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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: Mon, 29 Jun 2015 15:17:59 -0000 Working with netmap and modern hardware I am lacking some features: a) some spare space before packet (64/128/192/256 bytes) for application data. For example: application do some pre-analysig packet, filled structure in this space and routed packet (via NETMAP pipe) to other thread. Received thread got packet and linked inforamtion about this packet for processing w/o additional overhead. b) custom RSS. Modern NIC have RSS poorly interoperable with packet analysing: packets from same flow, but different direction placed in different queue, PPPoE encapsulated packets placed in queue 0, different tunneling don't recognised and etc. May be NETMAP can be used custom RSS hashing from loadable kernel module, provideng by user? Function frm this module can be packet analysing, tunnel removing, custom RSS hashnig with direction-independly maner, filled some structure prepended to buffer (see above) and pass this information to application. This is possible? This is useful not only to me?