Lines Matching defs:nifp
269 struct netmap_if *nifp;
273 nifp = nmd->ops->nmd_if_new(nmd, na, priv);
276 return nifp;
1096 * objects (rings, nifp)
1446 * to native interfaces. In all other cases (nifp, netmap rings
2109 struct netmap_if *nifp;
2110 ssize_t base; /* handy for relative offsets between rings and nifp */
2126 nifp = netmap_if_malloc(nmd, len);
2127 if (nifp == NULL) {
2132 *(u_int *)(uintptr_t)&nifp->ni_tx_rings = na->num_tx_rings;
2133 *(u_int *)(uintptr_t)&nifp->ni_rx_rings = na->num_rx_rings;
2134 *(u_int *)(uintptr_t)&nifp->ni_host_tx_rings =
2136 *(u_int *)(uintptr_t)&nifp->ni_host_rx_rings =
2138 strlcpy(nifp->ni_name, na->name, sizeof(nifp->ni_name));
2142 * between the ring and nifp, so the information is usable in
2143 * userspace to reach the ring from the nifp.
2145 base = netmap_if_offset(nmd, nifp);
2156 *(ssize_t *)(uintptr_t)&nifp->ring_ofs[i] = ofs;
2168 *(ssize_t *)(uintptr_t)&nifp->ring_ofs[i+n[NR_TX]] = ofs;
2171 return (nifp);
2176 struct netmap_adapter *na, struct netmap_if *nifp)
2178 if (nifp == NULL)
2181 if (nifp->ni_bufs_head)
2182 netmap_extra_free(na, nifp->ni_bufs_head);
2183 netmap_if_free(nmd, nifp);
2760 struct netmap_if *nifp = NULL;
2768 nifp = (struct netmap_if *)((char *)(ptnmd->nm_addr) +
2771 return nifp;
2776 struct netmap_adapter *na, struct netmap_if *nifp)
2792 struct netmap_if *nifp;
2803 nifp = (struct netmap_if *)((char *)ptnmd->nm_addr + ptif->nifp_offset);
2809 ((char *)nifp + nifp->ring_ofs[i]);
2816 ((char *)nifp +
2817 nifp->ring_ofs[netmap_all_rings(na, NR_TX) + i]);