diff mbox series

[API-NEXT,v2,4/6] linux-gen: pktio: remove unused header file

Message ID 20170704095343.4266-5-petri.savolainen@linaro.org
State Accepted
Commit f72ae9c821eed99323a98a012659acd655095bb3
Headers show
Series Queue interface clean up | expand

Commit Message

Petri Savolainen July 4, 2017, 9:53 a.m. UTC
odp_packet_io_queue.h is not needed anymore as the queue
interface has replaced it.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
 platform/linux-generic/Makefile.am                 |  1 -
 .../linux-generic/include/odp_packet_io_queue.h    | 48 ----------------
 platform/linux-generic/odp_packet_io.c             | 66 +++++++++++-----------
 platform/linux-generic/odp_queue.c                 |  1 -
 platform/linux-generic/odp_queue_scalable.c        |  1 -
 5 files changed, 33 insertions(+), 84 deletions(-)
 delete mode 100644 platform/linux-generic/include/odp_packet_io_queue.h

-- 
2.13.0
diff mbox series

Patch

diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 82ab4642..b46c6501 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -175,7 +175,6 @@  noinst_HEADERS = \
 		  ${srcdir}/include/odp_packet_internal.h \
 		  ${srcdir}/include/odp_packet_io_internal.h \
 		  ${srcdir}/include/odp_packet_io_ipc_internal.h \
-		  ${srcdir}/include/odp_packet_io_queue.h \
 		  ${srcdir}/include/odp_packet_io_ring_internal.h \
 		  ${srcdir}/include/odp_packet_netmap.h \
 		  ${srcdir}/include/odp_packet_dpdk.h \
diff --git a/platform/linux-generic/include/odp_packet_io_queue.h b/platform/linux-generic/include/odp_packet_io_queue.h
deleted file mode 100644
index 71333ddc..00000000
--- a/platform/linux-generic/include/odp_packet_io_queue.h
+++ /dev/null
@@ -1,48 +0,0 @@ 
-/* Copyright (c) 2013, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier:     BSD-3-Clause
- */
-
-
-/**
- * @file
- *
- * ODP packet IO - implementation internal
- */
-
-#ifndef ODP_PACKET_IO_QUEUE_H_
-#define ODP_PACKET_IO_QUEUE_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <odp_queue_if.h>
-#include <odp_buffer_internal.h>
-#include <odp_config_internal.h>
-
-/** Max nbr of pkts to receive in one burst (keep same as QUEUE_MULTI_MAX) */
-#define ODP_PKTIN_QUEUE_MAX_BURST CONFIG_BURST_SIZE
-/* pktin_deq_multi() depends on the condition: */
-ODP_STATIC_ASSERT(ODP_PKTIN_QUEUE_MAX_BURST >= QUEUE_MULTI_MAX,
-		  "ODP_PKTIN_DEQ_MULTI_MAX_ERROR");
-
-int pktin_enqueue(queue_t queue, odp_buffer_hdr_t *buf_hdr);
-odp_buffer_hdr_t *pktin_dequeue(queue_t queue);
-
-int pktin_enq_multi(queue_t queue, odp_buffer_hdr_t *buf_hdr[], int num);
-int pktin_deq_multi(queue_t queue, odp_buffer_hdr_t *buf_hdr[], int num);
-
-
-int pktout_enqueue(queue_t queue, odp_buffer_hdr_t *buf_hdr);
-odp_buffer_hdr_t *pktout_dequeue(queue_t queue);
-
-int pktout_enq_multi(queue_t queue, odp_buffer_hdr_t *buf_hdr[], int num);
-int pktout_deq_multi(queue_t queue, odp_buffer_hdr_t *buf_hdr[], int num);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 3ed51ac9..0d825f91 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -7,7 +7,6 @@ 
 
 #include <odp/api/packet_io.h>
 #include <odp_packet_io_internal.h>
-#include <odp_packet_io_queue.h>
 #include <odp/api/packet.h>
 #include <odp_packet_internal.h>
 #include <odp_internal.h>
@@ -580,7 +579,7 @@  static inline int pktin_recv_buf(odp_pktin_queue_t queue,
 	return num_rx;
 }
 
-int pktout_enqueue(queue_t q_int, odp_buffer_hdr_t *buf_hdr)
+static int pktout_enqueue(queue_t q_int, odp_buffer_hdr_t *buf_hdr)
 {
 	odp_packet_t pkt = packet_from_buf_hdr(buf_hdr);
 	int len = 1;
@@ -593,13 +592,7 @@  int pktout_enqueue(queue_t q_int, odp_buffer_hdr_t *buf_hdr)
 	return (nbr == len ? 0 : -1);
 }
 
