summaryrefslogtreecommitdiff
path: root/datapath-windows/include
diff options
context:
space:
mode:
authorSorin Vinturis <svinturis@cloudbasesolutions.com>2015-04-02 19:35:32 +0000
committerBen Pfaff <blp@nicira.com>2015-04-02 12:41:50 -0700
commit190cf5338956c53596f60b20fa7672ba052ee815 (patch)
tree4cbd90605677cf32e82b9eabbabb4e06b44bc9cf /datapath-windows/include
parentb3cceba0b7c4013f46b01f8987e8716d7857c6db (diff)
downloadopenvswitch-190cf5338956c53596f60b20fa7672ba052ee815.tar.gz
datapath-windows: Make GET_PID a separate IOCTL
Added a new IOCTL in order to retrieve the PID from the kernel datapath. The new method uses a direct and cleaner way, as opposed to the old way of using a Netlink transaction, avoiding the unnecessary overhead. Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com> Reported-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Reported-at: https://github.com/openvswitch/ovs-issues/issues/31 Acked-by: Nithin Raju <nithin@vmware.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/include')
-rw-r--r--datapath-windows/include/OvsDpInterfaceExt.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/datapath-windows/include/OvsDpInterfaceExt.h b/datapath-windows/include/OvsDpInterfaceExt.h
index 7e09caf77..e2353767d 100644
--- a/datapath-windows/include/OvsDpInterfaceExt.h
+++ b/datapath-windows/include/OvsDpInterfaceExt.h
@@ -29,22 +29,27 @@
#define OVS_IOCTL_DEVICE_TYPE 45000
-/* We used Direct I/O (zero copy) for the buffers. */
#define OVS_IOCTL_START 0x100
+/* We used Direct I/O (zero copy) for the buffers. */
+/* Non-Netlink-based IOCTLs. */
+#define OVS_IOCTL_GET_PID \
+ CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x0, METHOD_BUFFERED,\
+ FILE_WRITE_ACCESS)
+/* Netlink-based IOCTLs. */
#define OVS_IOCTL_READ \
- CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x0, METHOD_OUT_DIRECT,\
+ CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x1, METHOD_OUT_DIRECT,\
FILE_READ_ACCESS)
#define OVS_IOCTL_READ_EVENT \
- CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x1, METHOD_OUT_DIRECT, \
+ CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x2, METHOD_OUT_DIRECT, \
FILE_READ_ACCESS)
#define OVS_IOCTL_READ_PACKET \
- CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x2, METHOD_OUT_DIRECT, \
+ CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x3, METHOD_OUT_DIRECT, \
FILE_READ_ACCESS)
#define OVS_IOCTL_WRITE \
- CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x3, METHOD_IN_DIRECT,\
+ CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x4, METHOD_IN_DIRECT,\
FILE_READ_ACCESS)
#define OVS_IOCTL_TRANSACT \
- CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x4, METHOD_OUT_DIRECT,\
+ CTL_CODE (OVS_IOCTL_DEVICE_TYPE, OVS_IOCTL_START + 0x5, METHOD_OUT_DIRECT,\
FILE_WRITE_ACCESS)
/*
@@ -75,7 +80,6 @@
/* Commands available under the OVS_WIN_CONTROL_FAMILY. */
enum ovs_win_control_cmd {
- OVS_CTRL_CMD_WIN_GET_PID,
OVS_CTRL_CMD_WIN_PEND_REQ,
OVS_CTRL_CMD_WIN_PEND_PACKET_REQ,
OVS_CTRL_CMD_MC_SUBSCRIBE_REQ,