odp_pktio_get_input() has been replaced by odp_packet_input() odp_pktio_set_input() has no valid use case outside of the implementation.
Signed-off-by: Stuart Haslam <[email protected]> --- (This code contribution is provided under the terms of agreement LES-LTM-21309) Note: depends on odp_packet_input() from the Packet API patches that are not yet in mainline. example/l2fwd/odp_l2fwd.c | 2 +- example/packet/odp_pktio.c | 2 +- platform/linux-generic/include/api/odp_packet_io.h | 19 ------------------- platform/linux-generic/odp_packet_io.c | 12 +----------- 4 files changed, 3 insertions(+), 32 deletions(-) diff --git a/example/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c index 9721ab7..3e11b60 100644 --- a/example/l2fwd/odp_l2fwd.c +++ b/example/l2fwd/odp_l2fwd.c @@ -229,7 +229,7 @@ static void *pktio_queue_thread(void *arg) continue; } - pktio_tmp = odp_pktio_get_input(pkt); + pktio_tmp = odp_packet_input(pkt); outq_def = odp_pktio_outq_getdef(dstpktio[pktio_tmp]); if (outq_def == ODP_QUEUE_INVALID) { EXAMPLE_ERR(" [%02i] Error: def output-Q query\n", diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c index ea72e58..446aac5 100644 --- a/example/packet/odp_pktio.c +++ b/example/packet/odp_pktio.c @@ -209,7 +209,7 @@ static void *pktio_queue_thread(void *arg) continue; } - pktio_tmp = odp_pktio_get_input(pkt); + pktio_tmp = odp_packet_input(pkt); outq_def = odp_pktio_outq_getdef(pktio_tmp); if (outq_def == ODP_QUEUE_INVALID) { diff --git a/platform/linux-generic/include/api/odp_packet_io.h b/platform/linux-generic/include/api/odp_packet_io.h index 63c047c..a1ad754 100644 --- a/platform/linux-generic/include/api/odp_packet_io.h +++ b/platform/linux-generic/include/api/odp_packet_io.h @@ -111,25 +111,6 @@ int odp_pktio_inq_remdef(odp_pktio_t id); odp_queue_t odp_pktio_outq_getdef(odp_pktio_t id); /** - * Store packet input handle into packet - * - * @param pkt ODP packet buffer handle - * @param id ODP packet IO handle - * - * @return - */ -void odp_pktio_set_input(odp_packet_t pkt, odp_pktio_t id); - -/** - * Get stored packet input handle from packet - * - * @param pkt ODP packet buffer handle - * - * @return Packet IO handle - */ -odp_pktio_t odp_pktio_get_input(odp_packet_t pkt); - -/** * Configure the MTU for a packet IO interface. * * @param[in] id ODP packet IO handle. diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index aa37179..1b795d3 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -284,16 +284,6 @@ int odp_pktio_close(odp_pktio_t id) return 0; } -void odp_pktio_set_input(odp_packet_t pkt, odp_pktio_t pktio) -{ - odp_packet_hdr(pkt)->input = pktio; -} - -odp_pktio_t odp_pktio_get_input(odp_packet_t pkt) -{ - return odp_packet_hdr(pkt)->input; -} - int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) { pktio_entry_t *pktio_entry = get_pktio_entry(id); @@ -327,7 +317,7 @@ int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len) return pkts; for (i = 0; i < pkts; ++i) - odp_pktio_set_input(pkt_table[i], id); + odp_packet_hdr(pkt_table[i])->input = id; return pkts; } -- 2.1.1 _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
