aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/odp_pool.c
diff options
context:
space:
mode:
authorTuomas Taipale <tuomas.taipale@nokia.com>2023-06-20 06:15:32 +0000
committerTuomas Taipale <95341842+TuomasTaipale@users.noreply.github.com>2023-06-29 11:27:12 +0300
commitd6461dfb25798aeb91bea58ebcd6ca6b128a835a (patch)
treed3ccaf166eade982033b03c287cb407981a7ddbd /platform/linux-dpdk/odp_pool.c
parent45c99f0e213463bb2410882b9d63ab80cc522f6b (diff)
linux-dpdk: remove rte_mbuf from common event header
Remove `struct rte_mbuf` from the common event header. Concrete pool element types now have an explicit `struct rte_mbuf` field followed by a new `_odp_event_hdr_int_t` type field which is the existing `_odp_event_hdr_t` with `struct rte_mbuf` field removed. `_odp_event_hdr_t` remains but only for casting purposes. The removal results in a saving of full cache line for each type. Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'platform/linux-dpdk/odp_pool.c')
-rw-r--r--platform/linux-dpdk/odp_pool.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/platform/linux-dpdk/odp_pool.c b/platform/linux-dpdk/odp_pool.c
index a4a3f398c..862019333 100644
--- a/platform/linux-dpdk/odp_pool.c
+++ b/platform/linux-dpdk/odp_pool.c
@@ -235,10 +235,10 @@ int _odp_event_is_valid(odp_event_t event)
if (pool == NULL)
return 0;
- if (pool != _odp_pool_entry(event_hdr->pool))
+ if (pool != _odp_pool_entry(event_hdr->hdr.pool))
return 0;
- if (event_hdr->index >= pool->rte_mempool->size)
+ if (event_hdr->hdr.index >= pool->rte_mempool->size)
return 0;
return 1;
@@ -612,10 +612,10 @@ static void init_obj_priv_data(struct rte_mempool *mp ODP_UNUSED, void *arg, voi
/* No need for headroom in non-packet objects */
mb->data_off = 0;
- event_hdr->index = i;
- event_hdr->pool = _odp_pool_handle(priv_data->pool);
- event_hdr->type = priv_data->type;
- event_hdr->event_type = priv_data->event_type;
+ event_hdr->hdr.index = i;
+ event_hdr->hdr.pool = _odp_pool_handle(priv_data->pool);
+ event_hdr->hdr.type = priv_data->type;
+ event_hdr->hdr.event_type = priv_data->event_type;
switch (priv_data->type) {
case ODP_POOL_BUFFER:
@@ -1286,10 +1286,10 @@ static void init_ext_obj(struct rte_mempool *mp, void *arg, void *mbuf, unsigned
rte_mbuf_refcnt_set(mb, 1);
mb->next = NULL;
/* Save index, might be useful for debugging purposes */
- event_hdr->index = i;
- event_hdr->pool = _odp_pool_handle(mb_ctor_arg->pool);
- event_hdr->type = mb_ctor_arg->type;
- event_hdr->event_type = mb_ctor_arg->event_type;
+ event_hdr->hdr.index = i;
+ event_hdr->hdr.pool = _odp_pool_handle(mb_ctor_arg->pool);
+ event_hdr->hdr.type = mb_ctor_arg->type;
+ event_hdr->hdr.event_type = mb_ctor_arg->event_type;
switch (mb_ctor_arg->type) {
case ODP_POOL_BUFFER: