summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Netlink
diff options
context:
space:
mode:
authorAlin Serdean <aserdean@cloudbasesolutions.com>2015-09-17 15:01:48 +0000
committerBen Pfaff <blp@nicira.com>2015-09-18 11:36:09 -0700
commitb113e510aad5850e0ca9a217c387a974c9846b70 (patch)
tree6550ef505c25197cde562f8330bad8f296bd5979 /datapath-windows/ovsext/Netlink
parentba4724916d37ffbbc04686cee8892a7dfed2d829 (diff)
downloadopenvswitch-b113e510aad5850e0ca9a217c387a974c9846b70.tar.gz
datapath-windows: Append flow attribute key
Currently when running the vswitch daemon we get a lot of messages of the form: 2015-09-10T23:04:21Z|07255|dpif(revalidator11)|WARN|system@ovs-system: failed to flow_del (Invalid argument). The userspace expects after sending a delete flow command, to receive the flow key of the deleted flow. Currently we only send back the statiscs. This patch appends back the flow key attribute for to the response buffer for the flow commands new, modify and delete. This patch also responds to the userspace with ENOENT in the case the flow was not modified, deleted, created or retrieved. Also incorporate some refactors. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Acked-by: Sairam Venugopal <vsairam@vmware.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Netlink')
-rw-r--r--datapath-windows/ovsext/Netlink/Netlink.c4
-rw-r--r--datapath-windows/ovsext/Netlink/Netlink.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/datapath-windows/ovsext/Netlink/Netlink.c b/datapath-windows/ovsext/Netlink/Netlink.c
index a66fb3833..e2312dab3 100644
--- a/datapath-windows/ovsext/Netlink/Netlink.c
+++ b/datapath-windows/ovsext/Netlink/Netlink.c
@@ -560,7 +560,7 @@ NlMsgEndNested(PNL_BUFFER buf, UINT32 offset)
* Refer nl_msg_put_nested for more details.
* --------------------------------------------------------------------------
*/
-VOID
+BOOLEAN
NlMsgPutNested(PNL_BUFFER buf, UINT16 type,
const PVOID data, UINT32 size)
{
@@ -574,6 +574,8 @@ NlMsgPutNested(PNL_BUFFER buf, UINT16 type,
ASSERT(ret);
NlMsgEndNested(buf, offset);
+
+ return ret;
}
/* Accessing netlink message payload */
diff --git a/datapath-windows/ovsext/Netlink/Netlink.h b/datapath-windows/ovsext/Netlink/Netlink.h
index a520ccf57..d27073731 100644
--- a/datapath-windows/ovsext/Netlink/Netlink.h
+++ b/datapath-windows/ovsext/Netlink/Netlink.h
@@ -203,8 +203,8 @@ BOOLEAN NlMsgPutHeadU64(PNL_BUFFER buf, UINT16 type, UINT64 value);
BOOLEAN NlMsgPutHeadString(PNL_BUFFER buf, UINT16 type, PCHAR value);
UINT32 NlMsgStartNested(PNL_BUFFER buf, UINT16 type);
VOID NlMsgEndNested(PNL_BUFFER buf, UINT32 offset);
-VOID NlMsgPutNested(PNL_BUFFER buf, UINT16 type,
- const PVOID data, UINT32 size);
+BOOLEAN NlMsgPutNested(PNL_BUFFER buf, UINT16 type,
+ const PVOID data, UINT32 size);
/* These variants are convenient for iterating nested attributes. */
#define NL_NESTED_FOR_EACH(ITER, LEFT, A) \