* [PATCH net-next] liquidio: do not consider packets dropped by network stack as driver Rx dropped
@ 2017-11-03 21:32 Felix Manlunas
2017-11-05 13:30 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Felix Manlunas @ 2017-11-03 21:32 UTC (permalink / raw)
To: davem
Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
intiyaz.basha
From: Intiyaz Basha <intiyaz.basha@cavium.com>
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 <intiyaz.basha@cavium.com>
Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
---
drivers/net/ethernet/cavium/liquidio/lio_core.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_core.c b/drivers/net/ethernet/cavium/liquidio/lio_core.c
index 89b7820..32ae63b 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_core.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_core.c
@@ -467,7 +467,6 @@ static int octeon_setup_droq(struct octeon_device *oct, int q_no, int num_descs,
if (netdev) {
struct lio *lio = GET_LIO(netdev);
struct octeon_device *oct = lio->oct_dev;
- int packet_was_received;
/* Do not proceed if the interface is not in RUNNING state. */
if (!ifstate_check(lio, LIO_IFSTATE_RUNNING)) {
@@ -570,18 +569,10 @@ static int octeon_setup_droq(struct octeon_device *oct, int q_no, int num_descs,
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vtag);
}
- packet_was_received = (napi_gro_receive(napi, skb) != GRO_DROP);
-
- if (packet_was_received) {
- droq->stats.rx_bytes_received += len;
- droq->stats.rx_pkts_received++;
- } else {
- droq->stats.rx_dropped++;
- netif_info(lio, rx_err, lio->netdev,
- "droq:%d error rx_dropped:%llu\n",
- droq->q_no, droq->stats.rx_dropped);
- }
+ napi_gro_receive(napi, skb);
+ droq->stats.rx_bytes_received += len;
+ droq->stats.rx_pkts_received++;
} else {
recv_buffer_free(skb);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] liquidio: do not consider packets dropped by network stack as driver Rx dropped
2017-11-03 21:32 [PATCH net-next] liquidio: do not consider packets dropped by network stack as driver Rx dropped Felix Manlunas
@ 2017-11-05 13:30 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-05 13:30 UTC (permalink / raw)
To: felix.manlunas
Cc: netdev, raghu.vatsavayi, derek.chickles, satananda.burla,
intiyaz.basha
From: Felix Manlunas <felix.manlunas@cavium.com>
Date: Fri, 3 Nov 2017 14:32:33 -0700
> From: Intiyaz Basha <intiyaz.basha@cavium.com>
>
> 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 <intiyaz.basha@cavium.com>
> Signed-off-by: Satanand Burla <satananda.burla@cavium.com>
> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-05 13:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 21:32 [PATCH net-next] liquidio: do not consider packets dropped by network stack as driver Rx dropped Felix Manlunas
2017-11-05 13:30 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).