src/dpdk/lib/librte_efd/rte_efd.c
static inline uint8_t
efd_get_choice(const struct rte_efd_table * const table,
		const unsigned int socket_id, const uint32_t chunk_id,
		const uint32_t bin_id)
{
	struct efd_online_chunk *chunk = &table->chunks[socket_id][chunk_id];

	/*
	 * Grab the chunk (byte) that contains the choices
	 * for four neighboring bins.
	 */
	uint8_t choice_chunk =
			chunk->bin_choice_list[bin_id / EFD_CHUNK_NUM_BIN_TO_GROUP_SETS];

	/*
	 * Compute the offset into the chunk that contains
	 * the group_id lookup position
	 */
	int offset = (bin_id & 0x3) * 2;

	/* Extract from the byte just the desired lookup position */
	return (uint8_t) ((choice_chunk >> offset) & 0x3);
}
/**
 * Looks up the current permutation choice for a particular bin in the online table
 *
 * @param table
 *  EFD table to reference
 * @param socket_id
 *   Socket ID to use to look up existing values (ideally caller's socket id)
 * @param chunk_id
 *   Chunk ID of bin to look up
 * @param bin_id
 *   Bin ID to look up
 *
 * @return
 *   Currently active permutation choice in the online table
 */
Looks up the current permutation choice for a particular bin in the online table
@param table
EFD table to reference
@param socket_id
Socket ID to use to look up existing values (ideally caller's socket id)
@param chunk_id
Chunk ID of bin to look up
@param bin_id
Bin ID to look up

@return
Currently active permutation choice in the online table
Looks up the current permutation choice for a particular bin in the online table @param table EFD table to reference @param socket_id Socket ID to use to look up existing values ( ideally caller ' s socket id ) @param chunk_id Chunk ID of bin to look up @param bin_id Bin ID to look up @return Currently active permutation choice in the online table
static inline uint8_t
efd_get_choice(const struct rte_efd_table * const table,
		const unsigned int socket_id, const uint32_t chunk_id,
		const uint32_t bin_id)
{
	struct efd_online_chunk *chunk = &table->chunks[socket_id][chunk_id];
	uint8_t choice_chunk =
			chunk->bin_choice_list[bin_id / EFD_CHUNK_NUM_BIN_TO_GROUP_SETS];
	int offset = (bin_id & 0x3) * 2;
	return (uint8_t) ((choice_chunk >> offset) & 0x3);
}
static inline uint8_t efd_get_choice ( const struct rte_efd_table * const table , const unsigned int socket_id , const uint32_t chunk_id , const uint32_t bin_id ) { struct efd_online_chunk * chunk = & table -> chunks [ socket_id ] [ chunk_id ] ; uint8_t choice_chunk = chunk -> bin_choice_list [ bin_id / EFD_CHUNK_NUM_BIN_TO_GROUP_SETS ] ; int offset = ( bin_id & 0x3 ) * 2 ; return ( uint8_t ) ( ( choice_chunk >> offset ) & 0x3 ) ; }
Looks up the current permutation choice for a particular bin in the online table
 @param table
  EFD table to reference
 @param socket_id
   Socket ID to use to look up existing values (ideally caller's socket id)
 @param chunk_id
   Chunk ID of bin to look up
 @param bin_id
   Bin ID to look up
Looks up the current permutation choice for a particular bin in the online table @param table EFD table to reference @param socket_id Socket ID to use to look up existing values ( ideally caller ' s socket id ) @param chunk_id Chunk ID of bin to look up @param bin_id Bin ID to look up
/*
	 * Grab the chunk (byte) that contains the choices
	 * for four neighboring bins.
	 */ /*
	 * Compute the offset into the chunk that contains
	 * the group_id lookup position
	 */ /* Extract from the byte just the desired lookup position */