mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 14:02:06 -04:00
ionic: add Rx dropped packet counter
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>
This commit is contained in:
committed by
David S. Miller
parent
3daca28f15
commit
24cfa8c762
@@ -152,12 +152,16 @@ static void ionic_rx_clean(struct ionic_queue *q, struct ionic_desc_info *desc_i
|
||||
stats = q_to_rx_stats(q);
|
||||
netdev = q->lif->netdev;
|
||||
|
||||
if (comp->status)
|
||||
if (comp->status) {
|
||||
stats->dropped++;
|
||||
return;
|
||||
}
|
||||
|
||||
/* 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++;
|
||||
return;
|
||||
}
|
||||
|
||||
stats->pkts++;
|
||||
stats->bytes += le16_to_cpu(comp->len);
|
||||
@@ -167,8 +171,10 @@ static void ionic_rx_clean(struct ionic_queue *q, struct ionic_desc_info *desc_i
|
||||
else
|
||||
skb = ionic_rx_frags(q, desc_info, cq_info);
|
||||
|
||||
if (unlikely(!skb))
|
||||
if (unlikely(!skb)) {
|
||||
stats->dropped++;
|
||||
return;
|
||||
}
|
||||
|
||||
skb_record_rx_queue(skb, q->index);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user