mbox series

[ovs-dev,RFC,0/5] Add MAC binding aging timestamp refresh mechanism

Message ID 20230615140513.289357-1-amusil@redhat.com
Headers show
Series Add MAC binding aging timestamp refresh mechanism | expand

Message

Ales Musil June 15, 2023, 2:05 p.m. UTC
The timestamp refresh mechanism is based on
separate table. The new thread will collect
flow statistics from this table and based on
"idle_age" data we can decide whether we should
bump the timestamp (MAC binding still in use)
or keep it as is.

The timestamp refresh mechanism works only if
the MAC binding aging is activated, so ovn-controller
doesn't do anything otherwise. To prevent a lot of updates
of timestamp happening concurrently the flow dump
period is set to 3/4 of aging thresholdi, and we do
update only rows which have the timestamp older than
the dump period.

One thing to note, the current implementation keeps in
mind possible enhancement for FDB timestamp refresh in
very similar manner. Once the design is settled I'll
append the FDB to the series.

Another thing to note is that the thread is purposely
made somewhat generic, there is an idea to reuse it for
packet statistics on logical ports. Which should be fairly
easy to do in its current form.

There isn't any test case yet, it will be in the official
patch iteration. It was tested manually for now.

Ales Musil (5):
  actions: Add mac_cache_use action
  northd, controller: Use the MAC cache table
  northd: Synchronize the MAC binding age threshold
  controller: Add MAC cache I-P node
  controller: Update MAC binding timestamp

 controller/automake.mk      |   6 +-
 controller/lflow.c          |  22 ++
 controller/lflow.h          |   1 +
 controller/mac_cache.c      | 320 ++++++++++++++++++++++++++
 controller/mac_cache.h      |  83 +++++++
 controller/ovn-controller.c | 237 ++++++++++++++++++++
 controller/statctrl.c       | 434 ++++++++++++++++++++++++++++++++++++
 controller/statctrl.h       |  28 +++
 include/ovn/actions.h       |   3 +
 lib/actions.c               |  17 ++
 northd/northd.c             |   9 +-
 ovn-sb.xml                  |   8 +
 tests/ovn-northd.at         |   2 +-
 tests/ovn.at                |  29 ++-
 tests/test-ovn.c            |   1 +
 utilities/ovn-trace.c       |   2 +
 16 files changed, 1195 insertions(+), 7 deletions(-)
 create mode 100644 controller/mac_cache.c
 create mode 100644 controller/mac_cache.h
 create mode 100644 controller/statctrl.c
 create mode 100644 controller/statctrl.h