[ovs-git] [ovn-org/ovn] 2c5e54: controller: Split mac learning code to a separate ...

numansiddique noreply at github.com
Sat Feb 20 09:03:17 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/ovn-org/ovn
  Commit: 2c5e546f34862587e345993d629f5ee12dc1ae6c
      https://github.com/ovn-org/ovn/commit/2c5e546f34862587e345993d629f5ee12dc1ae6c
  Author: Numan Siddique <numans at ovn.org>
  Date:   2021-02-20 (Sat, 20 Feb 2021)

  Changed paths:
    M controller/automake.mk
    A controller/mac-learn.c
    A controller/mac-learn.h
    M controller/pinctrl.c

  Log Message:
  -----------
  controller: Split mac learning code to a separate file.

This patch moves the 'struct put_mac_binding' from controller/pinctrl.c
to controller/mac-learn.c as a 'struct mac_binding' and adds the
relevant functions to access it.

Acked-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 6ec3b12590f9193659d549e30d96b1a22bbb1288
      https://github.com/ovn-org/ovn/commit/6ec3b12590f9193659d549e30d96b1a22bbb1288
  Author: Numan Siddique <numans at ovn.org>
  Date:   2021-02-20 (Sat, 20 Feb 2021)

  Changed paths:
    M controller/mac-learn.c
    M controller/mac-learn.h
    M controller/ovn-controller.c
    M controller/pinctrl.c
    M controller/pinctrl.h
    M include/ovn/actions.h
    M ovn-sb.ovsschema
    M ovn-sb.xml

  Log Message:
  -----------
  MAC learning: Add a new FDB table in southbound db.

This patch
  - Adds a new table 'FDB' in Southbound database.
  - Adds a new pinctrl_handler action - ACTION_OPCODE_PUT_FDB
    which learns the port-to-mac bindings and stores it in the
    'FDB' table. This handler will be used later.
  - Upcoming patch adds necessary OVN actions to learn the port-to-mac
    bindings.

Unlike MAC_Binding Southbound table, FDB table stores the datapath
tunnel key and port key.  This makes it easier for ovn-controller to
program the OF rules and it doesn't need to do any logical port
lookup in the Port_Binding table.

Acked-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: f819ce8fa2a008d3853f39548f1cef5382ea9cdb
      https://github.com/ovn-org/ovn/commit/f819ce8fa2a008d3853f39548f1cef5382ea9cdb
  Author: Numan Siddique <numans at ovn.org>
  Date:   2021-02-20 (Sat, 20 Feb 2021)

  Changed paths:
    M controller/lflow.c
    M controller/lflow.h
    M include/ovn/actions.h
    M include/ovn/logical-fields.h
    M lib/actions.c
    M ovn-sb.xml
    M tests/ovn.at
    M tests/test-ovn.c
    M utilities/ovn-trace.c

  Log Message:
  -----------
  MAC learning: Add new actions - put_fdb, get_fdb and lookup_fdb.

This patch adds these OVN actions to learn port-to-mac bindings on
the logical ports whose port security is disabled and are configured
to accept unknown destination packets.

put_fdb(inport, mac) will add an entry in the Southbound 'FDB'
table.

get_fdb(mac) will get the port key on which the mac is learnt.

lookup_fdb(inport, mac) will check if the port-to-mac entry is already
present or not.  This is added to limit using the action - put_fdb()
only if required.

An upcoming patch in the series will add the necessary logical flows
which makes use of these actions.

Acked-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: 94bab31ac8d2b8092e4d7a4fa73db9dac2f9ff77
      https://github.com/ovn-org/ovn/commit/94bab31ac8d2b8092e4d7a4fa73db9dac2f9ff77
  Author: Numan Siddique <numans at ovn.org>
  Date:   2021-02-20 (Sat, 20 Feb 2021)

  Changed paths:
    M controller/lflow.c
    M controller/lflow.h
    M controller/ovn-controller.c

  Log Message:
  -----------
  controller: MAC learning: Add OF rules for the FDB entries.

This patch adds the OF rules in table 71 and 72 to support
'get_fdb' and 'lookup_fdb' actions.

Acked-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


  Commit: dd94f1266ca4f3c750bc59c474ea342ef3ff9983
      https://github.com/ovn-org/ovn/commit/dd94f1266ca4f3c750bc59c474ea342ef3ff9983
  Author: Numan Siddique <numans at ovn.org>
  Date:   2021-02-20 (Sat, 20 Feb 2021)

  Changed paths:
    M controller/lflow.c
    M controller/lflow.h
    M lib/ovn-util.h
    M northd/ovn-northd.8.xml
    M northd/ovn-northd.c
    M ovn-sb.ovsschema
    M tests/ovn-northd.at
    M tests/ovn.at
    M utilities/ovn-trace.c

  Log Message:
  -----------
  northd: MAC learning: Add logical flows for fdb.

This patch adds the logical flows to do mac learning
for the logical ports whose port security is disabled
with 'unknown' addresses set.

Until now, OVN delivers the unknown destination packets to all
the logical ports with 'unknown' addresses set.  With this
mac learning feature, such flooding of packets is avoided once
OVN has learnt the port-to-mac bindings.

Note that we don't learn macs seen on the localnet logical ports.

Acked-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>


Compare: https://github.com/ovn-org/ovn/compare/6975c649f932...dd94f1266ca4


More information about the git mailing list