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

Function vxlan_stats_alloc

freebsd/net/if_vxlan.c:2857–2878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2855}
2856
2857static int
2858vxlan_stats_alloc(struct vxlan_softc *sc)
2859{
2860 struct vxlan_statistics *stats = &sc->vxl_stats;
2861
2862 stats->txcsum = counter_u64_alloc(M_WAITOK);
2863 if (stats->txcsum == NULL)
2864 goto failed;
2865
2866 stats->tso = counter_u64_alloc(M_WAITOK);
2867 if (stats->tso == NULL)
2868 goto failed;
2869
2870 stats->rxcsum = counter_u64_alloc(M_WAITOK);
2871 if (stats->rxcsum == NULL)
2872 goto failed;
2873
2874 return (0);
2875failed:
2876 vxlan_stats_free(sc);
2877 return (ENOMEM);
2878}
2879
2880static void
2881vxlan_stats_free(struct vxlan_softc *sc)

Callers 1

vxlan_clone_createFunction · 0.85

Calls 2

counter_u64_allocFunction · 0.85
vxlan_stats_freeFunction · 0.85

Tested by

no test coverage detected