From: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> Scalable queues do not require packet meta data meant for default queues. The meta data is compiled out while using scalable queues.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> Reviewed-by: Ola Liljedahl <ola.liljed...@arm.com> Reviewed-by: Kevin Wang <kevin.w...@arm.com> --- /** Email created from pull request 303 (nagarahalli:2.0-def-queue-metadata) ** https://github.com/Linaro/odp/pull/303 ** Patch: https://github.com/Linaro/odp/pull/303.patch ** Base sha: 6cd43041e55bd73a02ca202f835e590b3ad5c354 ** Merge commit sha: 4348604812fd462ba1a4df4dd05e252078a01422 **/ platform/linux-dpdk/Makefile.am | 4 ++-- platform/linux-dpdk/buffer/dpdk.c | 1 - platform/linux-dpdk/include/odp_buffer_internal.h | 8 +++++--- platform/linux-dpdk/odp_packet.c | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am index f27d2b50c..471f82c6a 100644 --- a/platform/linux-dpdk/Makefile.am +++ b/platform/linux-dpdk/Makefile.am @@ -265,8 +265,6 @@ __LIB__libodp_dpdk_la_SOURCES = \ pool/dpdk.c \ ../linux-generic/odp_queue_if.c \ ../linux-generic/queue/subsystem.c \ - ../linux-generic/queue/generic.c \ - ../linux-generic/queue/scalable.c \ ../linux-generic/odp_rwlock.c \ ../linux-generic/odp_rwlock_recursive.c \ ../linux-generic/pool/subsystem.c \ @@ -348,8 +346,10 @@ endif endif endif if ODP_SCHEDULE_SCALABLE +__LIB__libodp_dpdk_la_SOURCES += ../linux-generic/queue/scalable.c ../linux-generic/queue/scalable.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE else +__LIB__libodp_dpdk_la_SOURCES += ../linux-generic/queue/generic.c ../linux-generic/queue/generic.lo: AM_CFLAGS += -DIM_ACTIVE_MODULE endif diff --git a/platform/linux-dpdk/buffer/dpdk.c b/platform/linux-dpdk/buffer/dpdk.c index 704468eea..16ab19212 100644 --- a/platform/linux-dpdk/buffer/dpdk.c +++ b/platform/linux-dpdk/buffer/dpdk.c @@ -36,7 +36,6 @@ static odp_buffer_t buffer_alloc(odp_pool_t pool_hdl) return ODP_BUFFER_INVALID; } - buf_hdl_to_hdr(buffer)->next = NULL; return buffer; } diff --git a/platform/linux-dpdk/include/odp_buffer_internal.h b/platform/linux-dpdk/include/odp_buffer_internal.h index fcb300abd..cc9c7d39d 100644 --- a/platform/linux-dpdk/include/odp_buffer_internal.h +++ b/platform/linux-dpdk/include/odp_buffer_internal.h @@ -57,6 +57,7 @@ struct odp_buffer_hdr_t { /* ODP buffer type, not DPDK buf type */ int type; +#ifndef ODP_SCHEDULE_SCALABLE /* Burst counts */ int burst_num; int burst_first; @@ -64,6 +65,10 @@ struct odp_buffer_hdr_t { /* Next buf in a list */ struct odp_buffer_hdr_t *next; + /* Burst table */ + struct odp_buffer_hdr_t *burst[BUFFER_BURST_SIZE]; +#endif + /* User context pointer or u64 */ union { uint64_t buf_u64; @@ -77,9 +82,6 @@ struct odp_buffer_hdr_t { /* Event subtype. Should be ODP_EVENT_NO_SUBTYPE except packets. */ odp_event_type_t event_subtype; - /* Burst table */ - struct odp_buffer_hdr_t *burst[BUFFER_BURST_SIZE]; - /* Pool handle */ odp_pool_t pool_hdl; diff --git a/platform/linux-dpdk/odp_packet.c b/platform/linux-dpdk/odp_packet.c index 2391f13d6..54f340072 100644 --- a/platform/linux-dpdk/odp_packet.c +++ b/platform/linux-dpdk/odp_packet.c @@ -189,8 +189,6 @@ int odp_packet_reset(odp_packet_t pkt, uint32_t len) pkt_hdr->p.l3_offset = ODP_PACKET_OFFSET_INVALID; pkt_hdr->p.l4_offset = ODP_PACKET_OFFSET_INVALID; - pkt_hdr->buf_hdr.next = NULL; - pkt_hdr->input = ODP_PKTIO_INVALID; pkt_hdr->buf_hdr.event_subtype = ODP_EVENT_PACKET_BASIC;