* [PATCH 0/3] net: thunderx: Miscellaneous fixes
@ 2016-02-16 10:59 sunil.kovvuri at gmail.com
2016-02-16 10:59 ` [PATCH 1/3] net: thunderx: Fix for multiqset not configured upon interface toggle sunil.kovvuri at gmail.com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: sunil.kovvuri at gmail.com @ 2016-02-16 10:59 UTC (permalink / raw)
To: linux-arm-kernel
From: Sunil Goutham <sgoutham@cavium.com>
This patch series fixes couple of issues w.r.t multiqset mode
and receive packet statastics.
Sunil Goutham (3):
net: thunderx: Fix for multiqset not configured upon interface toggle
net: thunderx: Fix for HW TSO not enabled for secondary qsets
net: thunderx: Fix receive packet stats
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 18 +++++++++---------
drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 8 ++------
drivers/net/ethernet/cavium/thunder/nicvf_queues.h | 3 +--
3 files changed, 12 insertions(+), 17 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/3] net: thunderx: Fix for multiqset not configured upon interface toggle 2016-02-16 10:59 [PATCH 0/3] net: thunderx: Miscellaneous fixes sunil.kovvuri at gmail.com @ 2016-02-16 10:59 ` sunil.kovvuri at gmail.com 2016-02-16 10:59 ` [PATCH 2/3] net: thunderx: Fix for HW TSO not enabled for secondary qsets sunil.kovvuri at gmail.com ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: sunil.kovvuri at gmail.com @ 2016-02-16 10:59 UTC (permalink / raw) To: linux-arm-kernel From: Sunil Goutham <sgoutham@cavium.com> When a interface is assigned morethan 8 queues and the logical interface is toggled i.e down & up, additional queues or qsets are not initialized as secondary qset count is being set to zero while tearing down. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index c24cb2a..f8012c4 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -1125,7 +1125,6 @@ int nicvf_stop(struct net_device *netdev) /* Clear multiqset info */ nic->pnicvf = nic; - nic->sqs_count = 0; return 0; } -- 1.7.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] net: thunderx: Fix for HW TSO not enabled for secondary qsets 2016-02-16 10:59 [PATCH 0/3] net: thunderx: Miscellaneous fixes sunil.kovvuri at gmail.com 2016-02-16 10:59 ` [PATCH 1/3] net: thunderx: Fix for multiqset not configured upon interface toggle sunil.kovvuri at gmail.com @ 2016-02-16 10:59 ` sunil.kovvuri at gmail.com 2016-02-16 10:59 ` [PATCH 3/3] net: thunderx: Fix receive packet stats sunil.kovvuri at gmail.com 2016-02-18 3:25 ` [PATCH 0/3] net: thunderx: Miscellaneous fixes David Miller 3 siblings, 0 replies; 5+ messages in thread From: sunil.kovvuri at gmail.com @ 2016-02-16 10:59 UTC (permalink / raw) To: linux-arm-kernel From: Sunil Goutham <sgoutham@cavium.com> For secondary Qsets 'hw_tso' is not getting set as probe() returns much earlier. Fixed it by moving silicon revision check. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index f8012c4..84c5a33 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -1537,6 +1537,9 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) nicvf_send_vf_struct(nic); + if (!pass1_silicon(nic->pdev)) + nic->hw_tso = true; + /* Check if this VF is in QS only mode */ if (nic->sqs_mode) return 0; @@ -1556,9 +1559,6 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent) netdev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO; - if (!pass1_silicon(nic->pdev)) - nic->hw_tso = true; - netdev->netdev_ops = &nicvf_netdev_ops; netdev->watchdog_timeo = NICVF_TX_TIMEOUT; -- 1.7.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] net: thunderx: Fix receive packet stats 2016-02-16 10:59 [PATCH 0/3] net: thunderx: Miscellaneous fixes sunil.kovvuri at gmail.com 2016-02-16 10:59 ` [PATCH 1/3] net: thunderx: Fix for multiqset not configured upon interface toggle sunil.kovvuri at gmail.com 2016-02-16 10:59 ` [PATCH 2/3] net: thunderx: Fix for HW TSO not enabled for secondary qsets sunil.kovvuri at gmail.com @ 2016-02-16 10:59 ` sunil.kovvuri at gmail.com 2016-02-18 3:25 ` [PATCH 0/3] net: thunderx: Miscellaneous fixes David Miller 3 siblings, 0 replies; 5+ messages in thread From: sunil.kovvuri at gmail.com @ 2016-02-16 10:59 UTC (permalink / raw) To: linux-arm-kernel From: Sunil Goutham <sgoutham@cavium.com> 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(). Signed-off-by: Sunil Goutham <sgoutham@cavium.com> --- 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(-) diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index 84c5a33..a009bc3 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -574,8 +574,7 @@ static inline void nicvf_set_rxhash(struct net_device *netdev, static 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); @@ -591,7 +590,7 @@ static void nicvf_rcv_pkt_handler(struct net_device *netdev, } /* 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; @@ -682,8 +681,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: @@ -1353,6 +1351,9 @@ void nicvf_update_stats(struct nicvf *nic) 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; diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c index d0d1b54..767347b 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c @@ -1329,16 +1329,12 @@ void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx) } /* 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, diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.h b/drivers/net/ethernet/cavium/thunder/nicvf_queues.h index c5030a7..6673e11 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.h +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.h @@ -338,8 +338,7 @@ u64 nicvf_queue_reg_read(struct nicvf *nic, /* 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 */ -- 1.7.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 0/3] net: thunderx: Miscellaneous fixes 2016-02-16 10:59 [PATCH 0/3] net: thunderx: Miscellaneous fixes sunil.kovvuri at gmail.com ` (2 preceding siblings ...) 2016-02-16 10:59 ` [PATCH 3/3] net: thunderx: Fix receive packet stats sunil.kovvuri at gmail.com @ 2016-02-18 3:25 ` David Miller 3 siblings, 0 replies; 5+ messages in thread From: David Miller @ 2016-02-18 3:25 UTC (permalink / raw) To: linux-arm-kernel From: sunil.kovvuri@gmail.com Date: Tue, 16 Feb 2016 16:29:48 +0530 > This patch series fixes couple of issues w.r.t multiqset mode > and receive packet statastics. Series applied, thanks. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-18 3:25 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-16 10:59 [PATCH 0/3] net: thunderx: Miscellaneous fixes sunil.kovvuri at gmail.com 2016-02-16 10:59 ` [PATCH 1/3] net: thunderx: Fix for multiqset not configured upon interface toggle sunil.kovvuri at gmail.com 2016-02-16 10:59 ` [PATCH 2/3] net: thunderx: Fix for HW TSO not enabled for secondary qsets sunil.kovvuri at gmail.com 2016-02-16 10:59 ` [PATCH 3/3] net: thunderx: Fix receive packet stats sunil.kovvuri at gmail.com 2016-02-18 3:25 ` [PATCH 0/3] net: thunderx: Miscellaneous fixes 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).