Netmap and in-kernel IPFW interactions!

Raimundo Santos raitech at gmail.com
Sat Oct 19 15:28:56 UTC 2013


On 19 October 2013 06:00, h bagade <bagadeh at gmail.com> wrote:

> Hi Everybody,
>
>
Hello!


> I have compiled my kernel with support of netmap without any changes on
> ipfw. Afterwards, I defined ipfw rules and surprisingly they worked!!
>
>
Being netmap-ed your kernel doesn't mean you are really using it. If your
data continue to take normal paths, ie, do not touch netmap, it will be
there to the in kernel classifier take care.


> Before my experiment on ipfw, I'd thought because packets are reached to
> userspace directly by means of netmap, so in-kernel ipfw won't be able to
> check them in between?!
>
>
You must open the netmap device and interact with it, no more, no less. As
the OPERATION section of netmap(4) states:

netmap clients must first open the open("/dev/netmap")

If your NIC driver doesn't support netmap, you end up with the normal path
to frames and packets.


> Could anyone clarify me how in-kernel tools are able to work even after
> netmap is used?
>

So, to clarify you, you must clarify us: how are you *using* it, actually?

Best Regards,
Raimundo Santos


More information about the freebsd-net mailing list