Skip to content

Commit 9524846

Browse files
Intiyaz Bashadavem330
authored andcommitted
liquidio: do not consider packets dropped by network stack as driver Rx dropped
netdev->rx_dropped was including packets dropped by napi_gro_receive. If a packet is dropped by network stack, it should not be counted under driver Rx dropped. Made necessary changes to not include network stack drops under netdev->rx_dropped. Signed-off-by: Intiyaz Basha <[email protected]> Signed-off-by: Satanand Burla <[email protected]> Signed-off-by: Felix Manlunas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0b1c27d commit 9524846

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

drivers/net/ethernet/cavium/liquidio/lio_core.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@ liquidio_push_packet(u32 octeon_id __attribute__((unused)),
467467
if (netdev) {
468468
struct lio *lio = GET_LIO(netdev);
469469
struct octeon_device *oct = lio->oct_dev;
470-
int packet_was_received;
471470

472471
/* Do not proceed if the interface is not in RUNNING state. */
473472
if (!ifstate_check(lio, LIO_IFSTATE_RUNNING)) {
@@ -570,18 +569,10 @@ liquidio_push_packet(u32 octeon_id __attribute__((unused)),
570569
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vtag);
571570
}
572571

573-
packet_was_received = (napi_gro_receive(napi, skb) != GRO_DROP);
574-
575-
if (packet_was_received) {
576-
droq->stats.rx_bytes_received += len;
577-
droq->stats.rx_pkts_received++;
578-
} else {
579-
droq->stats.rx_dropped++;
580-
netif_info(lio, rx_err, lio->netdev,
581-
"droq:%d error rx_dropped:%llu\n",
582-
droq->q_no, droq->stats.rx_dropped);
583-
}
572+
napi_gro_receive(napi, skb);
584573

574+
droq->stats.rx_bytes_received += len;
575+
droq->stats.rx_pkts_received++;
585576
} else {
586577
recv_buffer_free(skb);
587578
}

0 commit comments

Comments
 (0)