|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
From 67d348798cddef1d48f1249c9dfdc0b8d9693371 Mon Sep 17 00:00:00 2001
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
From: Dumitru Ceara <dceara@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Date: Thu, 1 Aug 2019 13:26:20 +0200
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Subject: [PATCH 1/4] ovn-northd: Use HMAP_FOR_EACH when adding multicast
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
lflows
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
There's no need to use HMAP_FOR_EACH_SAFE when we add the logical flows
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
that correspond to IGMP groups as we don't modify the hashmap in the
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
loop.
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Also, we should reinitialize match and actions only if the flow will be
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
added.
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Fixes: ddc64665b678 ("OVN: Add ovn-northd IGMP support")
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Acked-by: Numan Siddique <nusiddiq@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
Signed-off-by: Mark Michelson <mmichels@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
---
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ovn/northd/ovn-northd.c | 10 +++++-----
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
index eea9144d0..d81cfd893 100644
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
--- a/ovn/northd/ovn-northd.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+++ b/ovn/northd/ovn-northd.c
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -5429,12 +5429,9 @@ build_lswitch_flows(struct hmap *datapaths, struct hmap *ports,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
/* Ingress table 17: Add IP multicast flows learnt from IGMP
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
* (priority 90). */
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- struct ovn_igmp_group *igmp_group, *next_igmp_group;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
-
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- HMAP_FOR_EACH_SAFE (igmp_group, next_igmp_group, hmap_node, igmp_groups) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- ds_clear(&match);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
- ds_clear(&actions);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ struct ovn_igmp_group *igmp_group;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ HMAP_FOR_EACH (igmp_group, hmap_node, igmp_groups) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
if (!igmp_group->datapath) {
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
continue;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
@@ -5446,6 +5443,9 @@ build_lswitch_flows(struct hmap *datapaths, struct hmap *ports,
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
}
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
mcast_info->active_flows++;
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ds_clear(&match);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+ ds_clear(&actions);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
+
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ds_put_format(&match, "eth.mcast && ip4 && ip4.dst == %s ",
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
igmp_group->mcgroup.name);
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
ds_put_format(&actions, "outport = \"%s\"; output; ",
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
--
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
2.21.0
|
|
![](https://seccdn.libravatar.org/avatar/679c4857c0e45278b16e700873c39a57c201b7d6565eb3306f15ffa8bcb7b889?s=16&d=retro) |
bbaaef |
|