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 <davem@davemloft.net>
This commit is contained in:
commit
4fbe366ce3
@ -574,8 +574,7 @@ static inline void nicvf_set_rxhash(struct net_device *netdev,
|
|||||||
|
|
||||||
static void nicvf_rcv_pkt_handler(struct net_device *netdev,
|
static void nicvf_rcv_pkt_handler(struct net_device *netdev,
|
||||||
struct napi_struct *napi,
|
struct napi_struct *napi,
|
||||||
struct cmp_queue *cq,
|
struct cqe_rx_t *cqe_rx)
|
||||||
struct cqe_rx_t *cqe_rx, int cqe_type)
|
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
struct nicvf *nic = netdev_priv(netdev);
|
struct nicvf *nic = netdev_priv(netdev);
|
||||||
@ -591,7 +590,7 @@ static void nicvf_rcv_pkt_handler(struct net_device *netdev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check for errors */
|
/* 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)
|
if (err && !cqe_rx->rb_cnt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -682,8 +681,7 @@ loop:
|
|||||||
cq_idx, cq_desc->cqe_type);
|
cq_idx, cq_desc->cqe_type);
|
||||||
switch (cq_desc->cqe_type) {
|
switch (cq_desc->cqe_type) {
|
||||||
case CQE_TYPE_RX:
|
case CQE_TYPE_RX:
|
||||||
nicvf_rcv_pkt_handler(netdev, napi, cq,
|
nicvf_rcv_pkt_handler(netdev, napi, cq_desc);
|
||||||
cq_desc, CQE_TYPE_RX);
|
|
||||||
work_done++;
|
work_done++;
|
||||||
break;
|
break;
|
||||||
case CQE_TYPE_SEND:
|
case CQE_TYPE_SEND:
|
||||||
@ -1125,7 +1123,6 @@ int nicvf_stop(struct net_device *netdev)
|
|||||||
|
|
||||||
/* Clear multiqset info */
|
/* Clear multiqset info */
|
||||||
nic->pnicvf = nic;
|
nic->pnicvf = nic;
|
||||||
nic->sqs_count = 0;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1354,6 +1351,9 @@ void nicvf_update_stats(struct nicvf *nic)
|
|||||||
drv_stats->tx_frames_ok = stats->tx_ucast_frames_ok +
|
drv_stats->tx_frames_ok = stats->tx_ucast_frames_ok +
|
||||||
stats->tx_bcast_frames_ok +
|
stats->tx_bcast_frames_ok +
|
||||||
stats->tx_mcast_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 +
|
drv_stats->rx_drops = stats->rx_drop_red +
|
||||||
stats->rx_drop_overrun;
|
stats->rx_drop_overrun;
|
||||||
drv_stats->tx_drops = stats->tx_drops;
|
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)
|
|||||||
|
|
||||||
nicvf_send_vf_struct(nic);
|
nicvf_send_vf_struct(nic);
|
||||||
|
|
||||||
|
if (!pass1_silicon(nic->pdev))
|
||||||
|
nic->hw_tso = true;
|
||||||
|
|
||||||
/* Check if this VF is in QS only mode */
|
/* Check if this VF is in QS only mode */
|
||||||
if (nic->sqs_mode)
|
if (nic->sqs_mode)
|
||||||
return 0;
|
return 0;
|
||||||
@ -1557,9 +1560,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;
|
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->netdev_ops = &nicvf_netdev_ops;
|
||||||
netdev->watchdog_timeo = NICVF_TX_TIMEOUT;
|
netdev->watchdog_timeo = NICVF_TX_TIMEOUT;
|
||||||
|
|
||||||
|
@ -1329,16 +1329,12 @@ void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check for errors in the receive cmp.queue entry */
|
/* Check for errors in the receive cmp.queue entry */
|
||||||
int nicvf_check_cqe_rx_errs(struct nicvf *nic,
|
int nicvf_check_cqe_rx_errs(struct nicvf *nic, struct cqe_rx_t *cqe_rx)
|
||||||
struct cmp_queue *cq, struct cqe_rx_t *cqe_rx)
|
|
||||||
{
|
{
|
||||||
struct nicvf_hw_stats *stats = &nic->hw_stats;
|
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) {
|
if (!cqe_rx->err_level && !cqe_rx->err_opcode)
|
||||||
drv_stats->rx_frames_ok++;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
if (netif_msg_rx_err(nic))
|
if (netif_msg_rx_err(nic))
|
||||||
netdev_err(nic->netdev,
|
netdev_err(nic->netdev,
|
||||||
|
@ -338,8 +338,7 @@ u64 nicvf_queue_reg_read(struct nicvf *nic,
|
|||||||
/* Stats */
|
/* Stats */
|
||||||
void nicvf_update_rq_stats(struct nicvf *nic, int rq_idx);
|
void nicvf_update_rq_stats(struct nicvf *nic, int rq_idx);
|
||||||
void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx);
|
void nicvf_update_sq_stats(struct nicvf *nic, int sq_idx);
|
||||||
int nicvf_check_cqe_rx_errs(struct nicvf *nic,
|
int nicvf_check_cqe_rx_errs(struct nicvf *nic, struct cqe_rx_t *cqe_rx);
|
||||||
struct cmp_queue *cq, struct cqe_rx_t *cqe_rx);
|
|
||||||
int nicvf_check_cqe_tx_errs(struct nicvf *nic,
|
int nicvf_check_cqe_tx_errs(struct nicvf *nic,
|
||||||
struct cmp_queue *cq, struct cqe_send_t *cqe_tx);
|
struct cmp_queue *cq, struct cqe_send_t *cqe_tx);
|
||||||
#endif /* NICVF_QUEUES_H */
|
#endif /* NICVF_QUEUES_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user