From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: pshelar@nicira.com
Cc: davem@davemloft.net, dev@openvswitch.org, netdev@vger.kernel.org,
Samuel Gauthier <samuel.gauthier@6wind.com>,
Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: [PATCH net] openvswitch: restore OVS_FLOW_CMD_NEW notifications
Date: Wed, 17 Sep 2014 18:13:20 +0200 [thread overview]
Message-ID: <1410970400-9797-1-git-send-email-nicolas.dichtel@6wind.com> (raw)
From: Samuel Gauthier <samuel.gauthier@6wind.com>
Since commit fb5d1e9e127a ("openvswitch: Build flow cmd netlink reply only if needed."),
the new flows are not notified to the listeners of OVS_FLOW_MCGROUP.
This commit fixes the problem by checking that there are listeners in
the actual OVS_FLOW_MCGROUP group, instead of 0.
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
net/openvswitch/datapath.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 91d66b7e64ac..8396f6063343 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -79,10 +79,10 @@ static const struct genl_multicast_group ovs_dp_vport_multicast_group = {
/* Check if need to build a reply message.
* OVS userspace sets the NLM_F_ECHO flag if it needs the reply. */
static bool ovs_must_notify(struct genl_info *info,
- const struct genl_multicast_group *grp)
+ unsigned int group)
{
return info->nlhdr->nlmsg_flags & NLM_F_ECHO ||
- netlink_has_listeners(genl_info_net(info)->genl_sock, 0);
+ netlink_has_listeners(genl_info_net(info)->genl_sock, group);
}
static void ovs_notify(struct genl_family *family,
@@ -763,7 +763,7 @@ static struct sk_buff *ovs_flow_cmd_alloc_info(const struct sw_flow_actions *act
{
struct sk_buff *skb;
- if (!always && !ovs_must_notify(info, &ovs_dp_flow_multicast_group))
+ if (!always && !ovs_must_notify(info, dp_flow_genl_family.mcgrp_offset))
return NULL;
skb = genlmsg_new_unicast(ovs_flow_cmd_msg_size(acts), info, GFP_KERNEL);
--
2.1.0
next reply other threads:[~2014-09-17 16:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 16:13 Nicolas Dichtel [this message]
2014-09-17 21:56 ` [PATCH net] openvswitch: restore OVS_FLOW_CMD_NEW notifications Pravin Shelar
2014-09-17 22:04 ` Pravin Shelar
2014-09-18 8:31 ` [PATCH net v2 1/2] genetlink: add function genl_has_listeners() Nicolas Dichtel
2014-09-18 8:31 ` [PATCH net v2 2/2] openvswitch: restore OVS_FLOW_CMD_NEW notifications Nicolas Dichtel
2014-09-18 17:11 ` Pravin Shelar
2014-09-19 21:29 ` David Miller
2014-09-18 17:11 ` [PATCH net v2 1/2] genetlink: add function genl_has_listeners() Pravin Shelar
2014-09-19 21:28 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410970400-9797-1-git-send-email-nicolas.dichtel@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=netdev@vger.kernel.org \
--cc=pshelar@nicira.com \
--cc=samuel.gauthier@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).