Added a new supported set operations bit mask to pktio
capability. This can be used to avoid calling unsupported
set operations, e.g. configuring promisc mode in validation
tests with virtual interfaces. For now setting promiscuous
mode is the only such operation, but others can be added
later on.

Reviewed-by: Petri Savolainen <petri.savolai...@nokia.com>
Signed-off-by: Matias Elo <matias....@nokia.com>
---
 include/odp/api/spec/packet_io.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index 59cfa3a..7b88902 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -209,6 +209,23 @@ typedef struct odp_pktio_param_t {
 } odp_pktio_param_t;
 
 /**
+ * Packet IO set operations
+ *
+ * Supported packet IO interface set operations listed in a bit field 
structure.
+ */
+typedef union odp_pktio_set_op_t {
+       /** Operation flags */
+       struct {
+               /** Promiscuous mode */
+               uint32_t promisc_mode : 1;
+       } op;
+       /** All bits of the bit field structure.
+         * This field can be used to set/clear all flags, or bitwise
+         * operations over the entire structure. */
+       uint32_t all_bits;
+} odp_pktio_set_op_t;
+
+/**
  * Packet IO capabilities
  */
 typedef struct odp_pktio_capability_t {
@@ -216,6 +233,11 @@ typedef struct odp_pktio_capability_t {
        unsigned max_input_queues;
        /** Maximum number of output queues */
        unsigned max_output_queues;
+       /** Supported set operations
+        *
+        * A bit set to one indicates a supported operation. All other bits are
+        * set to zero. */
+       odp_pktio_set_op_t set_op;
 } odp_pktio_capability_t;
 
 /**
-- 
1.9.1

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to