From owner-freebsd-current@FreeBSD.ORG Tue Nov 11 22:01:28 2014 Return-Path: Delivered-To: freebsd-current@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 90C93D22; Tue, 11 Nov 2014 22:01:28 +0000 (UTC) Received: from host64.kissl.de (host64.kissl.de [213.239.241.64]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.shmhost.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C192387; Tue, 11 Nov 2014 22:01:28 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by host64.kissl.de (Postfix) with ESMTP id 7C31FB00B09; Tue, 11 Nov 2014 23:01:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at host64.kissl.de Received: from host64.kissl.de ([127.0.0.1]) by localhost (host64.kissl.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7PK-bzg4HoLF; Tue, 11 Nov 2014 23:01:26 +0100 (CET) Received: from [192.168.0.11] (unknown [95.91.254.245]) (Authenticated sender: web104p1) by host64.kissl.de (Postfix) with ESMTPSA id 2BC4FB00B07; Tue, 11 Nov 2014 23:01:26 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: netmap: extension to store user data per packet/slot? From: Franco Fichtner In-Reply-To: Date: Tue, 11 Nov 2014 23:01:24 +0100 Content-Transfer-Encoding: 7bit Message-Id: References: <560E07EA-2506-487E-88DD-E2B9F7ED9792@lastsummer.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-current , Luigi Rizzo X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 22:01:28 -0000 On 11 Nov 2014, at 22:48, Adrian Chadd wrote: > Ah, I see. You're missing some unique identifier for each netmap > buffer. I thought there was one already. Silly me. Exactly, and, no, thank you for making clear what is needed. :) A little more on this: I think struct netmap_slot is convenient due to the fact that in zero-copy one wouldn't want to mess with the actual buffer for speed and userland code already touches slot internals for each ring transition so there is no performance degradation. The key benefit is that if userland can use this storage freely netmap(4) doesn't get in the way of building complex setups that require decoupled logic and each ring "hop" may alter the state as required. Cheers, Franco