Skip to content
Snippets Groups Projects
Commit 004f696f authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Daniel Salzman
Browse files

xdp: save a bit memory (in CPU caches)

parent e9e04569
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ _Static_assert((FRAME_SIZE == 4096 || FRAME_SIZE == 2048)
* our implementation assume that the rings can never get filled. */
&& IS_POWER_OF_2(UMEM_RING_LEN_RX) && UMEM_RING_LEN_RX > UMEM_FRAME_COUNT_RX
&& IS_POWER_OF_2(UMEM_RING_LEN_TX) && UMEM_RING_LEN_TX > UMEM_FRAME_COUNT_TX
&& true
&& UMEM_FRAME_COUNT_TX <= (1 << 16) /* see tx_free_indices */
, "Incorrect #define combination for AF_XDP.");
#endif
......
......@@ -71,7 +71,7 @@ struct xsk_umem_info {
struct umem_frame *frames; /**< The memory frames. TODO: (uint8_t *frammem) might be more practical. */
uint32_t tx_free_count; /**< The number of free frames (for TX). */
uint32_t tx_free_indices[]; /**< Stack of indices of the free frames (for TX). */
uint16_t tx_free_indices[]; /**< Stack of indices of the free frames (for TX). */
};
typedef struct knot_xsk_socket {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment