Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Sep 2017 16:30:01 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-net@FreeBSD.org
Subject:   [Bug 221317] Netmap issue after ixgbe driver update in r320897
Message-ID:  <bug-221317-2472-CArpgiKhkp@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-221317-2472@https.bugs.freebsd.org/bugzilla/>
References:  <bug-221317-2472@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221317

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

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

--- Comment #10 from Vincenzo Maffione <v.maffione@gmail.com> ---
Hi,
  For the moment being, unfortunately, netmap needs to do bring the interfa=
ce
down in order to put the NIC in "netmap mode" (nm_register method in the co=
de).
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 f=
ound
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 i=
ssue
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 o=
nly
the registers involved in receive/transmit operation (and the hardware ring=
s).
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().

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221317-2472-CArpgiKhkp>