diff options
author | Nicolas Morey-Chaisemartin <nmorey@kalray.eu> | 2015-09-23 09:43:53 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-10-22 15:46:22 +0300 |
commit | 3dde1d69d74199bdc3228407e07b70da1f627524 (patch) | |
tree | 3ebfbe55f102f77919408e777e4c0bc62aac76bd /include | |
parent | d818380f6a6d2832a8800384d99fb8b7a36cb7dc (diff) |
api: pktio: add input and output modes to make pktio one way
Add extra mode to disable inputs and/or outputs from a packet io.
This can be used to make pktio read-only, write-only or R/W.
Depending on the chosen mode, platform implementation may be able
to reduce usage of H/W resources.
Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/odp/api/packet_io.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 9b930bde..d8e69ed6 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -65,7 +65,9 @@ typedef enum odp_pktio_input_mode_t { /** Packet input through scheduled queues */ ODP_PKTIN_MODE_SCHED, /** Application polls packet input queues */ - ODP_PKTIN_MODE_POLL + ODP_PKTIN_MODE_POLL, + /** Application will never receive from this interface */ + ODP_PKTIN_MODE_DISABLED } odp_pktio_input_mode_t; /** @@ -75,7 +77,9 @@ typedef enum odp_pktio_output_mode_t { /** Direct packet output on the interface with odp_pktio_send() */ ODP_PKTOUT_MODE_SEND = 0, /** Packet output through traffic manager API */ - ODP_PKTOUT_MODE_TM + ODP_PKTOUT_MODE_TM, + /** Application will never send to this interface */ + ODP_PKTOUT_MODE_DISABLED } odp_pktio_output_mode_t; /** |