From owner-freebsd-net@FreeBSD.ORG Fri Jan 2 16:48:53 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 3C80B4AB; Fri, 2 Jan 2015 16:48:53 +0000 (UTC) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 003E31C36; Fri, 2 Jan 2015 16:48:52 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id DA6B27300A; Fri, 2 Jan 2015 17:53:34 +0100 (CET) Date: Fri, 2 Jan 2015 17:53:34 +0100 From: Luigi Rizzo To: "Alexander V. Chernikov" Subject: Re: cxgbe and netmap Message-ID: <20150102165334.GB68836@onelab2.iet.unipi.it> References: <54A6BFFE.5080103@yandex-team.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54A6BFFE.5080103@yandex-team.ru> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: "freebsd-net@freebsd.org" , Navdeep Parhar 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: Fri, 02 Jan 2015 16:48:53 -0000 On Fri, Jan 02, 2015 at 06:57:50PM +0300, Alexander V. Chernikov wrote: > Hello list! > > FreeBSD has netmap support for chelsio T5 cards, which is amazing. > The great thing about implementation is that you can play with > traffic-generating applications without affecting "main" OS interface, > which has always been a problem for Intel cards. > However, this approach (having additional netmap-only ifp) turns to be a > bit problematic for netmap-based networking elements participating in > routing. > > In Intel case you can configure all your interfaces, run routing daemon, > run netmap application and punt all to-host traffic to kernel via host > pipes. for clarity, please call this "host netmap PORT", not pipe, as the latter can be confused with dummynet pipes. > It looks like I can't do this using current implementation: mac > addresses are different for main/netmap interfaces so I can't run > routing daemon on main interface (or sub-interfaces). > I also can't run routing daemon on top of ncxgbe* interface since it > appears to ignore non-netmap-derived traffic.. Maybe navdeep did not implement the host side for ncxgbe ? This should be a relatively trivial thing to do. Otherwise, for the time being, you could try the following hack: - create a tap interface, say tap*, and give it the same MAC as ncxgbe*. You will use only the host port for tap* - open both tap* and ncxgbe* in netmap mode, make sure to set the same flags, mode (promisc etc.), mtu on both; - run the routing daemon on top of tap* - use the tap*'s host netmap port to send up traffic coming from ncxgbe* directed to the host (and vice versa, inject netmap packets coming from tap*'s host netmap port into ncxgbe*'s netmap rings. cheers luigi > Is it possible to make ncxgbe* interfaces behave more like ordinary ones? > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"