@@ -155,7 +155,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]);
packet = (struct dpif_packet*) (start + SHM_PKT_POOL_BUF_SIZE);
packet->ofpbuf.odp_pkt = pkts[i];
ofpbuf_init_odp(&packet->ofpbuf, SHM_PKT_POOL_BUF_SIZE);
@@ -286,7 +286,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++)) {
@@ -619,7 +619,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);
rx_bytes += odp_packet_len(pkt_tbl[i]);
}
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> --- lib/netdev-odp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)