https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221317

Vincenzo Maffione <v.maffi...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |v.maffi...@gmail.com

--- Comment #10 from Vincenzo Maffione <v.maffi...@gmail.com> ---
Hi,
  For the moment being, unfortunately, netmap needs to do bring the interface
down in order to put the NIC in "netmap mode" (nm_register method in the code).
At the end of the registration, the interface is brought up again.
We bring the interface down because we need to detach the mbufs from the NIC
rings and attach the netmap buffers as a replacement. Currently we can't do
this while the interface is up, becuse the driver may be concurrently
receiving/transmitting mbufs. The link flapping comes as a result of the
IFF_DOWN+IFF_UP cycle.
In the long term we would like to get rid of this, but for now we haven't found
yet a reasonable way to avoid the down/up cycle on register.

This said, the only piece of code in netmap that I think it may cause the issue
is the nm_register method (called to put the NIC in netmap mode):

http://fxr.watson.org/fxr/source/dev/netmap/ixgbe_netmap.h#L118

The rest of netmap never touches NIC configuration/control registers, but only
the registers involved in receive/transmit operation (and the hardware rings).
I don't know why this bug shows up, but I can guess it may be some race
condition triggered by repeated IFF_DOWN+IFF_UP cycles.
Note that the nm_register method runs under IFNET_RLOCK().

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to