Lines Matching refs:ndev

496 	if_t ndev = txq->ndev;  in mana_xmit()  local
498 struct mana_port_context *apc = if_getsoftc(ndev); in mana_xmit()
519 while ((mbuf = drbr_peek(ndev, txq->txq_br)) != NULL) { in mana_xmit()
521 (if_getdrvflags(ndev) & MANA_TXQ_FULL) != IFF_DRV_RUNNING) { in mana_xmit()
522 drbr_putback(ndev, txq->txq_br, mbuf); in mana_xmit()
528 if_setdrvflagbits(apc->ndev, IFF_DRV_OACTIVE, 0); in mana_xmit()
541 drbr_putback(ndev, txq->txq_br, mbuf); in mana_xmit()
562 drbr_advance(ndev, txq->txq_br); in mana_xmit()
634 if_printf(ndev, "Failed to post TX OOB: %d\n", err); in mana_xmit()
638 drbr_advance(ndev, txq->txq_br); in mana_xmit()
646 drbr_advance(ndev, txq->txq_br); in mana_xmit()
673 if_t ndev = txq->ndev; in mana_xmit_taskfunc() local
674 struct mana_port_context *apc = if_getsoftc(ndev); in mana_xmit_taskfunc()
676 while (!drbr_empty(ndev, txq->txq_br) && apc->port_is_up && in mana_xmit_taskfunc()
677 (if_getdrvflags(ndev) & MANA_TXQ_FULL) == IFF_DRV_RUNNING) { in mana_xmit_taskfunc()
1112 if_printf(apc->ndev, "Failed to configure vPort: %d\n", err); in mana_cfg_vport()
1119 if_printf(apc->ndev, "Failed to configure vPort: %d, 0x%x\n", in mana_cfg_vport()
1130 if_printf(apc->ndev, "Configured vPort %ju PD %u DB %u\n", in mana_cfg_vport()
1149 if_t ndev = apc->ndev; in mana_cfg_vport_steering() local
1182 if_printf(ndev, "Failed to configure vPort RX: %d\n", err); in mana_cfg_vport_steering()
1189 if_printf(ndev, "vPort RX configuration failed: %d\n", err); in mana_cfg_vport_steering()
1194 if_printf(ndev, "vPort RX configuration failed: 0x%x\n", in mana_cfg_vport_steering()
1199 if_printf(ndev, "Configured steering vPort %ju entries %u\n", in mana_cfg_vport_steering()
1216 if_t ndev = apc->ndev; in mana_create_wq_obj() local
1233 if_printf(ndev, "Failed to create WQ object: %d\n", err); in mana_create_wq_obj()
1240 if_printf(ndev, "Failed to create WQ object: %d, 0x%x\n", err, in mana_create_wq_obj()
1248 if_printf(ndev, "Got an invalid WQ object handle\n"); in mana_create_wq_obj()
1268 if_t ndev = apc->ndev; in mana_destroy_wq_obj() local
1279 if_printf(ndev, "Failed to destroy WQ object: %d\n", err); in mana_destroy_wq_obj()
1286 if_printf(ndev, "Failed to destroy WQ object: %d, 0x%x\n", in mana_destroy_wq_obj()
1359 if_printf(apc->ndev, "Failed to fence RQ %u: %d\n", in mana_fence_rq()
1366 if_printf(apc->ndev, "Failed to fence RQ %u: %d, 0x%x\n", in mana_fence_rq()
1375 if_printf(apc->ndev, "Failed to fence RQ %u: timed out\n", in mana_fence_rq()
1432 if_t ndev; in mana_poll_tx_cq() local
1442 ndev = txq->ndev; in mana_poll_tx_cq()
1443 apc = if_getsoftc(ndev); in mana_poll_tx_cq()
1552 if ((if_getdrvflags(ndev) & MANA_TXQ_FULL) == MANA_TXQ_FULL) { in mana_poll_tx_cq()
1564 if ((if_getdrvflags(ndev) & MANA_TXQ_FULL) == MANA_TXQ_FULL && in mana_poll_tx_cq()
1567 if_setdrvflagbits(apc->ndev, IFF_DRV_RUNNING, in mana_poll_tx_cq()
1619 if_t ndev = rxq->ndev; in mana_rx_mbuf() local
1626 apc = if_getsoftc(ndev); in mana_rx_mbuf()
1636 mbuf->m_pkthdr.rcvif = ndev; in mana_rx_mbuf()
1638 if ((if_getcapenable(ndev) & IFCAP_RXCSUM || in mana_rx_mbuf()
1639 if_getcapenable(ndev) & IFCAP_RXCSUM_IPV6) && in mana_rx_mbuf()
1698 if ((if_getcapenable(ndev) & IFCAP_LRO) && do_lro) { in mana_rx_mbuf()
1707 if_input(ndev, mbuf); in mana_rx_mbuf()
1786 if_t ndev = rxq->ndev; in mana_process_rx_cqe() local
1797 apc = if_getsoftc(ndev); in mana_process_rx_cqe()
1800 if_printf(ndev, "Dropped a truncated packet\n"); in mana_process_rx_cqe()
1804 if_printf(ndev, "RX coalescing is unsupported\n"); in mana_process_rx_cqe()
1812 if_printf(ndev, "Unknown RX CQE type = %d\n", in mana_process_rx_cqe()
1824 if_printf(ndev, "RX pkt len=0, rq=%u, cq=%u, rxobj=0x%jx\n", in mana_process_rx_cqe()
1837 apc = if_getsoftc(ndev); in mana_process_rx_cqe()
2010 drbr_flush(apc->ndev, txq->txq_br); in mana_deinit_txq()
2109 txq->ndev = net; in mana_create_txq()
2364 struct mana_eq *eq, if_t ndev) in mana_create_rxq() argument
2381 rxq->ndev = ndev; in mana_create_rxq()
2419 if (if_getcapenable(ndev) & IFCAP_LRO) { in mana_create_rxq()
2422 if_printf(ndev, "Failed to create LRO for rxq %d\n", in mana_create_rxq()
2425 rxq->lro.ifp = ndev; in mana_create_rxq()
2527 if_printf(ndev, "Failed to create RXQ: err = %d\n", err); in mana_create_rxq()
2538 mana_add_rx_queues(struct mana_port_context *apc, if_t ndev) in mana_add_rx_queues() argument
2546 rxq = mana_create_rxq(apc, i, &ac->eqs[i], ndev); in mana_add_rx_queues()
2628 mana_init_port(if_t ndev) in mana_init_port() argument
2630 struct mana_port_context *apc = if_getsoftc(ndev); in mana_init_port()
2643 if_printf(ndev, "Failed to query info for vPort %d\n", in mana_init_port()
2666 mana_alloc_queues(if_t ndev) in mana_alloc_queues() argument
2668 struct mana_port_context *apc = if_getsoftc(ndev); in mana_alloc_queues()
2671 err = mana_create_vport(apc, ndev); in mana_alloc_queues()
2675 err = mana_add_rx_queues(apc, ndev); in mana_alloc_queues()
2701 err = mana_alloc_queues(apc->ndev); in mana_up()
2715 if_link_state_change(apc->ndev, LINK_STATE_UP); in mana_up()
2716 if_setdrvflagbits(apc->ndev, IFF_DRV_RUNNING, IFF_DRV_OACTIVE); in mana_up()
2735 mana_dealloc_queues(if_t ndev) in mana_dealloc_queues() argument
2737 struct mana_port_context *apc = if_getsoftc(ndev); in mana_dealloc_queues()
2775 if_printf(ndev, "Failed to disable vPort: %d\n", err); in mana_dealloc_queues()
2796 if_setdrvflagbits(apc->ndev, IFF_DRV_OACTIVE, in mana_down()
2798 if_link_state_change(apc->ndev, LINK_STATE_DOWN); in mana_down()
2802 err = mana_dealloc_queues(apc->ndev); in mana_down()
2804 if_printf(apc->ndev, in mana_down()
2813 mana_detach(if_t ndev) in mana_detach() argument
2815 struct mana_port_context *apc = if_getsoftc(ndev); in mana_detach()
2818 ether_ifdetach(ndev); in mana_detach()
2899 if_t ndev; in mana_probe_port() local
2902 ndev = if_alloc_dev(IFT_ETHER, gc->dev); in mana_probe_port()
2903 *ndev_storage = ndev; in mana_probe_port()
2907 apc->ndev = ndev; in mana_probe_port()
2924 if_initname(ndev, device_get_name(gc->dev), port_idx); in mana_probe_port()
2925 if_setdev(ndev,gc->dev); in mana_probe_port()
2926 if_setsoftc(ndev, apc); in mana_probe_port()
2928 if_setflags(ndev, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); in mana_probe_port()
2929 if_setinitfn(ndev, mana_init); in mana_probe_port()
2930 if_settransmitfn(ndev, mana_start_xmit); in mana_probe_port()
2931 if_setqflushfn(ndev, mana_qflush); in mana_probe_port()
2932 if_setioctlfn(ndev, mana_ioctl); in mana_probe_port()
2933 if_setgetcounterfn(ndev, mana_get_counter); in mana_probe_port()
2935 if_setmtu(ndev, ETHERMTU); in mana_probe_port()
2936 if_setbaudrate(ndev, IF_Gbps(100)); in mana_probe_port()
2940 err = mana_init_port(ndev); in mana_probe_port()
2944 if_setcapabilitiesbit(ndev, in mana_probe_port()
2951 if_setcapenable(ndev, if_getcapabilities(ndev)); in mana_probe_port()
2954 if_sethwtsomax(ndev, MANA_TSO_MAX_SZ - in mana_probe_port()
2956 if_sethwtsomaxsegcount(ndev, MAX_MBUF_FRAGS); in mana_probe_port()
2957 if_sethwtsomaxsegsize(ndev, PAGE_SIZE); in mana_probe_port()
2960 if (if_getcapenable(ndev) & (IFCAP_TSO4 | IFCAP_TSO6)) in mana_probe_port()
2962 if (if_getcapenable(ndev) & IFCAP_TXCSUM) in mana_probe_port()
2964 if (if_getcapenable(ndev) & IFCAP_TXCSUM_IPV6) in mana_probe_port()
2967 if_sethwassist(ndev, hwassist); in mana_probe_port()
2974 ether_ifattach(ndev, apc->mac_addr); in mana_probe_port()
2982 if_setdrvflagbits(ndev, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); in mana_probe_port()
2989 if_printf(ndev, "Failed to probe vPort %d: %d\n", port_idx, err); in mana_probe_port()
2990 if_free(ndev); in mana_probe_port()
3048 if_t ndev; in mana_remove() local
3052 ndev = ac->ports[i]; in mana_remove()
3053 if (!ndev) { in mana_remove()
3059 mana_detach(ndev); in mana_remove()
3061 if_free(ndev); in mana_remove()