Lines Matching refs:iovb
238 static void recycle_iov_buf(ns_dev *card, struct sk_buff *iovb);
303 struct sk_buff *iovb; in nicstar_remove_one() local
335 while ((iovb = skb_dequeue(&card->iovpool.queue)) != NULL) in nicstar_remove_one()
337 dev_kfree_skb_any(iovb); in nicstar_remove_one()
848 struct sk_buff *iovb; in ns_init_card() local
849 iovb = alloc_skb(NS_IOVBUFSIZE, GFP_KERNEL); in ns_init_card()
850 if (iovb == NULL) in ns_init_card()
858 skb_queue_tail(&card->iovpool.queue, iovb); in ns_init_card()
945 struct sk_buff *iovb; in ns_init_card_error() local
946 while ((iovb = skb_dequeue(&card->iovpool.queue)) != NULL) in ns_init_card_error()
947 dev_kfree_skb_any(iovb); in ns_init_card_error()
1595 struct sk_buff *iovb; in ns_close() local
1604 iovb = vc->rx_iov; in ns_close()
1605 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, in ns_close()
1606 NS_SKB(iovb)->iovcnt); in ns_close()
1607 NS_SKB(iovb)->iovcnt = 0; in ns_close()
1608 NS_SKB(iovb)->vcc = NULL; in ns_close()
1610 recycle_iov_buf(card, iovb); in ns_close()
2127 struct sk_buff *iovb; in dequeue_rx() local
2206 if ((iovb = vc->rx_iov) == NULL) in dequeue_rx()
2208 iovb = skb_dequeue(&(card->iovpool.queue)); in dequeue_rx()
2209 if (iovb == NULL) /* No buffers in the queue */ in dequeue_rx()
2211 iovb = alloc_skb(NS_IOVBUFSIZE, GFP_ATOMIC); in dequeue_rx()
2212 if (iovb == NULL) in dequeue_rx()
2230 vc->rx_iov = iovb; in dequeue_rx()
2231 NS_SKB(iovb)->iovcnt = 0; in dequeue_rx()
2232 iovb->len = 0; in dequeue_rx()
2233 iovb->tail = iovb->data = iovb->head; in dequeue_rx()
2234 NS_SKB(iovb)->vcc = vcc; in dequeue_rx()
2239 else if (NS_SKB(iovb)->iovcnt >= NS_MAX_IOVECS) in dequeue_rx()
2243 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, NS_MAX_IOVECS); in dequeue_rx()
2244 NS_SKB(iovb)->iovcnt = 0; in dequeue_rx()
2245 iovb->len = 0; in dequeue_rx()
2246 iovb->tail = iovb->data = iovb->head; in dequeue_rx()
2247 NS_SKB(iovb)->vcc = vcc; in dequeue_rx()
2249 iov = &((struct iovec *) iovb->data)[NS_SKB(iovb)->iovcnt++]; in dequeue_rx()
2252 iovb->len += iov->iov_len; in dequeue_rx()
2254 if (NS_SKB(iovb)->iovcnt == 1) in dequeue_rx()
2264 recycle_iov_buf(card, iovb); in dequeue_rx()
2276 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, in dequeue_rx()
2277 NS_SKB(iovb)->iovcnt); in dequeue_rx()
2279 recycle_iov_buf(card, iovb); in dequeue_rx()
2292 len + 8 > iovb->len || len + (47 + 8) < iovb->len) in dequeue_rx()
2295 if (len + 8 > iovb->len || len + (47 + 8) < iovb->len) in dequeue_rx()
2300 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, in dequeue_rx()
2301 NS_SKB(iovb)->iovcnt); in dequeue_rx()
2303 recycle_iov_buf(card, iovb); in dequeue_rx()
2309 if (NS_SKB(iovb)->iovcnt == 1) /* Just a small buffer */ in dequeue_rx()
2331 else if (NS_SKB(iovb)->iovcnt == 2) /* One small plus one large buffer */ in dequeue_rx()
2407 recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, in dequeue_rx()
2408 NS_SKB(iovb)->iovcnt); in dequeue_rx()
2410 recycle_iov_buf(card, iovb); in dequeue_rx()
2442 iov = (struct iovec *) iovb->data; in dequeue_rx()
2446 recycle_iovec_rx_bufs(card, iov, NS_SKB(iovb)->iovcnt); in dequeue_rx()
2469 for (j = 1; j < NS_SKB(iovb)->iovcnt; j++) in dequeue_rx()
2495 recycle_iov_buf(card, iovb); in dequeue_rx()
2608 static void recycle_iov_buf(ns_dev *card, struct sk_buff *iovb) in recycle_iov_buf() argument
2612 skb_queue_tail(&card->iovpool.queue, iovb); in recycle_iov_buf()
2616 dev_kfree_skb_any(iovb); in recycle_iov_buf()
2925 struct sk_buff *iovb; in ns_ioctl() local
2928 iovb = skb_dequeue(&card->iovpool.queue); in ns_ioctl()
2931 if (iovb == NULL) in ns_ioctl()
2935 dev_kfree_skb_any(iovb); in ns_ioctl()
2940 struct sk_buff *iovb; in ns_ioctl() local
2942 iovb = alloc_skb(NS_IOVBUFSIZE, GFP_KERNEL); in ns_ioctl()
2943 if (iovb == NULL) in ns_ioctl()
2946 skb_queue_tail(&card->iovpool.queue, iovb); in ns_ioctl()