Lines Matching refs:ndev

492 	if_t ndev = txq->ndev;  in mana_xmit()  local
494 struct mana_port_context *apc = if_getsoftc(ndev); in mana_xmit()
514 while ((mbuf = drbr_peek(ndev, txq->txq_br)) != NULL) { in mana_xmit()
516 (if_getdrvflags(ndev) & MANA_TXQ_FULL) != IFF_DRV_RUNNING) { in mana_xmit()
517 drbr_putback(ndev, txq->txq_br, mbuf); in mana_xmit()
523 if_setdrvflagbits(apc->ndev, IFF_DRV_OACTIVE, 0); in mana_xmit()
536 drbr_putback(ndev, txq->txq_br, mbuf); in mana_xmit()
557 drbr_advance(ndev, txq->txq_br); in mana_xmit()
629 if_printf(ndev, "Failed to post TX OOB: %d\n", err); in mana_xmit()
633 drbr_advance(ndev, txq->txq_br); in mana_xmit()
642 drbr_advance(ndev, txq->txq_br); in mana_xmit()
669 if_t ndev = txq->ndev; in mana_xmit_taskfunc() local
670 struct mana_port_context *apc = if_getsoftc(ndev); in mana_xmit_taskfunc()
672 while (!drbr_empty(ndev, txq->txq_br) && apc->port_is_up && in mana_xmit_taskfunc()
673 (if_getdrvflags(ndev) & MANA_TXQ_FULL) == IFF_DRV_RUNNING) { in mana_xmit_taskfunc()
1108 if_printf(apc->ndev, "Failed to configure vPort: %d\n", err); in mana_cfg_vport()
1115 if_printf(apc->ndev, "Failed to configure vPort: %d, 0x%x\n", in mana_cfg_vport()
1126 if_printf(apc->ndev, "Configured vPort %ju PD %u DB %u\n", in mana_cfg_vport()
1145 if_t ndev = apc->ndev; in mana_cfg_vport_steering() local
1178 if_printf(ndev, "Failed to configure vPort RX: %d\n", err); in mana_cfg_vport_steering()
1185 if_printf(ndev, "vPort RX configuration failed: %d\n", err); in mana_cfg_vport_steering()
1190 if_printf(ndev, "vPort RX configuration failed: 0x%x\n", in mana_cfg_vport_steering()
1195 if_printf(ndev, "Configured steering vPort %ju entries %u\n", in mana_cfg_vport_steering()
1212 if_t ndev = apc->ndev; in mana_create_wq_obj() local
1229 if_printf(ndev, "Failed to create WQ object: %d\n", err); in mana_create_wq_obj()
1236 if_printf(ndev, "Failed to create WQ object: %d, 0x%x\n", err, in mana_create_wq_obj()
1244 if_printf(ndev, "Got an invalid WQ object handle\n"); in mana_create_wq_obj()
1264 if_t ndev = apc->ndev; in mana_destroy_wq_obj() local
1275 if_printf(ndev, "Failed to destroy WQ object: %d\n", err); in mana_destroy_wq_obj()
1282 if_printf(ndev, "Failed to destroy WQ object: %d, 0x%x\n", in mana_destroy_wq_obj()
1355 if_printf(apc->ndev, "Failed to fence RQ %u: %d\n", in mana_fence_rq()
1362 if_printf(apc->ndev, "Failed to fence RQ %u: %d, 0x%x\n", in mana_fence_rq()
1371 if_printf(apc->ndev, "Failed to fence RQ %u: timed out\n", in mana_fence_rq()
1427 if_t ndev; in mana_poll_tx_cq() local
1437 ndev = txq->ndev; in mana_poll_tx_cq()
1438 apc = if_getsoftc(ndev); in mana_poll_tx_cq()
1546 if ((if_getdrvflags(ndev) & MANA_TXQ_FULL) == MANA_TXQ_FULL) { in mana_poll_tx_cq()
1558 if ((if_getdrvflags(ndev) & MANA_TXQ_FULL) == MANA_TXQ_FULL && in mana_poll_tx_cq()
1561 if_setdrvflagbits(apc->ndev, IFF_DRV_RUNNING, in mana_poll_tx_cq()
1620 if_t ndev = rxq->ndev; in mana_rx_mbuf() local
1627 apc = if_getsoftc(ndev); in mana_rx_mbuf()
1637 mbuf->m_pkthdr.rcvif = ndev; in mana_rx_mbuf()
1639 if ((if_getcapenable(ndev) & IFCAP_RXCSUM || in mana_rx_mbuf()
1640 if_getcapenable(ndev) & IFCAP_RXCSUM_IPV6) && in mana_rx_mbuf()
1699 if ((if_getcapenable(ndev) & IFCAP_LRO) && do_lro) { in mana_rx_mbuf()
1708 if_input(ndev, mbuf); in mana_rx_mbuf()
1725 if_t ndev = rxq->ndev; in mana_process_rx_cqe() local
1736 apc = if_getsoftc(ndev); in mana_process_rx_cqe()
1739 if_printf(ndev, "Dropped a truncated packet\n"); in mana_process_rx_cqe()
1743 if_printf(ndev, "RX coalescing is unsupported\n"); in mana_process_rx_cqe()
1751 if_printf(ndev, "Unknown RX CQE type = %d\n", in mana_process_rx_cqe()
1763 if_printf(ndev, "RX pkt len=0, rq=%u, cq=%u, rxobj=0x%jx\n", in mana_process_rx_cqe()
1776 apc = if_getsoftc(ndev); in mana_process_rx_cqe()
1961 drbr_flush(apc->ndev, txq->txq_br); in mana_deinit_txq()
2056 txq->ndev = net; in mana_create_txq()
2311 struct mana_eq *eq, if_t ndev) in mana_create_rxq() argument
2328 rxq->ndev = ndev; in mana_create_rxq()
2349 if (if_getcapenable(ndev) & IFCAP_LRO) { in mana_create_rxq()
2352 if_printf(ndev, "Failed to create LRO for rxq %d\n", in mana_create_rxq()
2355 rxq->lro.ifp = ndev; in mana_create_rxq()
2457 if_printf(ndev, "Failed to create RXQ: err = %d\n", err); in mana_create_rxq()
2468 mana_add_rx_queues(struct mana_port_context *apc, if_t ndev) in mana_add_rx_queues() argument
2476 rxq = mana_create_rxq(apc, i, &ac->eqs[i], ndev); in mana_add_rx_queues()
2558 mana_init_port(if_t ndev) in mana_init_port() argument
2560 struct mana_port_context *apc = if_getsoftc(ndev); in mana_init_port()
2573 if_printf(ndev, "Failed to query info for vPort %d\n", in mana_init_port()
2596 mana_alloc_queues(if_t ndev) in mana_alloc_queues() argument
2598 struct mana_port_context *apc = if_getsoftc(ndev); in mana_alloc_queues()
2601 err = mana_create_vport(apc, ndev); in mana_alloc_queues()
2605 err = mana_add_rx_queues(apc, ndev); in mana_alloc_queues()
2631 err = mana_alloc_queues(apc->ndev); in mana_up()
2645 if_link_state_change(apc->ndev, LINK_STATE_UP); in mana_up()
2646 if_setdrvflagbits(apc->ndev, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); in mana_up()
2665 mana_dealloc_queues(if_t ndev) in mana_dealloc_queues() argument
2667 struct mana_port_context *apc = if_getsoftc(ndev); in mana_dealloc_queues()
2705 if_printf(ndev, "Failed to disable vPort: %d\n", err); in mana_dealloc_queues()
2726 if_setdrvflagbits(apc->ndev, IFF_DRV_OACTIVE, in mana_down()
2728 if_link_state_change(apc->ndev, LINK_STATE_DOWN); in mana_down()
2732 err = mana_dealloc_queues(apc->ndev); in mana_down()
2734 if_printf(apc->ndev, in mana_down()
2743 mana_detach(if_t ndev) in mana_detach() argument
2745 struct mana_port_context *apc = if_getsoftc(ndev); in mana_detach()
2748 ether_ifdetach(ndev); in mana_detach()
2773 if_t ndev; in mana_probe_port() local
2776 ndev = if_alloc_dev(IFT_ETHER, gc->dev); in mana_probe_port()
2777 *ndev_storage = ndev; in mana_probe_port()
2781 apc->ndev = ndev; in mana_probe_port()
2794 if_initname(ndev, device_get_name(gc->dev), port_idx); in mana_probe_port()
2795 if_setdev(ndev,gc->dev); in mana_probe_port()
2796 if_setsoftc(ndev, apc); in mana_probe_port()
2798 if_setflags(ndev, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); in mana_probe_port()
2799 if_setinitfn(ndev, mana_init); in mana_probe_port()
2800 if_settransmitfn(ndev, mana_start_xmit); in mana_probe_port()
2801 if_setqflushfn(ndev, mana_qflush); in mana_probe_port()
2802 if_setioctlfn(ndev, mana_ioctl); in mana_probe_port()
2803 if_setgetcounterfn(ndev, mana_get_counter); in mana_probe_port()
2805 if_setmtu(ndev, ETHERMTU); in mana_probe_port()
2806 if_setbaudrate(ndev, IF_Gbps(100)); in mana_probe_port()
2810 err = mana_init_port(ndev); in mana_probe_port()
2814 if_setcapabilitiesbit(ndev, in mana_probe_port()
2821 if_setcapenable(ndev, if_getcapabilities(ndev)); in mana_probe_port()
2824 if_sethwtsomax(ndev, MANA_TSO_MAX_SZ - in mana_probe_port()
2826 if_sethwtsomaxsegcount(ndev, MAX_MBUF_FRAGS); in mana_probe_port()
2827 if_sethwtsomaxsegsize(ndev, PAGE_SIZE); in mana_probe_port()
2830 if (if_getcapenable(ndev) & (IFCAP_TSO4 | IFCAP_TSO6)) in mana_probe_port()
2832 if (if_getcapenable(ndev) & IFCAP_TXCSUM) in mana_probe_port()
2834 if (if_getcapenable(ndev) & IFCAP_TXCSUM_IPV6) in mana_probe_port()
2837 if_sethwassist(ndev, hwassist); in mana_probe_port()
2844 ether_ifattach(ndev, apc->mac_addr); in mana_probe_port()
2852 if_setdrvflagbits(ndev, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); in mana_probe_port()
2859 if_printf(ndev, "Failed to probe vPort %d: %d\n", port_idx, err); in mana_probe_port()
2860 if_free(ndev); in mana_probe_port()
2918 if_t ndev; in mana_remove() local
2922 ndev = ac->ports[i]; in mana_remove()
2923 if (!ndev) { in mana_remove()
2929 mana_detach(ndev); in mana_remove()
2931 if_free(ndev); in mana_remove()