On Tue, Feb 14, 2017 at 11:52 PM, Matus Fabian -X (matfabia - PANTHEON TECHNOLOGIES at Cisco) <matfa...@cisco.com> wrote:
> Hi Jon, > > > > snat_static_mapping_dump list only static mappings with resolved outside > address so snat_static_mapping_details doesn’t contain > external_sw_if_index. But we missing read API for static mappigs with > unresolved outside address, I will add those to snat_static_mapping_dump > too. > > > > Thanks, > > Matus > > > How does the API handler know which of the external_ip_address or the external_id_index to honor? Is there an invalid value that should be supplied in the other field when making the API call to snat_add_static_mapping? Or is the API user expected to resolve the external_ip_address and supply its sw_if_index too? Also, another question. When placing a range of addresses on an external interface for dynamic mappings, is the expected use case to first use snat_add_address_range on the external IF, then when they are all "added", issue a snat_add_del_interface_addr to make it effective (add) or remove them (del)? Finally, one last API implementation question. In snat_test.c, we find this snippet of code: static int api_snat_add_address_range (vat_main_t * vam) { ... start_host_order = clib_host_to_net_u32 (start_addr.as_u32); end_host_order = clib_host_to_net_u32 (end_addr.as_u32); ... count = (end_host_order - start_host_order) + 1; if (count > 1024) { errmsg ("%U - %U, %d addresses...\n", format_ip4_address, &start_addr, format_ip4_address, &end_addr, count); } Is that 1024 significant or arbitrary? Is there some limit in the VPP implementation that is being guarded here? Or is that an arbitrary UI-imposed limit? Specifically, must other API users adhere to this limit? If not is there some other limit at work here? I see under the covers that each address in this range is individually added to some address vector. And furthermore this vector DOES appear to be hard limited to 1024 entries as well. (See snat.c, vl_api_snat_add_address_range_t_handler() around line 820 or so.) Again, arbitrary? Or is the limit actually imposed by the FIB? Thanks, jdl
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev