Add a counter for packets dropped by the driver, typically
for bad size or a receive error seen by the device.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
u64 csum_complete;
u64 csum_error;
u64 buffers_posted;
u64 csum_complete;
u64 csum_error;
u64 buffers_posted;
};
#define IONIC_QCQ_F_INITED BIT(0)
};
#define IONIC_QCQ_F_INITED BIT(0)
IONIC_RX_STAT_DESC(csum_none),
IONIC_RX_STAT_DESC(csum_complete),
IONIC_RX_STAT_DESC(csum_error),
IONIC_RX_STAT_DESC(csum_none),
IONIC_RX_STAT_DESC(csum_complete),
IONIC_RX_STAT_DESC(csum_error),
+ IONIC_RX_STAT_DESC(dropped),
};
static const struct ionic_stat_desc ionic_txq_stats_desc[] = {
};
static const struct ionic_stat_desc ionic_txq_stats_desc[] = {
stats = q_to_rx_stats(q);
netdev = q->lif->netdev;
stats = q_to_rx_stats(q);
netdev = q->lif->netdev;
+ if (comp->status) {
+ stats->dropped++;
/* no packet processing while resetting */
/* no packet processing while resetting */
- if (unlikely(test_bit(IONIC_LIF_QUEUE_RESET, q->lif->state)))
+ if (unlikely(test_bit(IONIC_LIF_QUEUE_RESET, q->lif->state))) {
+ stats->dropped++;
stats->pkts++;
stats->bytes += le16_to_cpu(comp->len);
stats->pkts++;
stats->bytes += le16_to_cpu(comp->len);
else
skb = ionic_rx_frags(q, desc_info, cq_info);
else
skb = ionic_rx_frags(q, desc_info, cq_info);
+ if (unlikely(!skb)) {
+ stats->dropped++;
skb_record_rx_queue(skb, q->index);
skb_record_rx_queue(skb, q->index);