Lines Matching refs:nic_dev
129 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_alloc_skb() local
130 struct hinic_hwdev *hwdev = nic_dev->hwdev; in rx_alloc_skb()
166 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_unmap_skb() local
167 struct hinic_hwdev *hwdev = nic_dev->hwdev; in rx_unmap_skb()
196 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_alloc_pkts() local
208 if (free_wqebbs > nic_dev->rx_weight) in rx_alloc_pkts()
209 free_wqebbs = nic_dev->rx_weight; in rx_alloc_pkts()
317 static void hinic_copy_lp_data(struct hinic_dev *nic_dev, in hinic_copy_lp_data() argument
320 struct net_device *netdev = nic_dev->netdev; in hinic_copy_lp_data()
321 u8 *lb_buf = nic_dev->lb_test_rx_buf; in hinic_copy_lp_data()
322 int lb_len = nic_dev->lb_pkt_len; in hinic_copy_lp_data()
326 if (nic_dev->lb_test_rx_idx == LP_PKT_CNT) { in hinic_copy_lp_data()
327 nic_dev->lb_test_rx_idx = 0; in hinic_copy_lp_data()
328 netif_warn(nic_dev, drv, netdev, "Loopback test warning, receive too more test pkts\n"); in hinic_copy_lp_data()
331 if (skb->len != nic_dev->lb_pkt_len) { in hinic_copy_lp_data()
332 netif_warn(nic_dev, drv, netdev, "Wrong packet length\n"); in hinic_copy_lp_data()
333 nic_dev->lb_test_rx_idx++; in hinic_copy_lp_data()
337 pkt_offset = nic_dev->lb_test_rx_idx * lb_len; in hinic_copy_lp_data()
347 nic_dev->lb_test_rx_idx++; in hinic_copy_lp_data()
364 struct hinic_dev *nic_dev; in rxq_recv() local
377 nic_dev = netdev_priv(netdev); in rxq_recv()
421 if (unlikely(nic_dev->flags & HINIC_LP_TEST)) in rxq_recv()
422 hinic_copy_lp_data(nic_dev, skb); in rxq_recv()
463 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_poll() local
473 if (!HINIC_IS_VF(nic_dev->hwdev->hwif)) in rx_poll()
474 hinic_hwdev_set_msix_state(nic_dev->hwdev, in rx_poll()
483 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_add_napi() local
485 netif_napi_add(rxq->netdev, &rxq->napi, rx_poll, nic_dev->rx_weight); in rx_add_napi()
499 struct hinic_dev *nic_dev; in rx_irq() local
502 nic_dev = netdev_priv(rxq->netdev); in rx_irq()
503 if (!HINIC_IS_VF(nic_dev->hwdev->hwif)) in rx_irq()
504 hinic_hwdev_set_msix_state(nic_dev->hwdev, in rx_irq()
508 nic_dev = netdev_priv(rxq->netdev); in rx_irq()
509 hinic_hwdev_msix_cnt_set(nic_dev->hwdev, rq->msix_entry); in rx_irq()
517 struct hinic_dev *nic_dev = netdev_priv(rxq->netdev); in rx_request_irq() local
520 struct hinic_hwdev *hwdev = nic_dev->hwdev; in rx_request_irq()
534 intr_coal = &nic_dev->rx_intr_coalesce[qp->q_id]; in rx_request_irq()
542 netif_err(nic_dev, drv, rxq->netdev, in rx_request_irq()