aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>2017-11-16 17:02:08 -0600
committerYi He <yi.he@linaro.org>2017-12-15 09:58:57 +0800
commitbbbe6c0ef65c16f6d7d327712f177fbf6740e96f (patch)
tree75b2df8c6c633bc59832c0594ab519b1d9ecdec9
parent63fd88635cc10caaa02fdccd3f52c9494487bdd2 (diff)
linux-dpdk: buffer: remove default q metadata from odp_buffer_hdr_tdevel/caterpillar
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.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.Liljedahl@arm.com> Reviewed-by: Kevin Wang <kevin.wang@arm.com> Signed-off-by: Yi He <yi.he@linaro.org>
-rw-r--r--platform/linux-dpdk/Makefile.am4
-rw-r--r--platform/linux-dpdk/buffer/dpdk.c1
-rw-r--r--platform/linux-dpdk/include/odp_buffer_internal.h8
-rw-r--r--platform/linux-dpdk/odp_packet.c2
4 files changed, 7 insertions, 8 deletions
diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am
index 6dde37b9c..c2cfa3d06 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -264,8 +264,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 \
@@ -347,8 +345,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 22e1123b0..9033be50b 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;