Skip to content

Commit 4fbe366

Browse files
committed
Merge branch 'thunderx-fixes'
Sunil Goutham says: ==================== net: thunderx: Miscellaneous fixes This patch series fixes couple of issues w.r.t multiqset mode and receive packet statastics. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 1eea84b + ad2eceb commit 4fbe366

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

drivers/net/ethernet/cavium/thunder/nicvf_main.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,7 @@ static inline void nicvf_set_rxhash(struct net_device *netdev,
574574

575575
static void nicvf_rcv_pkt_handler(struct net_device *netdev,
576576
struct napi_struct *napi,
577-
struct cmp_queue *cq,
578-
struct cqe_rx_t *cqe_rx, int cqe_type)
577+
struct cqe_rx_t *cqe_rx)
579578
{
580579
struct sk_buff *skb;
581580
struct nicvf *nic = netdev_priv(netdev);
@@ -591,7 +590,7 @@ static void nicvf_rcv_pkt_handler(struct net_device *netdev,
591590
}
592591

593592
/* Check for errors */
594-
err = nicvf_check_cqe_rx_errs(nic, cq, cqe_rx);
593+
err = nicvf_check_cqe_rx_errs(nic, cqe_rx);
595594
if (err && !cqe_rx->rb_cnt)
596595
return;
597596

@@ -682,8 +681,7 @@ static int nicvf_cq_intr_handler(struct net_device *netdev, u8 cq_idx,
682681
cq_idx, cq_desc->cqe_type);
683682
switch (cq_desc->cqe_type) {
684683
case CQE_TYPE_RX:
685-
nicvf_rcv_pkt_handler(netdev, napi, cq,
686-
cq_desc, CQE_TYPE_RX);
684+
nicvf_rcv_pkt_handler(netdev, napi, cq_desc);
687685
work_done++;
688686
break;
689687
case CQE_TYPE_SEND:
@@ -1125,7 +1123,6 @@ int nicvf_stop(struct net_device *netdev)
11251123

11261124
/* Clear multiqset info */
11271125
nic->pnicvf = nic;
1128-
nic->sqs_count = 0;
11291126

11301127
return 0;
11311128
}
@@ -1354,6 +1351,9 @@ void nicvf_update_stats(struct nicvf *nic)
13541351
drv_stats->tx_frames_ok = stats->tx_ucast_frames_ok +
13551352
stats->tx_bcast_frames_ok +
13561353
stats->tx_mcast_frames_ok;
1354+
drv_stats->rx_frames_ok = stats->rx_ucast_frames +
1355+
stats->rx_bcast_frames +
1356+
stats->rx_mcast_frames;
13571357
drv_stats->rx_drops = stats->rx_drop_red +
13581358
stats->rx_drop_overrun;
13591359
drv_stats->tx_drops = stats->tx_drops;
@@ -1538,6 +1538,9 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
15381538

15391539
nicvf_send_vf_struct(nic);
15401540

1541+
if (!pass1_silicon(nic->pdev))
1542+
nic->hw_tso = true;
1543+
15411544
/* Check if this VF is in QS only mode */
15421545
if (nic->sqs_mode)
15431546
return 0;
@@ -1557,9 +1560,6 @@ static int nicvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
15571560

15581561
netdev->vlan_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_TSO;
15591562

1560-
if (!pass1_silicon(nic->pdev))
1561-
nic->hw_tso = true;
1562-
15631563
netdev->netdev_ops = &nicvf_netdev_ops;
15641564
netdev->watchdog_timeo = NICVF_TX_TIMEOUT;
15651565

drivers/net/ethernet/cavium/thunder/nicvf_queues.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,16 +1329,12 @@ void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx)
13291329
}
13301330

13311331
/* Check for errors in the receive cmp.queue entry */
1332-
int nicvf_check_cqe_rx_errs(struct nicvf *nic,
1333-
struct cmp_queue *cq, struct cqe_rx_t *cqe_rx)
1332+
int nicvf_check_cqe_rx_errs(struct nicvf *nic, struct cqe_rx_t *cqe_rx)
13341333
{
13351334
struct nicvf_hw_stats *stats = &nic->hw_stats;
1336-
struct nicvf_drv_stats *drv_stats = &nic->drv_stats;
13371335

1338-
if (!cqe_rx->err_level && !cqe_rx->err_opcode) {
1339-
drv_stats->rx_frames_ok++;
1336+
if (!cqe_rx->err_level && !cqe_rx->err_opcode)
13401337
return 0;
1341-
}
13421338

13431339
if (netif_msg_rx_err(nic))
13441340
netdev_err(nic->netdev,

drivers/net/ethernet/cavium/thunder/nicvf_queues.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,7 @@ u64 nicvf_queue_reg_read(struct nicvf *nic,
338338
/* Stats */
339339
void nicvf_update_rq_stats(struct nicvf *nic, int rq_idx);
340340
void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx);
341-
int nicvf_check_cqe_rx_errs(struct nicvf *nic,
342-
struct cmp_queue *cq, struct cqe_rx_t *cqe_rx);
341+
int nicvf_check_cqe_rx_errs(struct nicvf *nic, struct cqe_rx_t *cqe_rx);
343342
int nicvf_check_cqe_tx_errs(struct nicvf *nic,
344343
struct cmp_queue *cq, struct cqe_send_t *cqe_tx);
345344
#endif /* NICVF_QUEUES_H */

0 commit comments

Comments
 (0)