From owner-freebsd-net@FreeBSD.ORG Tue Jul 20 21:55:47 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F0E11065670 for ; Tue, 20 Jul 2010 21:55:47 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 35A138FC1F for ; Tue, 20 Jul 2010 21:55:46 +0000 (UTC) Received: by ewy26 with SMTP id 26so2269222ewy.13 for ; Tue, 20 Jul 2010 14:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=vl7UZD20tVKUdjwqTUAmeq4eoaNuGrF2JcjzQ9Ag24w=; b=v1gTUK/G41vPIC6YH7sywEZ8D61Xmd/yHZ2y3mCBAcLADvt00BCEULR8CouK/UWQVj C8hZeUFkkRKkFQzHSIisAg8/kb68AeQF0HXb3RoJ1EF1XDoe4a1CJ657mndsUF0/x8X+ 8cas346tNsPvWBuYRw3g6y8JRFBmC+bYuO1To= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=FENjOVc77t15/kkEi3pYT6j3hNNWra/ype5b+sgG7jNrnRKdMS6ZjfEdqtwZrwf4tu tTUuVlis4UA21qHWiZuWervcNVFEkZlV4K997XaJdLSCCmUlzElthkzXe51yeVG4hK1e +XyATPRK+RsJqOmfb3EEmFn6VkJzPW4PLWseQ= MIME-Version: 1.0 Received: by 10.213.7.65 with SMTP id c1mr5233963ebc.16.1279662946116; Tue, 20 Jul 2010 14:55:46 -0700 (PDT) Received: by 10.213.113.195 with HTTP; Tue, 20 Jul 2010 14:55:46 -0700 (PDT) In-Reply-To: <201007202154.19448.pebu3op@googlemail.com> References: <201007202154.19448.pebu3op@googlemail.com> Date: Tue, 20 Jul 2010 17:55:46 -0400 Message-ID: From: Ryan Stone To: pebu3op@googlemail.com Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org Subject: Re: support for L3/L4-filters in ixgbe X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 20 Jul 2010 21:55:47 -0000 Currently there's interface for giving access to queues to userspace. One problem that you're going to run into is that the registers for all of the queues are mapped consecutively. There wouldn't be any way of preventing the application from messing around with queues that don't belong to it. Using the PCI SIG IOV mode would presumably prevent that, but I'm not at all familiar with what would be necessary to use IOV mode. Also if you don't enable a virtualization mode I think that your userspace queue could get other flows, not just those matching your filter, if those flows happen to hash to your queue. The 82599 supports up to 128 MAC address filters(I think that the one gets reserved for use by the manageability interface). The RAH and RAL registers are what you'll need to program. Note that these registers direct packets to *pools* of queues, not directly to queues. You'll also need to enable either VMDq mode or IOV mode to use pools 1-63; if you don't then any traffic that passes a filter that directs to a pool is implicitly directed to pool 0. I've done a lot of work on both the 82598 and the 82599 with VMDq mode to present multiple virtual interfaces to the kernel(the code, sadly, is not public). If you have any questions about the ixgbe driver or the virtualization features of the 82599 I'll be happy to offer any help I can.