mbuf: fix performance with 128-byte cache line
No need to split mbuf structure to two cache lines for 128-byte cache line size targets as it can fit on a single 128-byte cache line. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
This commit is contained in:
parent
acf7b47cdc
commit
99a5744147
@ -930,7 +930,7 @@ test_failing_mbuf_sanity_check(void)
|
||||
static int
|
||||
test_mbuf(void)
|
||||
{
|
||||
RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) != RTE_CACHE_LINE_SIZE * 2);
|
||||
RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) != RTE_CACHE_LINE_MIN_SIZE * 2);
|
||||
|
||||
/* create pktmbuf pool if it does not exist */
|
||||
if (pktmbuf_pool == NULL) {
|
||||
|
@ -68,6 +68,8 @@
|
||||
*/
|
||||
#define RTE_KNI_NAMESIZE 32
|
||||
|
||||
#define RTE_CACHE_LINE_MIN_SIZE 64
|
||||
|
||||
/*
|
||||
* Request id.
|
||||
*/
|
||||
@ -118,7 +120,7 @@ struct rte_kni_mbuf {
|
||||
uint16_t data_len; /**< Amount of data in segment buffer. */
|
||||
|
||||
/* fields on second cache line */
|
||||
char pad3[8] __attribute__((__aligned__(RTE_CACHE_LINE_SIZE)));
|
||||
char pad3[8] __attribute__((__aligned__(RTE_CACHE_LINE_MIN_SIZE)));
|
||||
void *pool;
|
||||
void *next;
|
||||
};
|
||||
|
@ -814,7 +814,7 @@ struct rte_mbuf {
|
||||
uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */
|
||||
|
||||
/* second cache line - fields only used in slow path or on TX */
|
||||
MARKER cacheline1 __rte_cache_aligned;
|
||||
MARKER cacheline1 __rte_cache_min_aligned;
|
||||
|
||||
union {
|
||||
void *userdata; /**< Can be used for external metadata */
|
||||
|
Loading…
Reference in New Issue
Block a user