[ovs-dev] [PATCH] Do not add ARP replies in the lswitch pipeline to all the lports
Numan Siddique
nusiddiq at redhat.com
Mon Dec 21 14:27:16 UTC 2015
Instead add only if
- the port is up or
- if port type is router
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
---
ovn/northd/ovn-northd.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 270b116..3d4ce78 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -951,6 +951,12 @@ lport_is_enabled(const struct nbrec_logical_port *lport)
}
static bool
+lport_is_up(const struct nbrec_logical_port *lport)
+{
+ return !lport->up || *lport->up;
+}
+
+static bool
has_stateful_acl(struct ovn_datapath *od)
{
for (size_t i = 0; i < od->nbs->n_acls; i++) {
@@ -1152,6 +1158,15 @@ build_lswitch_flows(struct hmap *datapaths, struct hmap *ports,
continue;
}
+ /*
+ * Add ARP reply flows if either the
+ * - port is up or
+ * - port type is router
+ */
+ if (!lport_is_up(op->nbs) && strcmp(op->nbs->type, "router")) {
+ continue;
+ }
+
for (size_t i = 0; i < op->nbs->n_addresses; i++) {
struct eth_addr ea;
ovs_be32 ip;
--
2.5.0
More information about the dev
mailing list