Patch "[PATCH 107/135] net: thunderx: Fix receive packet stats" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
[PATCH 107/135] net: thunderx: Fix receive packet stats
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
0107-net-thunderx-Fix-receive-packet-stats.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
7f60de28c3b41cbe22e3044755ad79f6117bbd0cMon Sep 17 00:00:00 2001
From: Sunil Goutham <[email protected]>
Date: Tue, 16 Feb 2016 16:29:51 +0530
Subject: [PATCH 107/135] net: thunderx: Fix receive packet stats
[ Upstream commit ad2ecebd67d8a80fe5412d11df375a5ed2db7cd1 ]
Counting rx packets for every CQE_RX in CQ irq handler is incorrect. Synchronization is missing when multiple queues are receiving packets simultaneously. Like transmit packet stats use HW stats here.
Also removed unused 'cqe_type' parameter in nicvf_rcv_pkt_handler().
--- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 11 ++++++----- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 8 ++------ drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 3 +-- 3 files changed, 9 insertions(+), 13 deletions(-)
drivers/net/ethernet/cavium/thunder/nicvf_main.c +6 -5
@@ -566,8 +566,7 @@ static inline void nicvf_set_rxhash(strustatic void nicvf_rcv_pkt_handler (struct net_device *netdev,struct napi_struct *napi, -struct cmp_queue *cq, -struct cqe_rx_t *cqe_rx,int cqe_type) +struct cqe_rx_t *cqe_rx) {struct sk_buff *skb;struct nicvf *nic =netdev_priv (netdev);
@@ -583,7 +582,7 @@ static void nicvf_rcv_pkt_handler(struct }/* Check for errors */ - err =nicvf_check_cqe_rx_errs (nic, cq, cqe_rx); + err =nicvf_check_cqe_rx_errs (nic, cqe_rx);if (err && !cqe_rx->rb_cnt)return ;
@@ -674,8 +673,7 @@ loop: cq_idx, cq_desc->cqe_type);switch (cq_desc->cqe_type) {case CQE_TYPE_RX : -nicvf_rcv_pkt_handler (netdev, napi, cq, - cq_desc,CQE_TYPE_RX ); +nicvf_rcv_pkt_handler (netdev, napi, cq_desc); work_done++;break ;case CQE_TYPE_SEND :
@@ -1345,6 +1343,9 @@ void nicvf_update_stats(struct nicvf *ni drv_stats->tx_frames_ok = stats->tx_ucast_frames_ok + stats->tx_bcast_frames_ok + stats->tx_mcast_frames_ok; + drv_stats->rx_frames_ok = stats->rx_ucast_frames + + stats->rx_bcast_frames + + stats->rx_mcast_frames; drv_stats->rx_drops = stats->rx_drop_red + stats->rx_drop_overrun; drv_stats->tx_drops = stats->tx_drops;
drivers/net/ethernet/cavium/thunder/nicvf_queues.c +2 -6
@@ -1414,16 +1414,12 @@ void nicvf_update_sq_stats(struct nicvf }/* Check for errors in the receive cmp.queue entry */ -int nicvf_check_cqe_rx_errs (struct nicvf *nic, -struct cmp_queue *cq,struct cqe_rx_t *cqe_rx) +int nicvf_check_cqe_rx_errs (struct nicvf *nic,struct cqe_rx_t *cqe_rx) {struct nicvf_hw_stats *stats = &nic->hw_stats; -struct nicvf_drv_stats *drv_stats = &nic->drv_stats; -if (!cqe_rx->err_level && !cqe_rx->err_opcode) { - drv_stats->rx_frames_ok++; +if (!cqe_rx->err_level && !cqe_rx->err_opcode)return 0 ; - }if (netif_msg_rx_err (nic)) netdev_err(nic->netdev,
drivers/net/ethernet/cavium/thunder/nicvf_queues.h +1 -2
@@ -344,8 +344,7 @@ u64 nicvf_queue_reg_read(struct nicvf */* Stats */ void nicvf_update_rq_stats (struct nicvf *nic,int rq_idx);void nicvf_update_sq_stats (struct nicvf *nic,int sq_idx); -int nicvf_check_cqe_rx_errs (struct nicvf *nic, -struct cmp_queue *cq,struct cqe_rx_t *cqe_rx); +int nicvf_check_cqe_rx_errs (struct nicvf *nic,struct cqe_rx_t *cqe_rx);int nicvf_check_cqe_tx_errs (struct nicvf *nic,struct cmp_queue *cq,struct cqe_send_t *cqe_tx);#endif /* NICVF_QUEUES_H */
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/0107-net-thunderx-Fix-receive-packet-stats.patch queue-4.4/0083-net-thunderx-Fix-for-Qset-error-due-to-CQ-full.patch queue-4.4/0128-net-thunderx-Fix-link-status-reporting.patch queue-4.4/0106-net-thunderx-Fix-for-multiqset-not-configured-upon-i.patch