src/dpdk/lib/librte_mbuf/rte_mbuf_dyn.c
static int
check_offset(size_t offset, size_t size, size_t align)
{
	size_t i;

	if ((offset & (align - 1)) != 0)
		return -1;
	if (offset + size > sizeof(struct rte_mbuf))
		return -1;

	for (i = 0; i < size; i++) {
		if (!shm->free_space[i + offset])
			return -1;
	}

	return 0;
}
/* check if this offset can be used */
check if this offset can be used
check if this offset can be used
static int
check_offset(size_t offset, size_t size, size_t align)
{
	size_t i;
	if ((offset & (align - 1)) != 0)
		return -1;
	if (offset + size > sizeof(struct rte_mbuf))
		return -1;
	for (i = 0; i < size; i++) {
		if (!shm->free_space[i + offset])
			return -1;
	}
	return 0;
}
static int check_offset ( size_t offset , size_t size , size_t align ) { size_t i ; if ( ( offset & ( align - 1 ) ) != 0 ) return -1 ; if ( offset + size > sizeof ( struct rte_mbuf ) ) return -1 ; for ( i = 0 ; i < size ; i ++ ) { if ( ! shm -> free_space [ i + offset ] ) return -1 ; } return 0 ; }
check if this offset can be used
check if this offset can be used