{ "good_bytes", offsetof(struct hn_stats, bytes) },
{ "errors", offsetof(struct hn_stats, errors) },
{ "ring full", offsetof(struct hn_stats, ring_full) },
+ { "channel full", offsetof(struct hn_stats, channel_full) },
{ "multicast_packets", offsetof(struct hn_stats, multicast) },
{ "broadcast_packets", offsetof(struct hn_stats, broadcast) },
{ "undersize_packets", offsetof(struct hn_stats, size_bins[0]) },
txq->stats.bytes += txd->data_size;
txq->stats.packets += txd->packets;
} else {
- PMD_TX_LOG(NOTICE, "port %u:%u complete tx %u failed status %u",
- txq->port_id, txq->queue_id, txd->chim_index, ack->status);
+ PMD_DRV_LOG(NOTICE, "port %u:%u complete tx %u failed status %u",
+ txq->port_id, txq->queue_id, txd->chim_index, ack->status);
++txq->stats.errors;
}
break;
default:
- PMD_TX_LOG(NOTICE,
- "unexpected send completion type %u",
+ PMD_DRV_LOG(NOTICE, "unexpected send completion type %u",
hdr->type);
}
}
if (unlikely(rte_ring_sp_enqueue(rxq->rx_ring, m) != 0)) {
++rxq->stats.ring_full;
+ PMD_RX_LOG(DEBUG, "rx ring full");
rte_pktmbuf_free(m);
}
}
if (likely(ret == 0))
hn_reset_txagg(txq);
- else
- PMD_TX_LOG(NOTICE, "port %u:%u send failed: %d",
- txq->port_id, txq->queue_id, ret);
+ else if (ret == -EAGAIN) {
+ PMD_TX_LOG(DEBUG, "port %u:%u channel full",
+ txq->port_id, txq->queue_id);
+ ++txq->stats.channel_full;
+ } else {
+ ++txq->stats.errors;
+ PMD_DRV_LOG(NOTICE, "port %u:%u send failed: %d",
+ txq->port_id, txq->queue_id, ret);
+ }
return ret;
}
ret = hn_xmit_sg(txq, txd, m, &need_sig);
if (unlikely(ret != 0)) {
- PMD_TX_LOG(NOTICE, "sg send failed: %d", ret);
- ++txq->stats.errors;
+ if (ret == -EAGAIN) {
+ PMD_TX_LOG(DEBUG, "sg channel full");
+ ++txq->stats.channel_full;
+ } else {
+ PMD_DRV_LOG(NOTICE, "sg send failed: %d", ret);
+ ++txq->stats.errors;
+ }
hn_txd_put(txq, txd);
goto fail;
}