VPP-80: netmap binary API message element name collision

if_name collides w/ ietf-interfaces.yang member name, causing a build-break
in an existing yang-model-based app. Rename to "netmap_if_name".

Change-Id: Id386eacd77343dd15a868c28dacd2b0e4523bc9b
Signed-off-by: Dave Barach <dave@barachs.net>
This commit is contained in:
Dave Barach
2016-05-20 14:43:57 -04:00
parent b635c567d1
commit 6f7b992f56
3 changed files with 8 additions and 8 deletions

View File

@ -10534,7 +10534,7 @@ api_netmap_create (vat_main_t * vam)
M(NETMAP_CREATE, netmap_create);
clib_memcpy (mp->if_name, if_name, vec_len (if_name));
clib_memcpy (mp->netmap_if_name, if_name, vec_len (if_name));
clib_memcpy (mp->hw_addr, hw_addr, 6);
mp->use_random_hw_addr = random_hw_addr;
mp->is_pipe = is_pipe;
@ -10573,7 +10573,7 @@ api_netmap_delete (vat_main_t * vam)
M(NETMAP_DELETE, netmap_delete);
clib_memcpy (mp->if_name, if_name, vec_len (if_name));
clib_memcpy (mp->netmap_if_name, if_name, vec_len (if_name));
vec_free (if_name);
S; W;

View File

@ -6055,7 +6055,7 @@ vl_api_netmap_create_t_handler
int rv = 0;
u8 *if_name = NULL;
if_name = format(0, "%s", mp->if_name);
if_name = format(0, "%s", mp->netmap_if_name);
vec_add1 (if_name, 0);
rv = netmap_create_if(vm, if_name, mp->use_random_hw_addr ? 0 : mp->hw_addr,
@ -6075,7 +6075,7 @@ vl_api_netmap_delete_t_handler
int rv = 0;
u8 *if_name = NULL;
if_name = format(0, "%s", mp->if_name);
if_name = format(0, "%s", mp->netmap_if_name);
vec_add1 (if_name, 0);
rv = netmap_delete_if(vm, if_name);

View File

@ -3522,7 +3522,7 @@ manual_java define policer_details {
/** \brief Create netmap
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param if_name - interface name
@param netmap_if_name - interface name
@param hw_addr - interface MAC
@param use_random_hw_addr - use random generated MAC
@param is_pipe - is pipe
@ -3532,7 +3532,7 @@ define netmap_create {
u32 client_index;
u32 context;
u8 if_name[64];
u8 netmap_if_name[64];
u8 hw_addr[6];
u8 use_random_hw_addr;
u8 is_pipe;
@ -3551,13 +3551,13 @@ define netmap_create_reply {
/** \brief Delete netmap
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param if_name - interface name
@param netmap_if_name - interface name
*/
define netmap_delete {
u32 client_index;
u32 context;
u8 if_name[64];
u8 netmap_if_name[64];
};
/** \brief Delete netmap response