diff options
author | Pierre Pfister <ppfister@cisco.com> | 2016-02-19 13:52:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2016-02-19 15:58:07 +0000 |
commit | ef65cb0696b3ee42834a72a35c1eb08da75eed99 (patch) | |
tree | f949c0aea6b0d3ffd9059287c94bb9e20522338a /vpp/api/api.c | |
parent | b44e9bc90b634b07d5f93a731a95028adc73bcbc (diff) |
Add custom mac address option to vhost interfaces.
Generating a new MAC address everytime vpp reboots can quickly
become cumbersome (e.g. in test scenarios).
This commit allows vhost mac addresses to be configured
manually.
Change-Id: Ic6d16a2d14cdf8e49dc29041bbafde39d9fc8370
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Diffstat (limited to 'vpp/api/api.c')
-rw-r--r-- | vpp/api/api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vpp/api/api.c b/vpp/api/api.c index e14eef63..e30240c4 100644 --- a/vpp/api/api.c +++ b/vpp/api/api.c @@ -3551,7 +3551,8 @@ vl_api_create_vhost_user_if_t_handler (vl_api_create_vhost_user_if_t *mp) rv = dpdk_vhost_user_create_if(vnm, vm, (char *)mp->sock_filename, mp->is_server, &sw_if_index, (u64)~0, - mp->renumber, ntohl(mp->custom_dev_instance)); + mp->renumber, ntohl(mp->custom_dev_instance), + (mp->use_custom_mac)?mp->mac_address:NULL); REPLY_MACRO2(VL_API_CREATE_VHOST_USER_IF_REPLY, ({ |