I see the bug is in FreeBSD 11. I attached the simple patch to fix it.
Can someone commit the patch to 11/stable?

Harry: You should be able to workaround the bug by setting

# sysctl dev.netmap.generic_rings=1

And yes, if_lagg(4) doesn't have native netmap support, like all the
meta-drivers (e.g. vlan, tunnels, etc.).
Point is that you should implement link aggregation in your application (in
user-space).

Cheers,
  Vincenzo

2017-05-25 17:36 GMT+02:00 Harry Schmalzbauer <free...@omnilan.de>:

> Bezüglich Vincenzo Maffione's Nachricht vom 25.05.2017 17:31 (localtime):
> > Hi,
> >   This is a (silly) bug that is not present anymore in the upstream code
> > https://github.com/luigirizzo/netmap/blob/master/sys/dev/
> netmap/netmap_freebsd.c#L410-L417
> > that is txq and rxq for generic adapter cannot be 0.
> >
> > So I would say the problem is outdated code in the FreeBSD version you
> are
> > using. Which version you are using exactly? Maybe we can try to push a
> fix.
>
> Thanks for the quick reply!
> This panic was with r318629 (stable/11 = FreeBSD 11.1-PRERELEASE)
>
> You mentioned "generic adapter": Does this mean native-netmap support
> get's lost when if_lagg(4) is in game after if_igb(4)?
>
> Thanks,
>
> -harry
>
>
>


-- 
Vincenzo Maffione
--- f1.c	2017-05-25 17:46:36.948871305 +0200
+++ f.c	2017-05-25 17:46:01.542203054 +0200
@@ -273,9 +273,10 @@ generic_find_num_desc(struct ifnet *ifp,
 void
 generic_find_num_queues(struct ifnet *ifp, u_int *txq, u_int *rxq)
 {
-	D("called, in txq %d rxq %d", *txq, *rxq);
-	*txq = netmap_generic_rings;
-	*rxq = netmap_generic_rings;
+	u_int num_rings = netmap_generic_rings ? netmap_generic_rings : 1;
+
+	*txq = num_rings;
+	*rxq = num_rings;
 }
 
 
_______________________________________________
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