| 2855 | } |
| 2856 | |
| 2857 | static int |
| 2858 | vxlan_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); |
| 2875 | failed: |
| 2876 | vxlan_stats_free(sc); |
| 2877 | return (ENOMEM); |
| 2878 | } |
| 2879 | |
| 2880 | static void |
| 2881 | vxlan_stats_free(struct vxlan_softc *sc) |
no test coverage detected