MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ff_veth_get_softc

Function ff_veth_get_softc

lib/ff_veth.c:1057–1072  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057void *
1058ff_veth_get_softc(void *host_ctx)
1059{
1060 struct ff_veth_softc *sc = NULL;
1061
1062 sc = malloc(sizeof(struct ff_veth_softc), M_DEVBUF, M_WAITOK);
1063 if (NULL == sc) {
1064 printf("ff_veth_softc allocation failed\n");
1065 return NULL;
1066 }
1067 memset(sc, 0, sizeof(struct ff_veth_softc));
1068
1069 sc->host_ctx = host_ctx;
1070
1071 return sc;
1072}
1073
1074void
1075ff_veth_free_softc(void *softc)

Callers 1

ff_rss_tbl_initFunction · 0.85

Calls 3

mallocFunction · 0.85
memsetFunction · 0.85
printfFunction · 0.70

Tested by

no test coverage detected