aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/overlay
AgeCommit message (Expand)AuthorFilesLines
2021-06-10FIX: Pylint reducepmikus5-5/+5
2021-06-10Add gtpu sw performance test casesxinfeng zhao1-0/+62
2020-10-19FIX: disable sending IPv6 RA messages from VMsJuraj Linkeš2-5/+5
2020-08-20Fix: Use new-style interface variablesVratko Polak1-4/+4
2020-05-07FIX: SRv6 encapJan Gelety1-1/+2
2020-05-04VPP-DEV API Coverages: SRv6Jan Gelety1-77/+137
2020-04-28CSIT-1597 API cleanup: lispJan Gelety3-503/+79
2020-04-06Improve pf layerPeter Mikus2-49/+269
2019-11-28Python3: resources and librariesJan Gelety6-181/+186
2019-09-19LISP: 3-node (func) to 2-node (dev) converstionNidhy2-1/+154
2019-08-27Delete unused SR keywordsVratko Polak1-58/+0
2019-08-12Clean: Various librariesPeter Mikus3-54/+196
2019-07-29Remove obsolete L2 KWPeter Mikus3-240/+0
2019-07-25VPPD: VXLANPeter Mikus1-91/+0
2019-06-18CSIT-1459: Migrate IP libraries from VAT to PAPIJan Gelety2-92/+91
2019-05-31CSIT-1468: InterfaceUtil migration from VAT to PAPIJan Gelety1-19/+39
2018-04-23CSIT-1009: SRv6 proxy testsJan Gelety1-0/+22
2018-01-17CSIT-675: SRv6 performance testsJan Gelety1-6/+55
2018-01-04CSIT-817: L2 keywords for SRv6Jan Gelety1-0/+213
2017-08-09CSIT-611: HC Test: Lisp suite updates + LispGPEselias3-4/+5
2017-06-29CSIT-687: Directory structure reorganizationTibor Frank6-0/+1087
class="n">tv_sec = 0; req->tv_nsec = 10000 * 1000; /* 10 ms */ while (nanosleep (req, rem) < 0) *req = *rem; if (*pidp) goto found2; } clib_error ("VPP not runnning..."); return 3; found2: old_pid = *pidp; /* * Step 2: sanity check the pid we discovered */ if (verbose) fformat (stdout, "Sanity check current vpp pid %d\n", old_pid); if (kill (old_pid, 0) < 0) { svmdb_unmap (svmdb_client); clib_error ("vpp current pid %d not running...", old_pid); return 2; } if (verbose) fformat (stdout, "Sanity check vpp pid %d OK\n", old_pid); /* * Step 3: figure out the current vpp <--> client shared-VM file * inode number */ if (stat ("/dev/shm/vpe-api", &statb) < 0) { clib_unix_error ("stat fail"); return 4; } old_inode = statb.st_ino; if (verbose) fformat (stdout, "Old inode %u\n", old_inode); /* Note: restart wipes out the shared VM database */ svmdb_unmap (svmdb_client); /* * Step 4: send SIGTERM to vpp. * systemd et al. will restart vpp after wiping out the shared-VM * database and (crucially) the shared API messaging segment */ if (kill (old_pid, SIGTERM) < 0) { clib_unix_error ("SIGTERM fail"); return 3; } sleeps = 0; /* * Step 5: wait up to 15 seconds for a new incarnation of * the shared-VM API segment to appear. */ for (wait = 0; wait < 150; wait++) { if ((stat ("/dev/shm/vpe-api", &statb) < 0) || statb.st_ino == old_inode) { req->tv_sec = 0; req->tv_nsec = 100000 * 1000; /* 100 ms */ while (nanosleep (req, rem) < 0) *req = *rem; sleeps++; } else goto new_inode; } clib_error ("Timeout waiting for new inode to appear..."); return 5; new_inode: if (verbose && sleeps > 0) fformat (stdout, "Inode sleeps %d\n", sleeps); if (verbose) fformat (stdout, "New inode %u\n", statb.st_ino); /* * Step 6: remap the SVM database */ svmdb_client = svmdb_map (ma); pidp = svmdb_local_get_variable_reference (svmdb_client, SVMDB_NAMESPACE_VEC, "vpp_pid"); if (pidp == 0) { clib_error ("post_restart: 'vpp_pid' svm variable not found," "vpp did not restart?"); return 2; } sleeps = 0; /* * Step 7: wait for vpp to publish its new PID */ /* Spin for up to 15 seconds */ for (wait = 0; wait < 150; wait++) { if (*pidp && (*pidp != old_pid)) goto restarted; req->tv_sec = 0; req->tv_nsec = 100000 * 1000; /* 100 ms */ while (nanosleep (req, rem) < 0) *req = *rem; sleeps++; } clib_error ("Timeout waiting for vpp to publish pid after restart..."); return 4; restarted: /* Done... */ if (verbose && sleeps) fformat (stdout, "pid sleeps %d\n", sleeps); if (verbose) fformat (stdout, "New PID %d... Restarted...\n", *pidp); svmdb_unmap (svmdb_client); return 0; } int main (int argc, char **argv) { unformat_input_t i; int ret; clib_mem_init (0, 64ULL << 20); unformat_init_command_line (&i, argv); ret = restart_main_fn (&i); unformat_free (&i); return ret; } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */