aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/include
diff options
context:
space:
mode:
authorCiprian Barbu <ciprian.barbu@linaro.org>2014-10-06 13:27:10 +0300
committerVenkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>2014-10-09 17:23:58 +0530
commit98f556f5045a5d3cf073e75af9f31a2dbeefbcaa (patch)
treef5d374471fa3b0817072b20309c335107940deaa /platform/linux-dpdk/include
parent9e73493250d59cb3c650acf4d458d3b9d6eb40b7 (diff)
linux-dpdk: Rework buffer management
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org> Reviewed-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org> Signed-off-by: Venkatesh Vivekanandan <venkatesh.vivekanandan@linaro.org>
Diffstat (limited to 'platform/linux-dpdk/include')
-rw-r--r--platform/linux-dpdk/include/odp_buffer_internal.h8
-rw-r--r--platform/linux-dpdk/include/odp_packet_internal.h8
-rw-r--r--platform/linux-dpdk/include/odp_packet_io_internal.h5
3 files changed, 7 insertions, 14 deletions
diff --git a/platform/linux-dpdk/include/odp_buffer_internal.h b/platform/linux-dpdk/include/odp_buffer_internal.h
index f87ec806a..540660697 100644
--- a/platform/linux-dpdk/include/odp_buffer_internal.h
+++ b/platform/linux-dpdk/include/odp_buffer_internal.h
@@ -59,8 +59,12 @@ typedef union odp_buffer_bits_t {
struct odp_buffer_hdr_t;
-typedef struct rte_mbuf odp_buffer_hdr_t;
-
+typedef struct odp_buffer_hdr_t {
+ struct rte_mbuf mb; /* Underlying DPDK rte_mbuf */
+ struct odp_buffer_hdr_t *next; /* Next buf in a list */
+ int type; /* ODP buffer type; not DPDK buf type */
+ uint32_t index; /* Index in the rte_mempool */
+} odp_buffer_hdr_t;
int odp_buffer_snprint(char *str, size_t n, odp_buffer_t buf);
diff --git a/platform/linux-dpdk/include/odp_packet_internal.h b/platform/linux-dpdk/include/odp_packet_internal.h
index ccaba5ac5..1cd44b104 100644
--- a/platform/linux-dpdk/include/odp_packet_internal.h
+++ b/platform/linux-dpdk/include/odp_packet_internal.h
@@ -113,15 +113,9 @@ typedef struct {
uint32_t l3_offset; /**< offset to L3 hdr, e.g. IPv4, IPv6 */
uint32_t l4_offset; /**< offset to L4 hdr (TCP, UDP, SCTP, also ICMP) */
- uint32_t frame_len;
-
- uint64_t user_ctx; /* user context */
+ uint64_t user_ctx; /**< user context */
odp_pktio_t input;
-
- uint32_t pad;
- uint8_t payload[];
-
} odp_packet_hdr_t;
/**
diff --git a/platform/linux-dpdk/include/odp_packet_io_internal.h b/platform/linux-dpdk/include/odp_packet_io_internal.h
index 08abea7a3..9263349d4 100644
--- a/platform/linux-dpdk/include/odp_packet_io_internal.h
+++ b/platform/linux-dpdk/include/odp_packet_io_internal.h
@@ -31,11 +31,6 @@ struct pktio_entry {
odp_queue_t inq_default; /**< default input queue, if set */
odp_queue_t outq_default; /**< default out queue */
odp_pktio_params_t params; /**< pktio parameters */
- pkt_sock_t pkt_sock; /**< using socket API for IO */
- pkt_sock_mmap_t pkt_sock_mmap; /**< using socket mmap API for IO */
-#ifdef ODP_HAVE_NETMAP
- pkt_netmap_t pkt_nm; /**< using netmap API for IO */
-#endif
pkt_dpdk_t pkt_dpdk; /**< using DPDK API for IO */
};