aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/avf/avf_api.c
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2018-07-24 14:00:41 +0200
committerNeale Ranns <nranns@cisco.com>2018-07-25 12:05:29 +0000
commit4e6014fc9e8611eef16d9267151f1039ff00c190 (patch)
tree4fb9652a20399925f57f4a86064ec83b2e38d2d1 /src/plugins/avf/avf_api.c
parente8b68a3da28aa0a2c5f2b7db8e4a59b787c3c4d1 (diff)
avf: api fix
avf_create_reply returns software index for the new interface Change-Id: I8a6b1a1985b072efafa24eb258b1f2cb1bea1110 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/plugins/avf/avf_api.c')
-rw-r--r--src/plugins/avf/avf_api.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/avf/avf_api.c b/src/plugins/avf/avf_api.c
index 7c5925244ca..3bb720b27f2 100644
--- a/src/plugins/avf/avf_api.c
+++ b/src/plugins/avf/avf_api.c
@@ -62,20 +62,24 @@ vl_api_avf_create_t_handler (vl_api_avf_create_t * mp)
avf_main_t *am = &avf_main;
vl_api_avf_create_reply_t *rmp;
avf_create_if_args_t args;
- int rv = 0;
+ int rv;
memset (&args, 0, sizeof (avf_create_if_args_t));
args.enable_elog = ntohl (mp->enable_elog);
args.addr.as_u32 = ntohl (mp->pci_addr);
- args.rxq_size = ntohl (mp->rxq_size);
- args.txq_size = ntohl (mp->txq_size);
+ args.rxq_size = ntohs (mp->rxq_size);
+ args.txq_size = ntohs (mp->txq_size);
avf_create_if (vm, &args);
-
rv = args.rv;
- REPLY_MACRO (VL_API_AVF_CREATE_REPLY + am->msg_id_base);
+ /* *INDENT-OFF* */
+ REPLY_MACRO2 (VL_API_AVF_CREATE_REPLY + am->msg_id_base,
+ ({
+ rmp->sw_if_index = ntohl (args.sw_if_index);
+ }));
+ /* *INDENT-ON* */
}
static void