summaryrefslogtreecommitdiffstats
path: root/src/vnet/dev/dev.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-13 17:33:32 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2023-11-16 16:01:35 +0000
commit69768d99eed0f44f6955370cb1ad83b8b73e5368 (patch)
tree00c689be86b41fe36aae2a9e6e0d3422e1272d81 /src/vnet/dev/dev.h
parentf3be34e4433bb86509044290fa3cced543697a31 (diff)
dev: device and port specific args
Type: improvement Change-Id: I26124a50d8e05d6f01a2e6dbc4bc8183fb5a09c4 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/dev/dev.h')
-rw-r--r--src/vnet/dev/dev.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vnet/dev/dev.h b/src/vnet/dev/dev.h
index e3421b91978..c18d29a8d5b 100644
--- a/src/vnet/dev/dev.h
+++ b/src/vnet/dev/dev.h
@@ -10,6 +10,7 @@
#include <vppinfra/format.h>
#include <vnet/vnet.h>
#include <vnet/dev/types.h>
+#include <vnet/dev/args.h>
#define VNET_DEV_DEVICE_ID_PREFIX_DELIMITER "/"
@@ -287,6 +288,7 @@ typedef struct vnet_dev_port
vnet_dev_rx_queue_t **rx_queues;
vnet_dev_tx_queue_t **tx_queues;
vnet_dev_port_ops_t port_ops;
+ vnet_dev_arg_t *args;
vnet_dev_rx_queue_ops_t rx_queue_ops;
vnet_dev_tx_queue_ops_t tx_queue_ops;
vnet_dev_node_t rx_node;
@@ -338,6 +340,7 @@ typedef struct vnet_dev
vnet_dev_port_t **ports;
vnet_dev_periodic_op_t *periodic_ops;
u8 *description;
+ vnet_dev_arg_t *args;
u8 __clib_aligned (16)
data[];
} vnet_dev_t;
@@ -386,6 +389,7 @@ struct vnet_dev_driver_registration
vnet_dev_match_t *match;
int priority;
vnet_dev_ops_t ops;
+ vnet_dev_arg_t *args;
};
typedef struct
@@ -432,6 +436,7 @@ typedef struct
{
vnet_dev_port_attr_t attr;
vnet_dev_port_ops_t ops;
+ vnet_dev_arg_t *args;
u16 data_size;
void *initial_data;
} port;
@@ -469,6 +474,15 @@ typedef struct
u32 link_speed;
} vnet_dev_port_state_changes_t;
+/* args.c */
+vnet_dev_rv_t vnet_dev_arg_parse (vlib_main_t *, vnet_dev_t *,
+ vnet_dev_arg_t *, u8 *);
+void vnet_dev_arg_free (vnet_dev_arg_t **);
+void vnet_dev_arg_clear_value (vnet_dev_arg_t *);
+format_function_t format_vnet_dev_arg_type;
+format_function_t format_vnet_dev_arg_value;
+format_function_t format_vnet_dev_args;
+
/* dev.c */
vnet_dev_t *vnet_dev_alloc (vlib_main_t *, vnet_dev_device_id_t,
vnet_dev_driver_t *);