Lines Matching refs:iovb

142 static void recycle_iov_buf(ns_dev * card, struct sk_buff *iovb);
203 struct sk_buff *iovb; in nicstar_remove_one() local
235 while ((iovb = skb_dequeue(&card->iovpool.queue)) != NULL) { in nicstar_remove_one()
236 dev_kfree_skb_any(iovb); in nicstar_remove_one()
742 struct sk_buff *iovb; in ns_init_card() local
743 iovb = alloc_skb(NS_IOVBUFSIZE, GFP_KERNEL); in ns_init_card()
744 if (iovb == NULL) { in ns_init_card()
752 NS_PRV_BUFTYPE(iovb) = BUF_NONE; in ns_init_card()
753 skb_queue_tail(&card->iovpool.queue, iovb); in ns_init_card()
821 struct sk_buff *iovb; in ns_init_card_error() local
822 while ((iovb = skb_dequeue(&card->iovpool.queue)) != NULL) in ns_init_card_error()
823 dev_kfree_skb_any(iovb); in ns_init_card_error()
1437 struct sk_buff *iovb; in ns_close() local
1447 iovb = vc->rx_iov; in ns_close()
1448 recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data, in ns_close()
1449 NS_PRV_IOVCNT(iovb)); in ns_close()
1450 NS_PRV_IOVCNT(iovb) = 0; in ns_close()
1452 recycle_iov_buf(card, iovb); in ns_close()
1978 struct sk_buff *iovb; in dequeue_rx() local
2071 if ((iovb = vc->rx_iov) == NULL) { in dequeue_rx()
2072 iovb = skb_dequeue(&(card->iovpool.queue)); in dequeue_rx()
2073 if (iovb == NULL) { /* No buffers in the queue */ in dequeue_rx()
2074 iovb = alloc_skb(NS_IOVBUFSIZE, GFP_ATOMIC); in dequeue_rx()
2075 if (iovb == NULL) { in dequeue_rx()
2082 NS_PRV_BUFTYPE(iovb) = BUF_NONE; in dequeue_rx()
2087 NS_PRV_BUFTYPE(iovb) = BUF_NONE; in dequeue_rx()
2092 vc->rx_iov = iovb; in dequeue_rx()
2093 NS_PRV_IOVCNT(iovb) = 0; in dequeue_rx()
2094 iovb->len = 0; in dequeue_rx()
2095 iovb->data = iovb->head; in dequeue_rx()
2096 skb_reset_tail_pointer(iovb); in dequeue_rx()
2100 } else if (NS_PRV_IOVCNT(iovb) >= NS_MAX_IOVECS) { in dequeue_rx()
2103 recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data, in dequeue_rx()
2105 NS_PRV_IOVCNT(iovb) = 0; in dequeue_rx()
2106 iovb->len = 0; in dequeue_rx()
2107 iovb->data = iovb->head; in dequeue_rx()
2108 skb_reset_tail_pointer(iovb); in dequeue_rx()
2110 iov = &((struct iovec *)iovb->data)[NS_PRV_IOVCNT(iovb)++]; in dequeue_rx()
2113 iovb->len += iov->iov_len; in dequeue_rx()
2116 if (NS_PRV_IOVCNT(iovb) == 1) { in dequeue_rx()
2125 recycle_iov_buf(card, iovb); in dequeue_rx()
2136 recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data, in dequeue_rx()
2137 NS_PRV_IOVCNT(iovb)); in dequeue_rx()
2139 recycle_iov_buf(card, iovb); in dequeue_rx()
2152 len + 8 > iovb->len || len + (47 + 8) < iovb->len) { in dequeue_rx()
2154 if (len + 8 > iovb->len || len + (47 + 8) < iovb->len) in dequeue_rx()
2159 recycle_iovec_rx_bufs(card, (struct iovec *)iovb->data, in dequeue_rx()
2160 NS_PRV_IOVCNT(iovb)); in dequeue_rx()
2162 recycle_iov_buf(card, iovb); in dequeue_rx()
2168 if (NS_PRV_IOVCNT(iovb) == 1) { /* Just a small buffer */ in dequeue_rx()
2181 } else if (NS_PRV_IOVCNT(iovb) == 2) { /* One small plus one large buffer */ in dequeue_rx()
2240 iovb->data, in dequeue_rx()
2241 NS_PRV_IOVCNT(iovb)); in dequeue_rx()
2243 recycle_iov_buf(card, iovb); in dequeue_rx()
2278 iov = (struct iovec *)iovb->data; in dequeue_rx()
2282 NS_PRV_IOVCNT(iovb)); in dequeue_rx()
2301 for (j = 1; j < NS_PRV_IOVCNT(iovb); j++) { in dequeue_rx()
2327 recycle_iov_buf(card, iovb); in dequeue_rx()
2348 static void recycle_iov_buf(ns_dev * card, struct sk_buff *iovb) in recycle_iov_buf() argument
2351 skb_queue_tail(&card->iovpool.queue, iovb); in recycle_iov_buf()
2354 dev_kfree_skb_any(iovb); in recycle_iov_buf()
2641 struct sk_buff *iovb; in ns_ioctl() local
2644 iovb = skb_dequeue(&card->iovpool.queue); in ns_ioctl()
2647 if (iovb == NULL) in ns_ioctl()
2652 dev_kfree_skb_any(iovb); in ns_ioctl()
2656 struct sk_buff *iovb; in ns_ioctl() local
2658 iovb = alloc_skb(NS_IOVBUFSIZE, GFP_KERNEL); in ns_ioctl()
2659 if (iovb == NULL) in ns_ioctl()
2661 NS_PRV_BUFTYPE(iovb) = BUF_NONE; in ns_ioctl()
2663 skb_queue_tail(&card->iovpool.queue, iovb); in ns_ioctl()