summaryrefslogtreecommitdiff
path: root/tests/test-netlink-conntrack.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Move lib/poll-loop.h to include/openvswitchXiao Liang2017-11-031-1/+1
| | | | | | | | Poll-loop is the core to implement main loop. It should be available in libopenvswitch. Signed-off-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* dpctl: Add new 'ct-bkts' command.Antonio Fischetti2017-08-021-1/+2
| | | | | | | | | | | | | | | | | With the command: ovs-appctl dpctl/ct-bkts shows the number of connections per bucket. By using a threshold: ovs-appctl dpctl/ct-bkts gt=N for each bucket shows the number of connections when they are greater than N. Signed-off-by: Antonio Fischetti <antonio.fischetti@intel.com> Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Co-authored-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Add read-only option to ovs-dpctl and ovs-ofctl commands.Ryan Moats2016-08-151-4/+4
| | | | | | | | | ovs-dpctl and ovs-ofctl lack a read-only option to prevent running of commands that perform read-write operations. Add it and the necessary scaffolding to each. Signed-off-by: Ryan Moats <rmoats@us.ibm.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* test-netlink-conntrack: Fix sparse warning.Daniele Di Proietto2016-08-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | On some systems I get a sparse warning when compiling tests/test-netlink-conntrack.c /usr/include/x86_64-linux-gnu/sys/cdefs.h:307:10: warning: preprocessor token __always_inline redefined /usr/include/linux/stddef.h:4:9: this was the original definition The problem seems to be that Linux upstream commit 283d75737837("uapi/linux/stddef.h: Provide __always_inline to userspace headers") introduced __always_inline in stddef.h, but glibc headers didn't like that until e0835a5354ab("Bug 20215: Always undefine __always_inline before defining it."). This commit works around the issue by including a glibc header before a kernel header. Fixes: 2c06d9a927c5("ovstest: Add test-netlink-conntrack command.") Reported-by: Joe Stringer <joe@ovn.org> Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Joe Stringer <joe@ovn.org>
* netlink-notifier: Support multiple groups.Jarno Rajahalme2016-06-131-12/+19
| | | | | | | | | | | | | | | | | | | | | A netlink notifier ('nln') already supports multiple notifiers. This patch allows each of these notifiers to subscribe to a different multicast group. Sharing a single socket for multiple event types (each on their own multicast group) provides serialization of events when reordering of different event types could be problematic. For example, if a 'create' event and 'delete' event are on different netlink multicast group, we may want to process those events in the order in which kernel issued them, rather than in the order we happen to check for them. Moving the multicast group argument from nln_create() to nln_notifier_create() allows each notifier to specify a different multicast group. The parse callback needs to identify the group the message belonged to by returning the corresponding group number, or 0 when an parse error occurs. Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
* ovstest: Add test-netlink-conntrack command.Daniele Di Proietto2015-12-211-0/+177
Add a new test module to help debug Linux kernel conntrack development unsing the netlink-conntrack module. The tool has three uses: * `ovstest test-netlink-conntrack dump [zone=zone]` shows a list of the connection table * `ovstest test-netlink-conntrack monitor` displays the updates on the connection table, until killed with Ctrl-C * `ovstest test-netlink-conntrack flush [zone=zone]` empties connection (and therefore expectations table). Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Joe Stringer <joe@ovn.org>