diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c --- a/sys/dev/cxgbe/t4_tracer.c +++ b/sys/dev/cxgbe/t4_tracer.c @@ -135,7 +135,8 @@ } static int -t4_cloner_create(struct if_clone *ifc, char *name, size_t len, caddr_t params) +t4_cloner_create(struct if_clone *ifc, char *name, size_t len, + struct ifc_data *ifd, struct ifnet **ifpp) { struct match_rr mrr; struct adapter *sc; @@ -182,7 +183,7 @@ } /* Note that if_xname is not . */ - if_initname(ifp, name, unit); + if_initname(ifp, name, ifd->unit); if_setdname(ifp, t4_cloner_name); if_setinitfn(ifp, tracer_init); if_setflags(ifp, IFF_SIMPLEX | IFF_DRV_RUNNING); @@ -200,6 +201,7 @@ if_setsoftc(ifp, sc); sc->ifp = ifp; mtx_unlock(&sc->ifp_lock); + *ifpp = ifp; done: sx_xunlock(&t4_trace_lock); end_synchronized_op(sc, 0); @@ -207,7 +209,7 @@ } static int -t4_cloner_destroy(struct if_clone *ifc, if_t ifp) +t4_cloner_destroy(struct if_clone *ifc, if_t ifp, uint32_t flags) { struct adapter *sc; int unit = if_getdunit(ifp); @@ -234,8 +236,12 @@ { sx_init(&t4_trace_lock, "T4/T5 tracer lock"); - t4_cloner = if_clone_advanced(t4_cloner_name, 0, t4_cloner_match, - t4_cloner_create, t4_cloner_destroy); + struct if_clone_addreq req = { + .match_f = t4_cloner_match, + .create_f = t4_cloner_create, + .destroy_f = t4_cloner_destroy, + }; + t4_cloner = ifc_attach_cloner(t4_cloner_name, &req); } void