Deleted Added
full compact
35c35
< __FBSDID("$FreeBSD: head/sys/dev/hatm/if_hatm_tx.c 121687 2003-10-29 15:15:19Z harti $");
---
> __FBSDID("$FreeBSD: head/sys/dev/hatm/if_hatm_tx.c 122112 2003-11-05 11:43:06Z harti $");
80a81
>
81a83,106
> * These macros are used to trace the flow of transmit mbufs and to
> * detect transmit mbuf leaks in the driver.
> */
> #ifdef HATM_DEBUG
> #define hatm_free_txmbuf(SC) \
> do { \
> if (--sc->txmbuf < 0) \
> DBG(sc, TX, ("txmbuf below 0!")); \
> else if (sc->txmbuf == 0) \
> DBG(sc, TX, ("txmbuf now 0")); \
> } while (0)
> #define hatm_get_txmbuf(SC) \
> do { \
> if (++sc->txmbuf > 20000) \
> DBG(sc, TX ("txmbuf %u", sc->txmbuf)); \
> else if (sc->txmbuf == 1) \
> DBG(sc, TX, ("txmbuf leaves 0")); \
> } while (0)
> #else
> #define hatm_free_txmbuf(SC) do { } while (0)
> #define hatm_get_txmbuf(SC) do { } while (0)
> #endif
>
> /*
126a152
> hatm_free_txmbuf(sc);
346a373,374
> hatm_get_txmbuf(sc);
>
348c376,377
< if ((m = m_pullup(m, sizeof(*aph))) == NULL)
---
> if ((m = m_pullup(m, sizeof(*aph))) == NULL) {
> hatm_free_txmbuf(sc);
349a379
> }
356a387
> hatm_free_txmbuf(sc);
362a394
> hatm_free_txmbuf(sc);
369a402
> hatm_free_txmbuf(sc);
373a407
> hatm_free_txmbuf(sc);
382a417
> hatm_free_txmbuf(sc);
391c426,427
< if (m->m_len < 4 && (m = m_pullup(m, 4)) == NULL)
---
> if (m->m_len < 4 && (m = m_pullup(m, 4)) == NULL) {
> hatm_free_txmbuf(sc);
392a429
> }
414a452
> hatm_free_txmbuf(sc);
432a471,473
> tpd->mbuf = NULL;
> hatm_free_txmbuf(sc);
> hatm_free_tpd(sc, tpd);