[ovs-dev] [PATCH v3 00/12] Conntrack debugging appctl/dpctl

Daniele Di Proietto diproiettod at vmware.com
Wed Dec 2 19:46:14 UTC 2015


The goal of this series is to introduce two dpctl command to interact
with the Linux kernel connection tracker.  The same infrastructure
will be used by the userspace connection tracker.

First, it defines some structures and some formatting routines (ct-dpif).

Then, it adds some code to transform the netlink conntrack format
into the OVS specific structure (netlink-conntrack)

Some function pointers are added into dpif-provider to implement conntrack
flushing and dumping.

dpif-netlink implements the new dpif-provider interface using
netlink-conntrack.

New functions are added in ct-dpif to implement dumping and flushing.

The dpctl commands are finally added to the dpctl module, and they're
used by the system testsuite.

Finally, a test module (test-netlink-conntrack) is added to allow the use
of the netlink-conntrack API without a datapath.

v2 -> v3

* Rebased against master: use new hton128(), convert new conntrack system
  tests, convert NAT system tests.
* Addressed Joe's comments: change the dump format to be consistent with
  the rest of OVS, and other minor fixes.

v1 -> v2

* Addressed Joe comments (given offline): some definitions are backported
  in netlink-conntrack to allow compilation on older kernels up to (2.6.32).
* Remove useless includes from netlink-conntrack.c and netlink-conntrack.h:
  this fixed an issue with very recent kernel headers and sparse.
* Changed the verbose format for TCP protocol info.  Now we use spaces instead
  of commas, to be consistent with the rest of the entry formatting code.
* Use dpctl/dump-conntrack in an IPv6 system testcase.

Daniele Di Proietto (12):
  ct-dpif: New module.
  netlink-conntrack: New module.
  ct-dpif: Add ct_dpif_dump_{start,next,done}().
  ct-dpif: Add ct_dpif_flush().
  dpif-netlink: Implement ct_dump_{start,next,done}.
  dpctl: Add 'conntrack-dump' command.
  dpif-netlink: Implement ct_flush.
  dpctl: Add new 'flush-conntrack' command.
  ovstest: Add test-netlink-conntrack command.
  system-traffic: use `dpctl/*conntrack` instead of `conntrack` tool.
  system-traffic: Use 'dpctl/dump-conntrack' for NAT tests.
  system-kmod-macros: Do not require the 'conntrack' tool.

 lib/automake.mk                |   4 +
 lib/ct-dpif.c                  | 407 ++++++++++++++++++++
 lib/ct-dpif.h                  | 189 ++++++++++
 lib/dpctl.c                    |  75 ++++
 lib/dpctl.man                  |  30 ++
 lib/dpif-netdev.c              |   4 +
 lib/dpif-netlink.c             |  66 ++++
 lib/dpif-provider.h            |  29 ++
 lib/netlink-conntrack.c        | 829 +++++++++++++++++++++++++++++++++++++++++
 lib/netlink-conntrack.h        |  51 +++
 tests/atlocal.in               |   7 -
 tests/automake.mk              |   5 +
 tests/system-common-macros.at  |  18 +-
 tests/system-kmod-macros.at    |   5 +-
 tests/system-traffic.at        | 177 ++++-----
 tests/test-netlink-conntrack.c | 177 +++++++++
 16 files changed, 1965 insertions(+), 108 deletions(-)
 create mode 100644 lib/ct-dpif.c
 create mode 100644 lib/ct-dpif.h
 create mode 100644 lib/netlink-conntrack.c
 create mode 100644 lib/netlink-conntrack.h
 create mode 100644 tests/test-netlink-conntrack.c

-- 
2.1.4




More information about the dev mailing list