diff mbox

[4/5] netdev-odp: rename odp_packet_* functions

Message ID 1426792468-12598-5-git-send-email-zoltan.kiss@linaro.org
State New
Headers show

Commit Message

Zoltan Kiss March 19, 2015, 7:14 p.m. UTC
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---
 lib/netdev-odp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/lib/netdev-odp.c b/lib/netdev-odp.c
index 2a04d24..72c2368 100644
--- a/lib/netdev-odp.c
+++ b/lib/netdev-odp.c
@@ -156,7 +156,7 @@  odp_class_init(void)
             VLOG_ERR("Error: packet allocation failed.\n");
             return -1;
         }
-        start = (char *)odp_buffer_addr(odp_packet_to_buffer(pkts[i]));
+        start = (char *)odp_packet_data(pkts[i]);
         /* TODO: This 256 magic value is needed for ODP-DPDK, when the buffer is
          *  allocated by rte_eth_rx_burst the start is at a different place.
          *  Probably due to headroom, this is a workaround here at the moment */
@@ -289,7 +289,7 @@  static int drop_err_pkts(odp_packet_t pkt_tbl[], unsigned len)
     for (i = 0, j = 0; i < len; ++i) {
         pkt = pkt_tbl[i];
 
-        if (odp_unlikely(odp_packet_error(pkt))) {
+        if (odp_unlikely(odp_packet_has_error(pkt))) {
             odp_packet_free(pkt); /* Drop */
             pkt_cnt--;
         } else if (odp_unlikely(i != j++)) {
@@ -622,7 +622,7 @@  netdev_odp_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets,
     /* Build the array of dpif_packet pointers */
     for (i = 0; i < pkts_ok; i++) {
         char *start;
-        start = (char*)odp_buffer_addr(odp_packet_to_buffer(pkt_tbl[i]));
+        start = (char*)odp_packet_data(pkt_tbl[i]);
         packets[i] = (struct dpif_packet*) (start + SHM_PKT_POOL_BUF_SIZE);
         ofpbuf_init_odp(&packets[i]->ofpbuf, 0);
         rx_bytes += odp_packet_len(pkt_tbl[i]);