[ovs-git] [openvswitch/ovs] ada0e8: ct-dpif: New module.

GitHub noreply at github.com
Tue Dec 22 02:10:53 UTC 2015


  Branch: refs/heads/branch-2.5
  Home:   https://github.com/openvswitch/ovs
  Commit: ada0e8bfd563e53c0eaa1b0f1bf9dd6e745e73f4
      https://github.com/openvswitch/ovs/commit/ada0e8bfd563e53c0eaa1b0f1bf9dd6e745e73f4
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M lib/automake.mk
    A lib/ct-dpif.c
    A lib/ct-dpif.h

  Log Message:
  -----------
  ct-dpif: New module.

This defines some structures (and their related formatting functions) to
manipulate entries in connection tracking tables.

It will be used by next commits.

Based on original work by Jarno Rajahalme

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: 951b2011d5a9666f81762daf72882c8a4de530f6
      https://github.com/openvswitch/ovs/commit/951b2011d5a9666f81762daf72882c8a4de530f6
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M lib/automake.mk
    A lib/netlink-conntrack.c
    A lib/netlink-conntrack.h

  Log Message:
  -----------
  netlink-conntrack: New module.

This module uses the netlink interface provide by the Linux kernel
connection tracker to provide some visibility into the conntrack tables.

The module provides functions to:

* Convert a netlink representation of a connection into a
  struct 'ct_dpif_entry'.

* Dump all the connections.

* Flush all the connections.

* Listen for updates by registering a netlink notifier.

It will be used by dpif-netlink to implement the interface required by
the ct-dpif module.

Based on original work by Jarno Rajahalme

Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: e0c5380b568b69c8904250874b9183e945267ebe
      https://github.com/openvswitch/ovs/commit/e0c5380b568b69c8904250874b9183e945267ebe
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M lib/ct-dpif.c
    M lib/ct-dpif.h
    M lib/dpif-netdev.c
    M lib/dpif-netlink.c
    M lib/dpif-provider.h

  Log Message:
  -----------
  ct-dpif: Add ct_dpif_dump_{start,next,done}().

These function can be used to dump conntrack entries from a datapath.

They simply call a function pointer in the dpif_class. No dpif currently
implements the interface.

The next commits will provide an implementation in dpif-netlink.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: 767ccfa657c64563ad988b81bf408c07f29a3358
      https://github.com/openvswitch/ovs/commit/767ccfa657c64563ad988b81bf408c07f29a3358
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M lib/ct-dpif.c
    M lib/ct-dpif.h
    M lib/dpif-netdev.c
    M lib/dpif-netlink.c
    M lib/dpif-provider.h

  Log Message:
  -----------
  ct-dpif: Add ct_dpif_flush().

This function will flush the connection tracking tables of a specific
datapath.

It simply calls a function pointer in the dpif_class. No dpif
currently implements the required interface.

The next commits will provide an implementation in dpif-netlink.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: 4dda23ff873e7a74be6902b33fcb6ba0cdb17d80
      https://github.com/openvswitch/ovs/commit/4dda23ff873e7a74be6902b33fcb6ba0cdb17d80
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M lib/dpif-netlink.c

  Log Message:
  -----------
  dpif-netlink: Implement ct_dump_{start,next,done}.

These member functions are used by the ct-dpif module to provide its
services.  They're implemented using the netlink-conntrack module.

N.B. The Linux kernel datapaths share the connection tracker among them
and with the rest of the system.  Therefore the operations are not
really dpif specific.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: b4ff79ce142f2f0af41d48712b9fe262163a336a
      https://github.com/openvswitch/ovs/commit/b4ff79ce142f2f0af41d48712b9fe262163a336a
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M lib/dpctl.c
    M lib/dpctl.man
    M utilities/ovs-dpctl.c

  Log Message:
  -----------
  dpctl: Add 'conntrack-dump' command.

It can be used to inspect the connection tracking entries in the
datapath.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: 299c4c6f6afcc72663767f00f7f7c72184d478fc
      https://github.com/openvswitch/ovs/commit/299c4c6f6afcc72663767f00f7f7c72184d478fc
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M lib/dpif-netlink.c

  Log Message:
  -----------
  dpif-netlink: Implement ct_flush.

This member function is used by the ct-dpif module to provide its
services.  It's implemented using the netlink-conntrack module.

N.B. The Linux kernel datapaths share the connection tracker among them
and with the rest of the system.  Therefore the operations are not
really dpif specific.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: a2753e2b45d221cd8560a0e3b6bbbeef2db84411
      https://github.com/openvswitch/ovs/commit/a2753e2b45d221cd8560a0e3b6bbbeef2db84411
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M lib/dpctl.c
    M lib/dpctl.man
    M utilities/ovs-dpctl.c

  Log Message:
  -----------
  dpctl: Add new 'flush-conntrack' command.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: 26938c7d816a0d88947466d3b6b76a03909d965a
      https://github.com/openvswitch/ovs/commit/26938c7d816a0d88947466d3b6b76a03909d965a
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M tests/automake.mk
    A tests/test-netlink-conntrack.c

  Log Message:
  -----------
  ovstest: Add test-netlink-conntrack command.

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 at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: 4749475c0046352e8b36f258c1e1ee3eb48384be
      https://github.com/openvswitch/ovs/commit/4749475c0046352e8b36f258c1e1ee3eb48384be
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M tests/system-common-macros.at
    M tests/system-traffic.at

  Log Message:
  -----------
  system-traffic: use `dpctl/*conntrack` instead of `conntrack` tool.

Often in the tests we inspect the conntrack tables with the 'conntrack'
command line utility.  Since this may not always be available, and since
these tests are supposed to run with the upcoming userspace connection
tracker, it is better to use the newly implemented dpctl command.

Due to the tcp state mapping done in tcp_state_coalesce(), SYN_RECV is
replaced by ESTABLISHED in four places in the testsuite.  The rest of
the changes are just done to match the formatting style.

Also, check the conntrack entries for the IPv6 HTTP test.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


  Commit: ba3296ee89f476c058c1158c2d6a25c2db997f80
      https://github.com/openvswitch/ovs/commit/ba3296ee89f476c058c1158c2d6a25c2db997f80
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-12-21 (Mon, 21 Dec 2015)

  Changed paths:
    M tests/atlocal.in
    M tests/system-kmod-macros.at

  Log Message:
  -----------
  system-kmod-macros: Do not require the 'conntrack' tool.

We can use 'ovstest test-netlink-conntrack' instead.  Now that it is
not required anymore, we can remove the HAVE_CONNTRACK macro in the
build system.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Joe Stringer <joe at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/2053637d309f...ba3296ee89f4


More information about the git mailing list