aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Expand)AuthorFilesLines
2019-07-19FIX: naming convention fixes for TOXPeter Mikus4-4/+4
2019-07-19VAT API to PAPI CONVERSIONpremkumarv1-2/+2
2019-07-19Remove un-interested VIRL tests and related resourcesJan Gelety7-1289/+0
2019-07-19FIX: COP ipv6 missing FIBPeter Mikus2-0/+4
2019-07-11CSIT-1469: Migrate IPsecUtil library from VAT to PAPIJan Gelety30-30/+44
2019-07-17Refactor VPP Device VM vhost testsjuraj.linkes13-457/+344
2019-07-16fix invalid variable name issue of ipsechw test suitesYulong Pei2-2/+2
2019-07-12VPPD: Cop, iACL, PolicerPeter Mikus27-1269/+1155
2019-07-12VPPD: Merge IPv4/IPv6Peter Mikus8-436/+24
2019-07-11FIX: Various naming convention typosPeter Mikus21-21/+21
2019-07-11Aligning FUNC/PERF keywords - Data drivenPeter Mikus24-541/+943
2019-07-09Add scale ipsec tunnel tests 20KPeter Mikus40-36/+640
2019-07-09CSIT-1539 Aligning FUNC/PERF keywords - Phase IIIPeter Mikus116-705/+510
2019-07-08Remove import of removed qemu.robotVratko Polak11-11/+0
2019-07-05Remove redundant VIRL testPeter Mikus3-892/+0
2019-07-05Remove pkt_trace as global variablePeter Mikus2-4/+0
2019-07-03FIX: use len parameter name in prefix structure in ip_route_add_delJan Gelety2-2/+4
2019-07-03Fix typos in IPsec suitesVratko Polak2-2/+2
2019-07-02fix missing separator issue of crypto ipsec test suitesYulong Pei17-17/+17
2019-06-17Add packet trace to teardown of all vpp-device func testsJan Gelety4-4/+4
2019-06-28Fix missing pipe in ip6 suiteVratko Polak1-1/+1
2019-06-28VAT-to-PAPI: ClassifyTibor Frank5-812/+90
2019-06-27VAT-to-PAPI: IPFIX and SPANTibor Frank6-802/+0
2019-06-16FIX: IPUtil after vpp api changesJan Gelety3-3/+6
2019-06-25Align suite/test teardown/setupPeter Mikus400-3124/+2720
2019-06-21Allow 9000b tests for AVFVratko Polak7-0/+84
2019-06-21Align suite/test teardown/setupPeter Mikus398-1003/+774
2019-06-21FIX: IPsec TNL test should load pluginsPeter Mikus8-16/+24
2019-06-20perf ipsec: test renamingMaciek Konstantynowicz54-918/+918
2019-06-18CSIT-1459: Migrate IP libraries from VAT to PAPIJan Gelety49-989/+1097
2019-06-19Add scale ipsec tunnel testsPeter Mikus36-218/+1300
2019-06-14FIX: IPsec Functional teardownPeter Mikus4-6/+6
2019-06-10vpp_device: TAPPeter Mikus8-700/+19
2019-06-10vpp_device: IPsecPeter Mikus33-6489/+486
2019-06-09CSIT-1521 Convert NestedVM testcase into KernelVMPeter Mikus24-1121/+239
2019-06-05Even more Crypto combinationsPeter Mikus44-304/+2058
2019-06-04fix Honeycomb failing testsMichal Cmarada1-12/+14
2019-05-31CSIT-1468: InterfaceUtil migration from VAT to PAPIJan Gelety7-4/+13
2019-05-23FIX: IPsec typoPeter Mikus4-4/+4
2019-05-23CSIT-1507: Rework IPsec base testcasesPeter Mikus17-162/+1404
2019-05-23CSIT-1506: Rework IPsec base testcasesPeter Mikus16-140/+1391
2019-05-20FIX2: VTS cpu listJan Gelety3-3/+3
2019-05-20FIX: VTS cpu listJan Gelety3-9/+9
2019-05-16Tests: Add IPSEC SW scale testsTibor Frank4-0/+648
2019-05-15Fix teardown keyword for wrk testVratko Polak1-1/+1
2019-05-15FIX: Remove old restart sequence - HoneycombPeter Mikus2-3/+3
2019-05-14FIX: Remove old VPP Restart sequencePeter Mikus1-1/+0
2019-05-13Remove CFSRR1 VM testsPeter Mikus6-870/+0
2019-05-09Remove old VPP Restart sequencePeter Mikus5-7/+11
2019-05-09Add new higher density NF testsPeter Mikus12-0/+1584
n class="nf">format_device (u8 * s, va_list * args) { mactime_device_t *dp = va_arg (*args, mactime_device_t *); mactime_test_main_t *mm = &mactime_test_main; int verbose = va_arg (*args, int); int current_status = 99; char *status_string; u8 *macstring = 0; f64 now; int j; if (dp == 0) { s = format (s, "%-15s %5s %18s %14s %10s %11s %13s", "Device Name", "Index", "Addresses", "Status", "AllowPkt", "AllowByte", "DropPkt"); vec_add1 (s, '\n'); return s; } now = clib_timebase_now (&mm->timebase); /* Check dynamic ranges */ for (j = 0; j < vec_len (dp->ranges); j++) { clib_timebase_range_t *r = dp->ranges + j; f64 start0, end0; start0 = r->start + mm->sunday_midnight; end0 = r->end + mm->sunday_midnight; if (verbose) s = format (s, " Range %d: %U - %U\n", j, format_clib_timebase_time, start0, format_clib_timebase_time, end0); if (now >= start0 && now <= end0) { if (dp->flags & MACTIME_DEVICE_FLAG_DYNAMIC_ALLOW) current_status = 3; else if (dp->flags & MACTIME_DEVICE_FLAG_DYNAMIC_ALLOW_QUOTA) current_status = 5; else current_status = 2; if (verbose) { s = format (s, " Time in range %d:", j); s = format (s, " %U - %U\n", format_clib_timebase_time, start0, format_clib_timebase_time, end0); } goto print; } } if (verbose && j) s = format (s, " No range match.\n"); if (dp->flags & MACTIME_DEVICE_FLAG_STATIC_DROP) current_status = 0; if (dp->flags & MACTIME_DEVICE_FLAG_STATIC_ALLOW) current_status = 1; if (dp->flags & MACTIME_DEVICE_FLAG_DYNAMIC_ALLOW) current_status = 2; if (dp->flags & MACTIME_DEVICE_FLAG_DYNAMIC_DROP) current_status = 3; if (dp->flags & MACTIME_DEVICE_FLAG_DYNAMIC_ALLOW_QUOTA) current_status = 4; print: macstring = format (0, "%U", format_vl_api_mac_address_t, dp->mac_address); switch (current_status) { case 0: status_string = "static drop"; break; case 1: status_string = "static allow"; break; case 2: status_string = "dynamic drop"; break; case 3: status_string = "dynamic allow"; break; case 4: status_string = "d-quota inact"; break; case 5: status_string = "d-quota activ"; break; default: status_string = "code bug!"; break; } s = format (s, "%-15s %5d %18s %14s\n", dp->device_name, dp->pool_index, macstring, status_string); vec_free (macstring); if (dp->data_quota > 0) { s = format (s, "%-59s %s%U %s%U", " ", "Quota ", format_bytes_with_width, dp->data_quota, 10, "Use ", format_bytes_with_width, dp->data_used_in_range, 8); vec_add1 (s, '\n'); } return s; } static int api_mactime_dump (vat_main_t * vam) { mactime_test_main_t *tm = &mactime_test_main; unformat_input_t *i = vam->input; vl_api_mactime_dump_t *mp; int verbose = 0; int ret; f64 now; mactime_device_t *dev; now = clib_timebase_now (&tm->timebase); if (PREDICT_FALSE ((now - tm->sunday_midnight) > 86400.0 * 7.0)) tm->sunday_midnight = clib_timebase_find_sunday_midnight (now); /* Parse args required to build the message */ while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "force")) tm->vpp_table_epoch = 0; else if (unformat (i, "verbose")) verbose = 1; else break; } /* Construct the API message */ M (MACTIME_DUMP, mp); mp->my_table_epoch = clib_host_to_net_u32 (tm->vpp_table_epoch); /* send it... */ S (mp); /* Wait for a reply... */ W (ret); fformat (vam->ofp, "%U", format_device, 0 /* header */ , 0 /* verbose */ ); /* *INDENT-OFF* */ pool_foreach (dev, tm->devices, ({ fformat (vam->ofp, "%U", format_device, dev, verbose); })); /* *INDENT-ON* */ return ret; } /* These two ought to be in a library somewhere but they aren't */ static uword my_unformat_mac_address (unformat_input_t * input, va_list * args) { u8 *a = va_arg (*args, u8 *); return unformat (input, "%x:%x:%x:%x:%x:%x", &a[0], &a[1], &a[2], &a[3], &a[4], &a[5]); } static u8 * my_format_mac_address (u8 * s, va_list * args) { u8 *a = va_arg (*args, u8 *); return format (s, "%02x:%02x:%02x:%02x:%02x:%02x", a[0], a[1], a[2], a[3], a[4], a[5]); } static int api_mactime_add_del_range (vat_main_t * vam) { unformat_input_t *i = vam->input; vl_api_mactime_add_del_range_t *mp; u8 mac_address[8]; u8 *device_name = 0; clib_timebase_range_t *rp = 0; int name_set = 0; int mac_set = 0; u8 is_add = 1; u8 allow = 0; u8 allow_quota = 0; u8 drop = 0; u8 no_udp_10001 = 0; u64 data_quota = 0; int ret; int ii; /* Parse args required to build the message */ while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT) { if (unformat (i, "name %s", &device_name)) { vec_add1 (device_name, 0); name_set = 1; } else if (unformat (i, "allow-range %U", unformat_clib_timebase_range_vector, &rp)) allow = 1; else if (unformat (i, "allow-quota-range %U", unformat_clib_timebase_range_vector, &rp)) allow_quota = 1; else if (unformat (i, "drop-range %U", unformat_clib_timebase_range_vector, &rp)) drop = 1; else if (unformat (i, "allow-static")) allow = 1; else if (unformat (i, "drop-static")) drop = 1; else if (unformat (i, "no-udp-10001")) no_udp_10001 = 1; else if (unformat (i, "mac %U", my_unformat_mac_address, mac_address)) mac_set = 1; else if (unformat (i, "del")) is_add = 0; else if (unformat (i, "data-quota %lldM", &data_quota)) data_quota <<= 20; else if (unformat (i, "data-quota %lldG", &data_quota)) data_quota <<= 30; else break; } /* Sanity checks */ if (mac_set == 0) { vec_free (rp); vec_free (device_name); errmsg ("mac address required, not set\n"); return -99; } /* allow-range / drop-range parse errors cause this condition */ if (is_add && allow == 0 && drop == 0 && allow_quota == 0) { vec_free (rp); vec_free (device_name); errmsg ("parse error...\n"); return -99; } /* Unlikely, but check anyhow */ if (vec_len (device_name) > ARRAY_LEN (mp->device_name)) { vec_free (rp); vec_free (device_name); errmsg ("device name too long, max %d\n", ARRAY_LEN (mp->device_name)); return -99; } /* Cough up a device name if none set */ if (name_set == 0) { device_name = format (0, "mac %U%c", my_format_mac_address, mac_address, 0); } /* Construct the API message */ M2 (MACTIME_ADD_DEL_RANGE, mp, sizeof (rp[0]) * vec_len (rp)); mp->is_add = is_add; mp->drop = drop; mp->allow = allow; mp->allow_quota = allow_quota; mp->no_udp_10001 = no_udp_10001; mp->data_quota = clib_host_to_net_u64 (data_quota); memcpy (mp->mac_address, mac_address, sizeof (mp->mac_address)); memcpy (mp->device_name, device_name, vec_len (device_name)); mp->count = clib_host_to_net_u32 (vec_len (rp)); for (ii = 0; ii < vec_len (rp); ii++) { mp->ranges[ii].start = rp[ii].start; mp->ranges[ii].end = rp[ii].end; } vec_free (rp); vec_free (device_name); /* send it... */ S (mp); /* Wait for a reply... */ W (ret); return ret; } /* We shouldn't get these... */ static void vl_api_mactime_details_t_handler (vl_api_mactime_details_t * mp) { clib_warning ("WARNING: stub called..."); } #include <mactime/mactime.api_test.c> /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */