openvswitch: Build flow cmd netlink reply only if needed.
authorJarno Rajahalme <jrajahalme@nicira.com>
Mon, 5 May 2014 20:13:14 +0000 (13:13 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Thu, 22 May 2014 23:27:34 +0000 (16:27 -0700)
commitfb5d1e9e127ad1542e5db20cd8620a1509baef69
treebb5601cf10a9505cadea342a2b7dfcfce164b1f6
parentbb6f9a708d4067713afae2e9eb2637f6b4c01ecb
openvswitch: Build flow cmd netlink reply only if needed.

Use netlink_has_listeners() and NLM_F_ECHO flag to determine if a
reply is needed or not for OVS_FLOW_CMD_NEW, OVS_FLOW_CMD_SET, or
OVS_FLOW_CMD_DEL.  Currently, OVS userspace does not request a reply
for OVS_FLOW_CMD_NEW, but usually does for OVS_FLOW_CMD_DEL, as stats
may have changed.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
net/openvswitch/datapath.c