aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-07-29Add: Missing Trex profilePeter Mikus1-0/+94
- IPv4 400 destinations IPs Change-Id: I007a588375bfa5be572a183ac6d2372801bea99d Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-29Remove obsolete L2 KWPeter Mikus13-1608/+210
Change-Id: I9a8aa6f5ccf95d632f4e677c8bf14f50b982d930 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-29make sudo to preserve user existing environment variablesYulong Pei1-3/+3
Change-Id: I83470b059b9ca59bb3725f1ebef6718adf8f91ae Signed-off-by: Yulong Pei <yulong.pei@intel.com>
2019-07-26Change: Move few KWPeter Mikus3-35/+34
Change-Id: I8c8ae1d7eed8cf28fc63ce42b2dc36dd16a5c0da Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-26Move: 100tnl tests to 400tnlPeter Mikus4-56/+56
- Just bcause they wanted. Change-Id: I46a83924d61e9191bb02cf9dcfb761156686d545 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-26Add: AVF into trace groupPeter Mikus1-1/+2
Change-Id: I3399d5fb2754eb67734e8f76a5743283fe9c074c Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-26Change: AVF can run also on i40evfPeter Mikus1-2/+2
Change-Id: I375b7c9f8fe81428cb16fea35128bddec089da1b Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-26FIX: IPsec UtilPeter Mikus1-25/+4
Because: >>> for i in xrange(4): ... if i > 0 and i % 250 / 3 == 0: ... i ... 1 2 Change-Id: Ia4eba227ea1e4c6222f32ac598f254428d95adc9 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-25docs: fixed TOC and list indexes in testbed specificationMaciek Konstantynowicz1-63/+63
Change-Id: I262b4a2b8c0afae4fd49e4edee8f12b2dbc0ed60 Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
2019-07-25docs: updated testbed specification with clx buildMaciek Konstantynowicz1-142/+408
Change-Id: Idaea4ac8ba04bea591ade511f55a5e421d04b8f5 Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
2019-07-25VPPD: VXLANPeter Mikus10-398/+276
Change-Id: Iac518341e6a0fff4a31ad3692ccc5697690db8be Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-25VAT-to-PAPI: LISPSetupAndrej Marcinek4-279/+268
Removed CRUD parts from tests Change-Id: Iaca36e62be5144ea3f2831457113959b65489db8 Signed-off-by: Andrej Marcinek <andrej.marcinek@pantheon.tech>
2019-07-24NF_density dot1qip4udpvxlanPeter Mikus80-326/+2623
+ NF_density compatible + Baseline VM tests compatible + Scalability NxM - 3n variant is missing in VXLAN and DOT1Q due to requests to have it asymmetrical - TODO Change-Id: Ia817d7be00622b594b451bc07756240d1a379e04 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-24Update initramfs buildjuraj.linkes2-5/+32
Initram image was being built with remote resume config. Remove the config while building to avoid possible 30s delays when booting VMs. Change-Id: I988838290dde3d6fae83676937d86f4f12bdb769 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-07-24Fix arm sut docker image namejuraj.linkes2-2/+2
Change-Id: I548b176baeec39362b9c0a4e02a664d1e95574a3 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-07-23vppdevice: fix install-dep failure when component install is requiredDave Wallace1-1/+1
Change-Id: Ibc4379ef25c1bf536da68eb6d0b035993e907c7a Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2019-07-23Add scale ipsec tunnel tests 40K, 60KPeter Mikus10-10/+1229
Change-Id: Iecfd7e69a72c8d5893a703fa93439cde0a3edf5f Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-23FIX: Vhost optimizationPeter Mikus3-11/+4
- Testpmd 9000B - Disable fsck - Remove redundant init mounts Change-Id: Ia063520d0a206e9eee831a5cc692e32baf5a92c8 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-23Update of VPP_STABLE_VER filesPeter Mikus2-2/+2
- use new vpp ref build - centos 19.08-rc0~707_g545866b~b7459 - use new vpp ref build - ubuntu 19.08-rc0~707-g545866b~b7629 Change-Id: Ib90849caf93872c658273fbad57d0eba6348dc28 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-23Update documentation of select_arch_osVratko Polak1-6/+3
Change-Id: I619a18918b0710a59a3b36283aa79da06d640fae Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-23Fix typo openssh-client -> openssh-clientsVratko Polak8-8/+8
Change-Id: I3834f2cf2341be15351435eed277810a5a2218c9 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-233n-tsh timeout, testbed tags and ansible updatejuraj.linkes46-145/+150
* disable AVF tests which don't work with x520 * increase VPPApiClient timeout to 14s, as x520 show hardware is slower on Taishan * re-enable vhost and memif tests * remove tx2 mrr daily tag list; no tx2 is used for perf testing * remove taishan workaround * add scipy arm prerequisites and scipy workaround * rework inventories/lf_inventory/hosts; move cpu_microarchitecture to host files Change-Id: I5f10bd07b8146ac3b8be8c54fbb4d924a9373813 Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-07-23Install also sshpass tin centos bootstrapsVratko Polak8-8/+8
Perhaps not needed, but it is better to keep copied code consistent. Change-Id: I068de028586ee6e659e91207f99c2a78ef377e3c Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-23Install openssh-client in all centos bootstrapsVratko Polak8-8/+8
Change-Id: Id3de81b88dfdbfecd1b343c50bcda46dd689a3ee Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-23Add support for aarch64 container imagesjuraj.linkes8-9/+32
Change-Id: I84f13d7139a6e5f7004426018c2d27425c5fa97e Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-07-23Trending: Reduce the number of input filesVratko Polak1-27/+9
Another attempt to avoid memory error. Dailies trimmed to ~2 months. Not removed last "skip" item to simplify future editing. Change-Id: Id411eeed109079c4c3f8994d5d6cc296ffe621fc Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-23Update of VPP_STABLE_VER files ubuntu18Peter Mikus1-1/+1
- use new vpp ref build - ubuntu 18.04: 19.08-rc0~705-gc75423981 csit-vpp-device-master-ubuntu1804-1n-skx-semiweekly/74/ Change-Id: Iba9eb224f0d0cfb79f8eaec2007a88855d233b9a Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-22Remove selected VIRL testsPeter Mikus8-889/+1
- These are not going to be converted to vpp_device Change-Id: I0148be014fee476f3dc1a72c51316aace0f2350f Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-19CSIT-1471: Migrate Dhcp library from VAT to PAPIJan Gelety1-4/+9
Change-Id: Ibc9b9b736532cce31994537e632daa4d4e62459c Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-19FIX: naming convention fixes for TOXPeter Mikus5-5/+5
Change-Id: I0644fbd0e136dee3a91fd9406155f971b3c726eb Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-19VAT API to PAPI CONVERSIONpremkumarv2-15/+41
Change-Id: I9c87cdfb99780f398da5cd90351b303caa89bda9 Signed-off-by: premkumarv <preym17@gmail.com>
2019-07-19TOX: Naming conventionsPeter Mikus2-1/+148
Change-Id: I038d90fc481e5f74085d0fe6165b12769d98e8a1 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-19PAL: Skip daily-master-3n-skx/540Vratko Polak1-0/+3
Frequently, reconnect is needed to finish the download, that can lead to IOError. But, MemoryError has also been seen, so perhaps this is a wrong fix. Worth a try, though. Change-Id: Icac17757a1a0ae361faddfa24a818496f14d7340 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-19CSIT-1469: Migrate SRv6 library from VAT to PAPIJan Gelety10-167/+293
Change-Id: Ibbec3d1bbda2af9fcab3230fd1747406a89f0cc5 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-19Remove un-interested VIRL tests and related resourcesJan Gelety20-2098/+1
Change-Id: I712f5dc238fdf480c7c35250148c12d03ed96d74 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-19PLRsearch methodology: Add more comments to graphsVratko Polak3-25/+151
Change-Id: I2d4743c6bb7dc91eca22b01298e4529f6b2e559d Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-19FIX: COP ipv6 missing FIBPeter Mikus3-2/+6
- From unknown reason VAT was more tolerant Change-Id: Ia740843c67604a18de40d14cc448138b9f079b41 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-19Add support for default_nic in mrr tag listsjuraj.linkes2-6/+7
Change-Id: I1fdc6f3019af6d46b985164c573d44b0e440febd Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
2019-07-19Bump VPP stable versionVratko Polak3-3/+3
The main goal is to have a build with https://gerrit.fd.io/r/20726 to enable detection of missing API messages. A later build was used, the one just before https://gerrit.fd.io/r/20711 as that looks risky. Change-Id: Id65066389a7ed70dca54acc085272a632859d42c Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-12Update of VPP_STABLE_VER filesJan Gelety3-3/+3
- use new vpp ref build - ubuntu 16.04: 19.08-rc0~681-ga0cb32c~b7576 - use new vpp ref build - ubuntu 18.04: 19.08-rc0~681-ga0cb32cb9 - use new vpp ref build - centos7: 19.08-rc0~681_ga0cb32c~b7430 Change-Id: I21baa8090962c2a6fdc3d03f8fbcd86a8e82126c Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-18Papi socket: except more errors to insert err_msgVratko Polak1-10/+14
Change-Id: Ided91ee2b47dafb6aad83091126294d79f67aeac Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-18Update of VPP_STABLE_VER filesJan Gelety3-3/+3
- use new vpp ref build - ubuntu 16.04: 19.08-rc0~680-g456d2f9~b7573 - use new vpp ref build - ubuntu 18.04: 19.08-rc0~680-g456d2f9c2 - use new vpp ref build - centos7: 19.08-rc0~680_g456d2f9~b7428 Change-Id: I12656e3809c7fc385029449030672b4792f28491 Signed-off-by: Jan Gelety <jgelety@cisco.com>
2019-07-18VAT-to-PAPI: LISPUtilAndrej Marcinek1-46/+161
Change-Id: I57328dbc33eaf62935a1a14e23f57ebab21c24f5 Signed-off-by: Andrej Marcinek <andrej.marcinek@pantheon.tech>
2019-07-18Trending: Delete presentation_newVratko Polak35-46979/+0
It is outdated an unmaintained. Change-Id: I9b48391906a233cbdf736a3b2d12da80d3a2d77d Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-18Trending: Reduce the number of input filesVratko Polak1-42/+6
Change-Id: Ie449aa820bc05d9fed285c04445a5cf715b8ebdf Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2019-07-17Remove obsolete DPDK bondingPeter Mikus1-99/+0
- Code not used Change-Id: I312635f8038c6d4d4db21d93e43df6b3636feb34 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-17FIX: Tags in ansiblePeter Mikus1-0/+1
Change-Id: I6772734b68bc2c09ee550f1a6369e3668f613d92 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-17FIX: Put VM interface pinning backPeter Mikus1-0/+6
- Must be there for DPDK NFs Change-Id: Icda8069beab4ce8ced17a372c84524c4824abd9d Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-17Revert "Avoid ci-management archiving files twice"Peter Mikus5-1/+31
This reverts commit ccfe499e2a27f2caf234ecbb2ec948120810eab6. Change-Id: I076bdaf255f6fa5cc6b0f25926850d62f450fd94 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2019-07-11CSIT-1469: Migrate IPsecUtil library from VAT to PAPIJan Gelety37-383/+838
Change-Id: Iac790bf5755a70697e4c4eff32242b04f8e7f789 Signed-off-by: Jan Gelety <jgelety@cisco.com>
p">(*mp)); mp->_vl_msg_id = ntohs (VL_API_POLICER_CLASSIFY_DETAILS); mp->context = context; mp->sw_if_index = htonl (sw_if_index); mp->table_index = htonl (table_index); vl_api_send_msg (reg, (u8 *) mp); } static void vl_api_policer_classify_dump_t_handler (vl_api_policer_classify_dump_t * mp) { vl_api_registration_t *reg; policer_classify_main_t *pcm = &policer_classify_main; u32 *vec_tbl; int i; u32 filter_sw_if_index; reg = vl_api_client_index_to_registration (mp->client_index); if (!reg) return; filter_sw_if_index = ntohl (mp->sw_if_index); if (filter_sw_if_index >= vec_len (pcm->classify_table_index_by_sw_if_index[mp->type])) return; if (filter_sw_if_index != ~0) vec_tbl = &pcm->classify_table_index_by_sw_if_index[mp->type][filter_sw_if_index]; else vec_tbl = pcm->classify_table_index_by_sw_if_index[mp->type]; if (vec_len (vec_tbl)) { for (i = 0; i < vec_len (vec_tbl); i++) { if (vec_elt (vec_tbl, i) == ~0) continue; send_policer_classify_details (i, vec_elt (vec_tbl, i), reg, mp->context); } } } static void vl_api_classify_table_ids_t_handler (vl_api_classify_table_ids_t * mp) { vl_api_registration_t *reg; reg = vl_api_client_index_to_registration (mp->client_index); if (!reg) return; vnet_classify_main_t *cm = &vnet_classify_main; vnet_classify_table_t *t; u32 *table_ids = 0; u32 count; /* *INDENT-OFF* */ pool_foreach (t, cm->tables, ({ vec_add1 (table_ids, ntohl(t - cm->tables)); })); /* *INDENT-ON* */ count = vec_len (table_ids); vl_api_classify_table_ids_reply_t *rmp; rmp = vl_msg_api_alloc_as_if_client (sizeof (*rmp) + count * sizeof (u32)); rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_TABLE_IDS_REPLY); rmp->context = mp->context; rmp->count = ntohl (count); clib_memcpy (rmp->ids, table_ids, count * sizeof (u32)); rmp->retval = 0; vl_api_send_msg (reg, (u8 *) rmp); vec_free (table_ids); } static void vl_api_classify_table_by_interface_t_handler (vl_api_classify_table_by_interface_t * mp) { vl_api_classify_table_by_interface_reply_t *rmp; int rv = 0; u32 sw_if_index = ntohl (mp->sw_if_index); u32 *acl = 0; vec_validate (acl, IN_OUT_ACL_N_TABLES - 1); vec_set (acl, ~0); VALIDATE_SW_IF_INDEX (mp); in_out_acl_main_t *am = &in_out_acl_main; int if_idx; u32 type; for (type = 0; type < IN_OUT_ACL_N_TABLES; type++) { u32 *vec_tbl = am->classify_table_index_by_sw_if_index[IN_OUT_ACL_INPUT_TABLE_GROUP] [type]; if (vec_len (vec_tbl)) { for (if_idx = 0; if_idx < vec_len (vec_tbl); if_idx++) { if (vec_elt (vec_tbl, if_idx) == ~0 || sw_if_index != if_idx) { continue; } acl[type] = vec_elt (vec_tbl, if_idx); } } } BAD_SW_IF_INDEX_LABEL; /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_CLASSIFY_TABLE_BY_INTERFACE_REPLY, ({ rmp->sw_if_index = ntohl(sw_if_index); rmp->l2_table_id = ntohl(acl[IN_OUT_ACL_TABLE_L2]); rmp->ip4_table_id = ntohl(acl[IN_OUT_ACL_TABLE_IP4]); rmp->ip6_table_id = ntohl(acl[IN_OUT_ACL_TABLE_IP6]); })); /* *INDENT-ON* */ vec_free (acl); } static void vl_api_classify_table_info_t_handler (vl_api_classify_table_info_t * mp) { vl_api_registration_t *reg; reg = vl_api_client_index_to_registration (mp->client_index); if (!reg) return; vl_api_classify_table_info_reply_t *rmp = 0; vnet_classify_main_t *cm = &vnet_classify_main; u32 table_id = ntohl (mp->table_id); vnet_classify_table_t *t; /* *INDENT-OFF* */ pool_foreach (t, cm->tables, ({ if (table_id == t - cm->tables) { rmp = vl_msg_api_alloc_as_if_client (sizeof (*rmp) + t->match_n_vectors * sizeof (u32x4)); rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_TABLE_INFO_REPLY); rmp->context = mp->context; rmp->table_id = ntohl(table_id); rmp->nbuckets = ntohl(t->nbuckets); rmp->match_n_vectors = ntohl(t->match_n_vectors); rmp->skip_n_vectors = ntohl(t->skip_n_vectors); rmp->active_sessions = ntohl(t->active_elements); rmp->next_table_index = ntohl(t->next_table_index); rmp->miss_next_index = ntohl(t->miss_next_index); rmp->mask_length = ntohl(t->match_n_vectors * sizeof (u32x4)); clib_memcpy(rmp->mask, t->mask, t->match_n_vectors * sizeof(u32x4)); rmp->retval = 0; break; } })); /* *INDENT-ON* */ if (rmp == 0) { rmp = vl_msg_api_alloc (sizeof (*rmp)); rmp->_vl_msg_id = ntohs ((VL_API_CLASSIFY_TABLE_INFO_REPLY)); rmp->context = mp->context; rmp->retval = ntohl (VNET_API_ERROR_CLASSIFY_TABLE_NOT_FOUND); } vl_api_send_msg (reg, (u8 *) rmp); } static void send_classify_session_details (vl_api_registration_t * reg, u32 table_id, u32 match_length, vnet_classify_entry_t * e, u32 context) { vl_api_classify_session_details_t *rmp; rmp = vl_msg_api_alloc (sizeof (*rmp)); clib_memset (rmp, 0, sizeof (*rmp)); rmp->_vl_msg_id = ntohs (VL_API_CLASSIFY_SESSION_DETAILS); rmp->context = context; rmp->table_id = ntohl (table_id); rmp->hit_next_index = ntohl (e->next_index); rmp->advance = ntohl (e->advance); rmp->opaque_index = ntohl (e->opaque_index); rmp->match_length = ntohl (match_length); clib_memcpy (rmp->match, e->key, match_length); vl_api_send_msg (reg, (u8 *) rmp); } static void vl_api_classify_session_dump_t_handler (vl_api_classify_session_dump_t * mp) { vnet_classify_main_t *cm = &vnet_classify_main; vl_api_registration_t *reg; u32 table_id = ntohl (mp->table_id); vnet_classify_table_t *t; reg = vl_api_client_index_to_registration (mp->client_index); if (!reg) return; /* *INDENT-OFF* */ pool_foreach (t, cm->tables, ({ if (table_id == t - cm->tables) { vnet_classify_bucket_t * b; vnet_classify_entry_t * v, * save_v; int i, j, k; for (i = 0; i < t->nbuckets; i++) { b = &t->buckets [i]; if (b->offset == 0) continue; save_v = vnet_classify_get_entry (t, b->offset); for (j = 0; j < (1<<b->log2_pages); j++) { for (k = 0; k < t->entries_per_page; k++) { v = vnet_classify_entry_at_index (t, save_v, j*t->entries_per_page + k); if (vnet_classify_entry_is_free (v)) continue; send_classify_session_details (reg, table_id, t->match_n_vectors * sizeof (u32x4), v, mp->context); } } } break; } })); /* *INDENT-ON* */ } static void vl_api_flow_classify_set_interface_t_handler (vl_api_flow_classify_set_interface_t * mp) { vlib_main_t *vm = vlib_get_main (); vl_api_flow_classify_set_interface_reply_t *rmp; int rv; u32 sw_if_index, ip4_table_index, ip6_table_index; ip4_table_index = ntohl (mp->ip4_table_index); ip6_table_index = ntohl (mp->ip6_table_index); sw_if_index = ntohl (mp->sw_if_index); VALIDATE_SW_IF_INDEX (mp); rv = vnet_set_flow_classify_intfc (vm, sw_if_index, ip4_table_index, ip6_table_index, mp->is_add); BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_FLOW_CLASSIFY_SET_INTERFACE_REPLY); } static void send_flow_classify_details (u32 sw_if_index, u32 table_index, vl_api_registration_t * reg, u32 context) { vl_api_flow_classify_details_t *mp; mp = vl_msg_api_alloc (sizeof (*mp)); clib_memset (mp, 0, sizeof (*mp)); mp->_vl_msg_id = ntohs (VL_API_FLOW_CLASSIFY_DETAILS); mp->context = context; mp->sw_if_index = htonl (sw_if_index); mp->table_index = htonl (table_index); vl_api_send_msg (reg, (u8 *) mp); } static void vl_api_flow_classify_dump_t_handler (vl_api_flow_classify_dump_t * mp) { vl_api_registration_t *reg; flow_classify_main_t *pcm = &flow_classify_main; u32 *vec_tbl; int i; u32 filter_sw_if_index; reg = vl_api_client_index_to_registration (mp->client_index); if (!reg) return; filter_sw_if_index = ntohl (mp->sw_if_index); if (filter_sw_if_index >= vec_len (pcm->classify_table_index_by_sw_if_index[mp->type])) return; if (filter_sw_if_index != ~0) vec_tbl = &pcm->classify_table_index_by_sw_if_index[mp->type][filter_sw_if_index]; else vec_tbl = pcm->classify_table_index_by_sw_if_index[mp->type]; if (vec_len (vec_tbl)) { for (i = 0; i < vec_len (vec_tbl); i++) { if (vec_elt (vec_tbl, i) == ~0) continue; send_flow_classify_details (i, vec_elt (vec_tbl, i), reg, mp->context); } } } static void vl_api_classify_set_interface_ip_table_t_handler (vl_api_classify_set_interface_ip_table_t * mp) { vlib_main_t *vm = vlib_get_main (); vl_api_classify_set_interface_ip_table_reply_t *rmp; int rv; VALIDATE_SW_IF_INDEX (mp); u32 table_index = ntohl (mp->table_index); u32 sw_if_index = ntohl (mp->sw_if_index); if (mp->is_ipv6) rv = vnet_set_ip6_classify_intfc (vm, sw_if_index, table_index); else rv = vnet_set_ip4_classify_intfc (vm, sw_if_index, table_index); BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_CLASSIFY_SET_INTERFACE_IP_TABLE_REPLY); } static void vl_api_classify_set_interface_l2_tables_t_handler (vl_api_classify_set_interface_l2_tables_t * mp) { vl_api_classify_set_interface_l2_tables_reply_t *rmp; int rv; u32 sw_if_index, ip4_table_index, ip6_table_index, other_table_index; int enable; ip4_table_index = ntohl (mp->ip4_table_index); ip6_table_index = ntohl (mp->ip6_table_index); other_table_index = ntohl (mp->other_table_index); sw_if_index = ntohl (mp->sw_if_index); VALIDATE_SW_IF_INDEX (mp); if (mp->is_input) rv = vnet_l2_input_classify_set_tables (sw_if_index, ip4_table_index, ip6_table_index, other_table_index); else rv = vnet_l2_output_classify_set_tables (sw_if_index, ip4_table_index, ip6_table_index, other_table_index); if (rv == 0) { if (ip4_table_index != ~0 || ip6_table_index != ~0 || other_table_index != ~0) enable = 1; else enable = 0; if (mp->is_input) vnet_l2_input_classify_enable_disable (sw_if_index, enable); else vnet_l2_output_classify_enable_disable (sw_if_index, enable); } BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_CLASSIFY_SET_INTERFACE_L2_TABLES_REPLY); } static void vl_api_input_acl_set_interface_t_handler (vl_api_input_acl_set_interface_t * mp) { vlib_main_t *vm = vlib_get_main (); vl_api_input_acl_set_interface_reply_t *rmp; int rv; VALIDATE_SW_IF_INDEX (mp); u32 ip4_table_index = ntohl (mp->ip4_table_index); u32 ip6_table_index = ntohl (mp->ip6_table_index); u32 l2_table_index = ntohl (mp->l2_table_index); u32 sw_if_index = ntohl (mp->sw_if_index); rv = vnet_set_input_acl_intfc (vm, sw_if_index, ip4_table_index, ip6_table_index, l2_table_index, mp->is_add); BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_INPUT_ACL_SET_INTERFACE_REPLY); } static void vl_api_output_acl_set_interface_t_handler (vl_api_output_acl_set_interface_t * mp) { vlib_main_t *vm = vlib_get_main (); vl_api_output_acl_set_interface_reply_t *rmp; int rv; VALIDATE_SW_IF_INDEX (mp); u32 ip4_table_index = ntohl (mp->ip4_table_index); u32 ip6_table_index = ntohl (mp->ip6_table_index); u32 l2_table_index = ntohl (mp->l2_table_index); u32 sw_if_index = ntohl (mp->sw_if_index); rv = vnet_set_output_acl_intfc (vm, sw_if_index, ip4_table_index, ip6_table_index, l2_table_index, mp->is_add); BAD_SW_IF_INDEX_LABEL; REPLY_MACRO (VL_API_OUTPUT_ACL_SET_INTERFACE_REPLY); } /* * classify_api_hookup * Add vpe's API message handlers to the table. * vlib has already mapped shared memory and * added the client registration handlers. * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process() */ #define vl_msg_name_crc_list #include <vnet/vnet_all_api_h.h> #undef vl_msg_name_crc_list static void setup_message_id_table (api_main_t * am) { #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id); foreach_vl_msg_name_crc_classify; #undef _ } static clib_error_t * classify_api_hookup (vlib_main_t * vm) { api_main_t *am = vlibapi_get_main (); #define _(N,n) \ vl_msg_api_set_handlers(VL_API_##N, #n, \ vl_api_##n##_t_handler, \ vl_noop_handler, \ vl_api_##n##_t_endian, \ vl_api_##n##_t_print, \ sizeof(vl_api_##n##_t), 1); foreach_vpe_api_msg; #undef _ /* * Set up the (msg_name, crc, message-id) table */ setup_message_id_table (am); return 0; } VLIB_API_INIT_FUNCTION (classify_api_hookup); /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */