host-drivers/base-driver/vca/vop/vop_kvec_buff.c
int vop_kvec_size_to_ring_id(struct vop_dev_common *cdev, size_t size)
{
	struct vop_kvec_buf_local *kvec_buf_to = &cdev->kvec_buff.local_write_kvecs;
	int ring_id;
	for (ring_id = 0; ring_id < KVEC_BUF_NUM; ++ring_id) {
		if (size <= *kvec_buf_to->rings[ring_id].send_max_size) {
			return ring_id;
		}
	}

	/* Until send_max_size are known for rings, wait for the largest buffer */
	return KVEC_BUF_NUM - 1;
}
/*
 * vop_kvec_size_to_ring_id - returns best match for kvec ring buffer id
 * to look for write descriptor capable of storing data from read descriptor
 * of given size.
 */
returns best match for kvec ring buffer id
to look for write descriptor capable of storing data from read descriptor
of given size.
returns best match for kvec ring buffer id to look for write descriptor capable of storing data from read descriptor of given size .
int vop_kvec_size_to_ring_id(struct vop_dev_common *cdev, size_t size)
{
	struct vop_kvec_buf_local *kvec_buf_to = &cdev->kvec_buff.local_write_kvecs;
	int ring_id;
	for (ring_id = 0; ring_id < KVEC_BUF_NUM; ++ring_id) {
		if (size <= *kvec_buf_to->rings[ring_id].send_max_size) {
			return ring_id;
		}
	}
	return KVEC_BUF_NUM - 1;
}
int vop_kvec_size_to_ring_id ( struct vop_dev_common * cdev , size_t size ) { struct vop_kvec_buf_local * kvec_buf_to = & cdev -> kvec_buff . local_write_kvecs ; int ring_id ; for ( ring_id = 0 ; ring_id < KVEC_BUF_NUM ; ++ ring_id ) { if ( size <= * kvec_buf_to -> rings [ ring_id ] . send_max_size ) { return ring_id ; } } return KVEC_BUF_NUM - 1 ; }
vop_kvec_size_to_ring_id - returns best match for kvec ring buffer id
 to look for write descriptor capable of storing data from read descriptor
 of given size.
vop_kvec_size_to_ring_id - returns best match for kvec ring buffer id to look for write descriptor capable of storing data from read descriptor of given size .
/* Until send_max_size are known for rings, wait for the largest buffer */