diff mbox

[2/2] linux-generic: netmap: renamed helper functions

Message ID 1409744502-32304-3-git-send-email-ciprian.barbu@linaro.org
State Accepted
Commit 1559bc0de7d1d64671527813e0a27dc03a820fcd
Headers show

Commit Message

Ciprian Barbu Sept. 3, 2014, 11:41 a.m. UTC
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
---
 example/packet_netmap/odp_pktio_netmap.c           | 2 +-
 platform/linux-generic/include/odp_packet_netmap.h | 2 +-
 platform/linux-generic/odp_packet_netmap.c         | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/example/packet_netmap/odp_pktio_netmap.c b/example/packet_netmap/odp_pktio_netmap.c
index cc2607b..88af2e5 100644
--- a/example/packet_netmap/odp_pktio_netmap.c
+++ b/example/packet_netmap/odp_pktio_netmap.c
@@ -190,7 +190,7 @@  static void *pktio_queue_thread(void *arg)
 		if (pktio_info->netmap_mode == ODP_NETMAP_MODE_HW) {
 			odp_packet_t pkt_copy;
 
-			pkt_copy = odp_packet_alloc(pkt_pool);
+			pkt_copy = odph_packet_alloc(pkt_pool);
 
 			if (odp_packet_copy(pkt_copy, pkt) != 0) {
 				ODP_ERR("Packet copy failed!\n");
diff --git a/platform/linux-generic/include/odp_packet_netmap.h b/platform/linux-generic/include/odp_packet_netmap.h
index 57d9f2c..1ab50d0 100644
--- a/platform/linux-generic/include/odp_packet_netmap.h
+++ b/platform/linux-generic/include/odp_packet_netmap.h
@@ -45,7 +45,7 @@  typedef struct {
 /**
  * Configure an interface to work in netmap mode
  */
-int setup_pkt_netmap(pkt_netmap_t * const pkt_nm, char *netdev,
+int setup_pkt_netmap(pkt_netmap_t * const pkt_nm, const char *netdev,
 		     odp_buffer_pool_t pool, netmap_params_t *nm_params);
 
 /**
diff --git a/platform/linux-generic/odp_packet_netmap.c b/platform/linux-generic/odp_packet_netmap.c
index 5942789..524492d 100644
--- a/platform/linux-generic/odp_packet_netmap.c
+++ b/platform/linux-generic/odp_packet_netmap.c
@@ -120,8 +120,8 @@  int setup_pkt_netmap(pkt_netmap_t * const pkt_nm, const char *netdev,
 		return -1;
 	pkt_nm->pool = pool;
 
-	pkt = odp_packet_alloc(pool);
-	if (!odp_packet_is_valid(pkt))
+	pkt = odph_packet_alloc(pool);
+	if (!odph_packet_is_valid(pkt))
 		return -1;
 
 	pkt_buf = odp_packet_buf_addr(pkt);
@@ -129,7 +129,7 @@  int setup_pkt_netmap(pkt_netmap_t * const pkt_nm, const char *netdev,
 	/* Store eth buffer offset for buffers from this pool */
 	pkt_nm->frame_offset = (uintptr_t)l2_hdr - (uintptr_t)pkt_buf;
 	/* pkt buffer size */
-	pkt_nm->buf_size = odp_packet_buf_size(pkt);
+	pkt_nm->buf_size = odph_packet_buf_size(pkt);
 	/* max frame len taking into account the l2-offset */
 	pkt_nm->max_frame_len = pkt_nm->buf_size - pkt_nm->frame_offset;
 	/* save netmap_mode for later use */
@@ -300,7 +300,7 @@  int recv_pkt_netmap(pkt_netmap_t * const pkt_nm, odp_packet_t pkt_table[],
 			uint32_t cur;
 
 			if (odp_likely(pkt == ODP_PACKET_INVALID)) {
-				pkt = odp_packet_alloc(pkt_nm->pool);
+				pkt = odph_packet_alloc(pkt_nm->pool);
 				if (odp_unlikely(pkt == ODP_PACKET_INVALID))
 					break;
 			}