-odp_buffer_hdr_t *pktout_dequeue(queue_t q_int ODP_UNUSED)
-{
-	ODP_ABORT("attempted dequeue from a pktout queue");
-	return NULL;
-}
-
-int pktout_enq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[], int num)
+static int pktout_enq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[], int num)
 {
 	odp_packet_t pkt_tbl[QUEUE_MULTI_MAX];
 	int nbr;
@@ -615,22 +608,7 @@  int pktout_enq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[], int num)
 	return nbr;
 }
 
-int pktout_deq_multi(queue_t q_int ODP_UNUSED,
-		     odp_buffer_hdr_t *buf_hdr[] ODP_UNUSED,
-		     int num ODP_UNUSED)
-{
-	ODP_ABORT("attempted dequeue from a pktout queue");
-	return 0;
-}
-
-int pktin_enqueue(queue_t q_int ODP_UNUSED,
-		  odp_buffer_hdr_t *buf_hdr ODP_UNUSED)
-{
-	ODP_ABORT("attempted enqueue to a pktin queue");
-	return -1;
-}
-
-odp_buffer_hdr_t *pktin_dequeue(queue_t q_int)
+static odp_buffer_hdr_t *pktin_dequeue(queue_t q_int)
 {
 	odp_buffer_hdr_t *buf_hdr;
 	odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX];
@@ -652,14 +630,7 @@  odp_buffer_hdr_t *pktin_dequeue(queue_t q_int)
 	return buf_hdr;
 }
 
-int pktin_enq_multi(queue_t q_int ODP_UNUSED,
-		    odp_buffer_hdr_t *buf_hdr[] ODP_UNUSED, int num ODP_UNUSED)
-{
-	ODP_ABORT("attempted enqueue to a pktin queue");
-	return 0;
-}
-
-int pktin_deq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[], int num)
+static int pktin_deq_multi(queue_t q_int, odp_buffer_hdr_t *buf_hdr[], int num)
 {
 	int nbr;
 	odp_buffer_hdr_t *hdr_tbl[QUEUE_MULTI_MAX];
@@ -1183,6 +1154,35 @@  int odp_pktio_stats_reset(odp_pktio_t pktio)
 	return ret;
 }
 
+static int pktin_enqueue(queue_t q_int ODP_UNUSED,
+			 odp_buffer_hdr_t *buf_hdr ODP_UNUSED)
+{
+	ODP_ABORT("attempted enqueue to a pktin queue");
+	return -1;
+}
+
+static int pktin_enq_multi(queue_t q_int ODP_UNUSED,
+			   odp_buffer_hdr_t *buf_hdr[] ODP_UNUSED,
+			   int num ODP_UNUSED)
+{
+	ODP_ABORT("attempted enqueue to a pktin queue");
+	return 0;
+}
+
+static odp_buffer_hdr_t *pktout_dequeue(queue_t q_int ODP_UNUSED)
+{
+	ODP_ABORT("attempted dequeue from a pktout queue");
+	return NULL;
+}
+
+static int pktout_deq_multi(queue_t q_int ODP_UNUSED,
+			    odp_buffer_hdr_t *buf_hdr[] ODP_UNUSED,
+			    int num ODP_UNUSED)
+{
+	ODP_ABORT("attempted dequeue from a pktout queue");
+	return 0;
+}
+
 int odp_pktin_queue_config(odp_pktio_t pktio,
 			   const odp_pktin_queue_param_t *param)
 {
diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index 4c85027b..60f88f09 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -19,7 +19,6 @@ 
 #include <odp_schedule_if.h>
 #include <odp_config_internal.h>
 #include <odp_packet_io_internal.h>
-#include <odp_packet_io_queue.h>
 #include <odp_debug_internal.h>
 #include <odp/api/hints.h>
 #include <odp/api/sync.h>
diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c
index f95f5f93..7441a2a9 100644
--- a/platform/linux-generic/odp_queue_scalable.c
+++ b/platform/linux-generic/odp_queue_scalable.c
@@ -20,7 +20,6 @@ 
 
 #include <odp_buffer_inlines.h>
 #include <odp_packet_io_internal.h>
-#include <odp_packet_io_queue.h>
 #include <odp_pool_internal.h>
 #include <odp_queue_scalable_internal.h>
 #include <odp_schedule_if.h>