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

Nithin Raju nithin at vmware.com
Tue Aug 26 16:15:07 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.
---
 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 24601ed..2c54131 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_DATAPATH_FAMILY_ID        2
-#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_DATAPATH_FAMILY_ID        (NLMSG_MIN_TYPE + 2)
+#define OVS_WIN_NL_PACKET_FAMILY_ID          (NLMSG_MIN_TYPE + 3)
+#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
-- 
1.7.4.1




More information about the dev mailing list