Hello Jason,
On 29/11/17(Wed) 12:13, Jason Tubnor wrote:
> On 28 November 2017 at 20:33, Martin Pieuchot <[email protected]> wrote:
> > Could you do:
> >
> > # sysctl kern.splassert=2
> >
> > And report the tracebacks?
> >
>
> Hi Martin,
>
> Please find attached a compressed /var/log/messages file. This only
> contains data gathered when conducting the iperf tests. Please advise if
> there are any further tests or data you need.
Here's a diff that should fix the problem, do you confirm?
Index: net/if_vxlan.c
===================================================================
RCS file: /cvs/src/sys/net/if_vxlan.c,v
retrieving revision 1.64
diff -u -p -r1.64 if_vxlan.c
--- net/if_vxlan.c 20 Nov 2017 10:35:24 -0000 1.64
+++ net/if_vxlan.c 14 Dec 2017 11:43:10 -0000
@@ -73,6 +73,8 @@ struct vxlan_softc {
int64_t sc_vnetid;
u_int8_t sc_ttl;
+ struct task sc_sendtask;
+
LIST_ENTRY(vxlan_softc) sc_entry;
};
@@ -91,6 +93,7 @@ int vxlan_output(struct ifnet *, struct
void vxlan_addr_change(void *);
void vxlan_if_change(void *);
void vxlan_link_change(void *);
+void vxlan_send_dispatch(void *);
int vxlan_sockaddr_cmp(struct sockaddr *, struct sockaddr *);
uint16_t vxlan_sockaddr_port(struct sockaddr *);
@@ -135,6 +138,7 @@ vxlan_clone_create(struct if_clone *ifc,
sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS;
sc->sc_dstport = htons(VXLAN_PORT);
sc->sc_vnetid = VXLAN_VNI_UNSET;
+ task_set(&sc->sc_sendtask, vxlan_send_dispatch, sc);
ifp = &sc->sc_ac.ac_if;
snprintf(ifp->if_xname, sizeof ifp->if_xname, "vxlan%d", unit);
@@ -189,6 +193,10 @@ vxlan_clone_destroy(struct ifnet *ifp)
ifmedia_delete_instance(&sc->sc_media, IFM_INST_ANY);
ether_ifdetach(ifp);
if_detach(ifp);
+
+ if (!task_del(net_tq(ifp->if_index), &sc->sc_sendtask))
+ taskq_barrier(net_tq(ifp->if_index));
+
free(sc->sc_imo.imo_membership, M_IPMOPTS, 0);
free(sc, M_DEVBUF, sizeof(*sc));
@@ -302,8 +310,20 @@ vxlan_multicast_join(struct ifnet *ifp,
void
vxlanstart(struct ifnet *ifp)
{
+ struct vxlan_softc *sc = (struct vxlan_softc *)ifp->if_softc;
+
+ task_add(net_tq(ifp->if_index), &sc->sc_sendtask);
+}
+
+void
+vxlan_send_dispatch(void *xsc)
+{
+ struct vxlan_softc *sc = xsc;
+ struct ifnet *ifp = &sc->sc_ac.ac_if;
struct mbuf *m;
+ struct mbuf_list ml;
+ ml_init(&ml);
for (;;) {
IFQ_DEQUEUE(&ifp->if_snd, m);
if (m == NULL)
@@ -314,9 +334,19 @@ vxlanstart(struct ifnet *ifp)
bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
#endif
+ ml_enqueue(&ml, m);
+ }
+
+ if (ml_empty(&ml))
+ return;
+
+ NET_RLOCK();
+ while ((m = ml_dequeue(&ml)) != NULL) {
vxlan_output(ifp, m);
}
+ NET_RUNLOCK();
}
+
int
vxlan_config(struct ifnet *ifp, struct sockaddr *src, struct sockaddr *dst)