summaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp
AgeCommit message (Expand)AuthorFilesLines
2019-09-27igmp: remove api boilerplateOle Troan4-145/+6
2019-09-16api: autogenerate api trace print/endianOle Troan1-0/+4
2019-08-22tests: move plugin tests to src/plugins/*/testDave Wallace2-0/+909
2019-08-20vppapigen: remove support for legacy typedefsPaul Vinciguerra1-1/+1
2019-06-30igmp: accept packets that have more on the wire data than IGMP reports.Neale Ranns1-13/+19
2019-06-28igmp: Trace more data form input packetsNeale Ranns2-7/+16
2019-06-18fib: fib api updatesNeale Ranns2-22/+19
2019-05-16init / exit function orderingDave Barach3-22/+21
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
2019-04-23API: Python and Unix domain socket improvementOle Troan2-7/+3
2019-04-10API: Fix shared memory only action handlers.Ole Troan1-21/+21
2019-03-14IGMP: typo and doc fix (no behaviour change)Neale Ranns2-7/+7
2019-01-20buffers: don't init metadata, as it is already initializedDamjan Marion1-3/+0
2018-12-13make build failure.Paul Vinciguerra1-2/+2
2018-12-06API: Change ip4_address and ip6_address to use type alias.Ole Troan1-2/+2
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach2-8/+8
2018-11-13IGMP: improve CLI debug outputNeale Ranns9-42/+163
2018-11-06IGMP: Improved handling of (*,G) join and leaveNeale Ranns1-20/+74
2018-10-23c11 safe string handling supportDave Barach6-12/+12
2018-10-16IGMP: proxy deviceJakub Grajciar15-12/+749
2018-10-01IGMP: handle (*,G) report with no source addressesNeale Ranns1-8/+14
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra12-17/+17
2018-08-27IGMP: enable command on cliNeale Ranns4-2/+84
2018-08-27cmake: Fix plugins .h includesMohsin Kazmi1-0/+4
2018-08-25cmake: improve add_vpp_plugin macroDamjan Marion1-2/+5
2018-08-17CMake as an alternative to autotools (experimental)Damjan Marion1-0/+29
2018-07-12IGMP: validate the packets length in the DPNeale Ranns3-25/+55
2018-07-10IGMP: coverity found defectsNeale Ranns3-4/+10
2018-07-09IGMP improvementsNeale Ranns27-1734/+3760
2018-06-29igmp: bugfix and minor improvementsJakub Grajciar5-76/+60
2018-06-10IGMP: use simple u32 bit hash keyNeale Ranns3-18/+15
2018-06-08Add reaper functions to want events APIs (VPP-1304)Neale Ranns2-32/+43
2018-05-23VPP-1283: IPv4 PMTU missing MTU value in ICMP4 message.Ole Troan1-1/+1
2018-04-25igmp: disable debug messagesDamjan Marion1-1/+1
2018-04-25igmp: data structure refactoringJakub Grajciar5-350/+820
2018-04-17igmp: fix debug macroJakub Grajciar3-13/+13
2018-03-23IGMP: coverity fixes and remove checks for scapy IGMPv3Neale Ranns2-9/+5
2018-03-21IGMP plugin initialises the FIB/MFIB via ip4 moduleNeale Ranns1-1/+4
2018-03-19IGMP pluginJakub Grajciar12-0/+2720
lass="p">(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_chroot ((char *) chroot_path); 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; }