# HG changeset patch # Parent 0445aff7b819ac368fbd655531c70852d4e0bf2f diff -r 0445aff7b819 sys/dev/cxgbe/t4_sge.c --- a/sys/dev/cxgbe/t4_sge.c Fri Dec 12 12:49:57 2014 -0800 +++ b/sys/dev/cxgbe/t4_sge.c Fri Dec 12 13:08:48 2014 -0800 @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1583,6 +1584,11 @@ get_scatter_segment(struct adapter *sc, MPASS(fl->rx_offset == 0); /* not packing */ } + if (fr_offset == 0) { + CTR4(KTR_CXGBE, " FRAME: total %d, fl->cidx %d, " + "fl->rx_offset %d, sd->nmbuf %d", remaining, fl->cidx, + fl->rx_offset, sd->nmbuf); + } if (sc->sc_do_rxcopy && len < RX_COPY_THRESHOLD) { @@ -1602,6 +1608,10 @@ get_scatter_segment(struct adapter *sc, /* copy data to mbuf */ bcopy(payload, mtod(m, caddr_t), len); + CTR6(KTR_CXGBE, "RX_COPY: mbuf %p, payload %p, len %d, " + "buflen %d, fl->cidx %d, fl->rx_offset %d", m, payload, len, + blen, fl->cidx, fl->rx_offset); + } else if (sd->nmbuf * MSIZE < cll->region1) { /* @@ -1620,6 +1630,9 @@ get_scatter_segment(struct adapter *sc, swz->zone, sd->cl); if (sd->nmbuf++ == 0) counter_u64_add(extfree_refs, 1); + CTR6(KTR_CXGBE, " INLINE: mbuf %p, payload %p, len %d, " + "buflen %d, fl->cidx %d, fl->rx_offset %d", m, payload, len, + blen, fl->cidx, fl->rx_offset); } else { @@ -1638,9 +1651,15 @@ get_scatter_segment(struct adapter *sc, rxb_free, swz->zone, sd->cl); if (sd->nmbuf++ == 0) counter_u64_add(extfree_refs, 1); + CTR6(KTR_CXGBE, "ZMB_EXT: mbuf %p, payload %p, len %d," + " buflen %d, fl->cidx %d, fl->rx_offset %d", m, + payload, len, blen, fl->cidx, fl->rx_offset); } else { m_cljset(m, sd->cl, swz->type); sd->cl = NULL; /* consumed, not a recycle candidate */ + CTR6(KTR_CXGBE, "ZMB_EXT: mbuf %p, payload %p, len %d," + " buflen %d, fl->cidx %d, fl->rx_offset %d", m, + payload, len, blen, fl->cidx, fl->rx_offset); } } if (fr_offset == 0) @@ -1723,6 +1742,14 @@ get_segment: } *pnext = NULL; + if (1) { + caddr_t eth = mtod(m0, char *) + fl_pktshift; + + if (!ETHER_IS_MULTICAST(eth) && (eth[0] != 0 || eth[1] != 7 || + eth[2] != 0x43)) + panic("m0 %p", m0); + } + return (m0); }