[ovs-dev] [PATCH v2] datapath-windows: Update netlink family IDs

Nithin Raju nithin at vmware.com
Wed Aug 27 03:37:18 UTC 2014

I didn't realize earlier while defining OvsDpInterfaceExt.h that
there are special values defined in netlink-protocol.h for nlmsg_type.
For Eg. NLMSG_ERROR is defined to be 2. In this patch, we update the
values of the family IDs to not clash with the special defines.
I'm using NLMSG_MIN_TYPE as a reference.

All this points to doing family ID lookup from the kernel rather than
returning values from netlink-socket.c. We should move to that model
after we get through the first round of netlink commands.

Signed-off-by: Nithin Raju <nithin at vmware.com>
 datapath-windows/include/OvsDpInterfaceExt.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/datapath-windows/include/OvsDpInterfaceExt.h b/datapath-windows/include/OvsDpInterfaceExt.h
index 46c3b69..73dfcbe 100644
--- a/datapath-windows/include/OvsDpInterfaceExt.h
+++ b/datapath-windows/include/OvsDpInterfaceExt.h
@@ -48,11 +48,11 @@
  * and kernel.
 #define OVS_WIN_NL_INVALID_FAMILY_ID         0
-#define OVS_WIN_NL_CTRL_FAMILY_ID            1
-#define OVS_WIN_NL_PACKET_FAMILY_ID          3
-#define OVS_WIN_NL_VPORT_FAMILY_ID           4
-#define OVS_WIN_NL_FLOW_FAMILY_ID            5
+#define OVS_WIN_NL_CTRL_FAMILY_ID            (NLMSG_MIN_TYPE + 1)
+#define OVS_WIN_NL_VPORT_FAMILY_ID           (NLMSG_MIN_TYPE + 4)
+#define OVS_WIN_NL_FLOW_FAMILY_ID            (NLMSG_MIN_TYPE + 5)
 #define OVS_WIN_NL_INVALID_MCGRP_ID          0
 #define OVS_WIN_NL_MCGRP_START_ID            100

More information about the dev mailing list