Page MenuHomeFreeBSD

D39865.id121294.diff
No OneTemporary

D39865.id121294.diff

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;
@@ -168,7 +169,6 @@
goto done;
}
-
unit = -1;
rc = ifc_alloc_unit(ifc, &unit);
if (rc != 0)
@@ -182,7 +182,7 @@
}
/* Note that if_xname is not <if_dname><if_dunit>. */
- 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 +200,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 +208,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 +235,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

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 5, 2:33 PM (15 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28442720
Default Alt Text
D39865.id121294.diff (1 KB)

Event Timeline