aboutsummaryrefslogtreecommitdiffstats
path: root/svm
AgeCommit message (Expand)AuthorFilesLines
2016-08-15VPP-327 Coding standards cleanup for vppinfraDave Barach3-19/+19
2016-08-15VPP-236 Support 64-bit vector lengths, shared memory segments >4 GBDave Barach3-32/+75
2016-08-12VPP-237: indent fixes in prep for checkstyleEd Warnicke2-41/+41
2016-08-05VPP-189 Clean up more coverity warningsDave Barach1-1/+7
2016-07-26Fix coverity warningsDave Barach1-0/+1
2016-07-18Add uid/gid config parameters to shared-vm database map operatorDave Barach3-49/+145
2016-07-08fd-io-styleify for svmDave Barach10-2247/+2616
2016-07-08Remove unnecessary and obsolete configure.ac directivesDamjan Marion1-3/+0
2016-07-08VPP-189 Some bugfixes for issues reported by CoverityChris Luke1-8/+37
2016-06-01VPP-83 Allow non-privileged clients to use the vpp binary API.Dave Barach2-7/+23
2016-05-16VPP-57 Add missing license headers in doc filesChris Luke1-0/+16
2016-05-13VPP-57 Add Doxygen to VPPChris Luke1-0/+5
2016-04-26Make automake silent rules defaultDamjan Marion1-1/+1
2016-04-22Add clib_memcpy macro based on DPDK rte_memcpy implementationDamjan Marion1-3/+3
2016-04-18Add support for AArch32Christophe Fontaine2-6/+6
2016-04-12Add a configurable "significant error" metricDave Barach1-2/+2
2016-02-10Replace AC_PROG_LIBTOOL with LT_INITDave Barach1-2/+2
2016-01-22Enable shared-VM namespace supportDave Barach1-2/+0
2015-12-18Fix warnings/errors reported by clangDamjan Marion1-2/+2
2015-12-15Remove autotools generated productsDave Barach10-40069/+0
2015-12-12Handle large user-mode page sizes, tested to 64kDave Barach2-3/+6
2015-12-08Initial commit of vpp code.v1.0.0Ed Warnicke22-0/+43370
_time, end_time; f64 timezone_offset; /* Init time base */ clib_timebase_init (tb, -5 /* EST */ , CLIB_TIMEBASE_DAYLIGHT_USA, &vm->clib_time); /* Set up summer time cache */ now = clib_timebase_now (tb); /* Test it */ now = clib_timebase_now (tb); /* show current time */ fformat (stdout, "Current time in UTC%f, US daylight time rules:\n", tb->timezone_offset / 3600.0); fformat (stdout, "%U", format_clib_timebase_time, now); /* Test conversion to component structure */ clib_timebase_time_to_components (now, cp); now = clib_timebase_components_to_time (cp); fformat (stdout, " -> %U\n", format_clib_timebase_time, now); /* * test a few other dates, to verify summer time operation * 2011: started sunday 3/13, ended sunday 11/6 */ fformat (stdout, "Test daylight time rules:\n"); clib_memset (cp, 0, sizeof (*cp)); /* Just before DST starts */ cp->year = 2011; cp->month = 2; cp->day = 13; cp->hour = 1; cp->minute = 59; cp->second = 59; then = clib_timebase_components_to_time (cp); timezone_offset = clib_timebase_summer_offset_fastpath (tb, then); fformat (stdout, "%U should not be in DST, and it %s\n", format_clib_timebase_time, then, (timezone_offset != 0.0) ? "is" : "is not"); /* add two seconds */ then += 2.0; timezone_offset = clib_timebase_summer_offset_fastpath (tb, then); fformat (stdout, "%U should be in DST, and it %s\n", format_clib_timebase_time, then, (timezone_offset != 0.0) ? "is" : "is not"); /* Just before DST ends */ cp->year = 2011; cp->month = 10; cp->day = 6; cp->hour = 1; cp->minute = 59; cp->second = 59; then = clib_timebase_components_to_time (cp); timezone_offset = clib_timebase_summer_offset_fastpath (tb, then); fformat (stdout, "%U should be in DST, and it %s\n", format_clib_timebase_time, then, (timezone_offset != 0.0) ? "is" : "is not"); /* add two seconds. */ then += 2.0; timezone_offset = clib_timebase_summer_offset_fastpath (tb, then); fformat (stdout, "%U should not be in DST, and it %s\n", format_clib_timebase_time, then, (timezone_offset != 0.0) ? "is" : "is not"); /* Back to the future... */ clib_timebase_time_to_components (now, cp); fformat (stdout, "Test time range calculations:\n"); /* Find previous Sunday midnight */ sunday_midnight = now = clib_timebase_find_sunday_midnight (now); clib_timebase_time_to_components (now, cp); fformat (stdout, "Sunday midnight: %U\n", format_clib_timebase_time, now); test_range_string = "Mon 11 - 17 Tue 7 - 11 Wed - Fri 8 - 18"; unformat_init_string (input2, test_range_string, strlen (test_range_string)); if (unformat (input2, "%U", unformat_clib_timebase_range_vector, &rp)) { vec_foreach (this_rp, rp) { start_time = sunday_midnight + this_rp->start; end_time = sunday_midnight + this_rp->end; fformat (stdout, "range: %U - %U\n", format_clib_timebase_time, start_time, format_clib_timebase_time, end_time); } vec_free (rp); } else { fformat (stdout, "Time convert fail!\n"); return -1; } unformat_free (input2); return 0; } static clib_error_t * test_time_range_command_fn (vlib_main_t * vm, unformat_input_t * input, vlib_cli_command_t * cmd) { int rv; rv = test_time_range_main (input); if (rv) return clib_error_return (0, "test time range FAILED, error %d", rv); return 0; } /* *INDENT-OFF* */ VLIB_CLI_COMMAND (test_time_range_command, static) = { .path = "test time-range", .short_help = "test time-range", .function = test_time_range_command_fn, }; /* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */