diff options
author | Damjan Marion <damarion@cisco.com> | 2023-11-13 17:33:32 +0000 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2023-11-16 16:01:35 +0000 |
commit | 69768d99eed0f44f6955370cb1ad83b8b73e5368 (patch) | |
tree | 00c689be86b41fe36aae2a9e6e0d3422e1272d81 /src/vnet/dev/config.c | |
parent | f3be34e4433bb86509044290fa3cced543697a31 (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/config.c')
-rw-r--r-- | src/vnet/dev/config.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vnet/dev/config.c b/src/vnet/dev/config.c index 091d83ecfec..3026eaadca7 100644 --- a/src/vnet/dev/config.c +++ b/src/vnet/dev/config.c @@ -41,6 +41,9 @@ vnet_dev_config_one_interface (vlib_main_t *vm, unformat_input_t *input, else if (unformat (input, "flags %U", unformat_vnet_dev_port_flags, &args->flags)) ; + else if (unformat (input, "args %U", unformat_single_quoted_string, + &args->args)) + ; else { err = clib_error_return (0, "unknown input '%U'", @@ -50,7 +53,6 @@ vnet_dev_config_one_interface (vlib_main_t *vm, unformat_input_t *input, } return err; } - static clib_error_t * vnet_dev_config_one_device (vlib_main_t *vm, unformat_input_t *input, char *device_id) @@ -71,6 +73,9 @@ vnet_dev_config_one_device (vlib_main_t *vm, unformat_input_t *input, else if (unformat (input, "flags %U", unformat_vnet_dev_flags, &args.flags)) ; + else if (unformat (input, "args %U", unformat_single_quoted_string, + &args.args)) + ; else if (unformat (input, "port %u %U", &n, unformat_vlib_cli_sub_input, &sub_input)) { @@ -96,6 +101,7 @@ vnet_dev_config_one_device (vlib_main_t *vm, unformat_input_t *input, clib_memcpy (args.device_id, device_id, sizeof (args.device_id)); rv = vnet_dev_api_attach (vm, &args); + vec_free (args.args); if (rv == VNET_DEV_OK) { |