diff options
author | Zoltan Kiss <zoltan.kiss@linaro.org> | 2016-07-22 17:10:11 +0100 |
---|---|---|
committer | Zoltan Kiss <zoltan.kiss@linaro.org> | 2016-07-22 18:23:33 +0100 |
commit | d2cd17907bc9ca29fd6c6a98610e17abaf1d34e8 (patch) | |
tree | f3d828093538783842bc4bf9892c4bfdc89f533a /platform/linux-dpdk/include/odp_packet_io_internal.h | |
parent | 5ded0b8443bf2e5b6f710b8ad5c2b1d8b3c0abb1 (diff) |
Port 41ab23c8 "linux-gen: pktio: simplify state handling"
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Diffstat (limited to 'platform/linux-dpdk/include/odp_packet_io_internal.h')
-rw-r--r-- | platform/linux-dpdk/include/odp_packet_io_internal.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/platform/linux-dpdk/include/odp_packet_io_internal.h b/platform/linux-dpdk/include/odp_packet_io_internal.h index 5905cdb89..f46b258a5 100644 --- a/platform/linux-dpdk/include/odp_packet_io_internal.h +++ b/platform/linux-dpdk/include/odp_packet_io_internal.h @@ -67,7 +67,6 @@ struct pktio_entry { /* These two locks together lock the whole pktio device */ odp_ticketlock_t rxl; /**< RX ticketlock */ odp_ticketlock_t txl; /**< TX ticketlock */ - int taken; /**< is entry taken(1) or free(0) */ int cls_enabled; /**< is classifier enabled */ odp_pktio_t handle; /**< pktio handle */ union { @@ -75,10 +74,11 @@ struct pktio_entry { pkt_dpdk_t pkt_dpdk; /**< using DPDK API for IO */ }; enum { - STATE_OPENED = 0, /**< After open() */ - STATE_STARTED, /**< After start() */ - STATE_STOPPED /**< Same as OPENED, but only happens - after STARTED */ + PKTIO_STATE_FREE = 0, /**< Not allocated */ + PKTIO_STATE_ALLOCATED, /**< Allocated, open in progress */ + PKTIO_STATE_OPENED, /**< Open completed */ + PKTIO_STATE_STARTED, /**< Start completed */ + PKTIO_STATE_STOPPED /**< Stop completed */ } state; odp_pktio_config_t config; /**< Device configuration */ classifier_t cls; /**< classifier linked with this pktio*/ @@ -114,8 +114,6 @@ typedef struct { pktio_entry_t entries[ODP_CONFIG_PKTIO_ENTRIES]; } pktio_table_t; -int is_free(pktio_entry_t *entry); - typedef struct pktio_if_ops { const char *name; void (*print)(pktio_entry_t *pktio_entry); |