txpkts
uint64_t txpkts; /* # of ethernet packets */
*val = txq->txpkts;
add_to_txpkts(txq, &txpkts, frame, &txinfo) == 0) {
write_ulp_cpl_sgl(pi, txq, &txpkts, &txinfo);
ASSERT(txpkts.npkt == 0);
txq->txpkts++;
if (txpkts.npkt > 0) {
write_txpkts_wr(txq, &txpkts);
static int add_to_txpkts(struct sge_txq *txq, struct txpkts *txpkts, mblk_t *m,
static void write_txpkts_wr(struct sge_txq *txq, struct txpkts *txpkts);
struct txpkts *txpkts, struct txinfo *txinfo);
add_to_txpkts(struct sge_txq *txq, struct txpkts *txpkts, mblk_t *m,
if (txpkts->npkt > 0) {
txpkts->nflits + flits <= TX_WR_FLITS &&
txpkts->nflits + flits <= eq->avail * 8 &&
txpkts->plen + txinfo->len < 65536;
txpkts->tail->b_next = m;
txpkts->tail = m;
txpkts->npkt++;
txpkts->nflits += flits;
txpkts->plen += txinfo->len;
write_txpkts_wr(txq, txpkts);
ASSERT(txpkts->npkt == 0);
txpkts->tail = m;
txpkts->npkt = 1;
txpkts->nflits = flits;
txpkts->flitp = &eq->desc[eq->pidx].flit[2];
txpkts->plen = txinfo->len;
write_txpkts_wr(struct sge_txq *txq, struct txpkts *txpkts)
ndesc = howmany(txpkts->nflits, 8);
ctrl = V_FW_WR_LEN16(howmany(txpkts->nflits, 2));
wr->plen = cpu_to_be16(txpkts->plen);
wr->npkt = txpkts->npkt;
txq->txpkts_pkts += txpkts->npkt;
txpkts->npkt = 0; /* emptied */
struct txpkts *txpkts, struct txinfo *txinfo)
ASSERT(txpkts->npkt > 0);
flitp = (uintptr_t)txpkts->flitp;
txpkts->nflits++;
txpkts->flitp = (void *)flitp;
struct txpkts txpkts;
txpkts.npkt = 0; /* indicates there's nothing in txpkts */