Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Mar 2014 17:09:57 +0100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Mark Delany <c2h@romeo.emu.st>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: How to make netmap NS_FORWARD work with NR_REG_ONE_NIC?
Message-ID:  <CA%2BhQ2%2BiEWCwaWCM3pPArBujTaCi4SPcH3XR1vx%2BJsY7NUTExdQ@mail.gmail.com>
In-Reply-To: <20140324154522.30664.qmail@f5-external.bushwire.net>
References:  <20140324154522.30664.qmail@f5-external.bushwire.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 24, 2014 at 4:45 PM, Mark Delany <c2h@romeo.emu.st> wrote:

> (Very recent fbsd10)
>
> My application is taking advantage of NR_REG_ONE_NIC to register
> separate handlers for each h/w ring. (Pro tip, you must re-open
> /dev/netmap each time, a dup() fd doesn't work).
>
> While good for performance, it unfortunately appears that NS_FORWARD
> does not work in this mode - presumably because NR_REG_ONE_NIC doesn't
> include the host ring.
>

correct, this is not a supported mode at the moment.
If you want to implement it you should do it into netmap_poll()
and create another constant NS_REG_ONE_NIC_SW for the new mode.

The difficulty is that we do not really have the equivalent
of a multiqueue host port in our system.

cheers
luigi


> Now it's possible I simply have a bug and NS_FORWARD should work with
> NR_REG_ONE_NIC - I have demo code I can share if needed - but assuming
> for a moment I don't have a bug...
>
> What's the right way to implement host forwarding with NR_REG_ONE_NIC?
>
> Do I have to register an independent handler with NR_REG_SW_NIC and
> have the h/w ring handlers synchronize with it? If so, I also presume
> the NR_REG_SW_NIC handler has to manage transfers in both directions,
> yes?
>
> I'm not keen on that approach if I can avoid it as it introduces
> synchronization costs between handlers where previously I needed none.
>
> I also looked at the kernel module and determined that nr_flags =
> NR_REG_ONE_NIC | NR_REG_SW_NIC is invalid. Oh well. That would have
> solved my problem nicely.
>
>
> Mark.
> _______________________________________________
> 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"
>



-- 
-----------------------------------------+-------------------------------
 Prof. Luigi RIZZO, rizzo@iet.unipi.it  . Dip. di Ing. dell'Informazione
 http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
 TEL      +39-050-2211611               . via Diotisalvi 2
 Mobile   +39-338-6809875               . 56122 PISA (Italy)
-----------------------------------------+-------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2BiEWCwaWCM3pPArBujTaCi4SPcH3XR1vx%2BJsY7NUTExdQ>