diff options
Diffstat (limited to 'datapath-windows')
-rw-r--r-- | datapath-windows/ovsext/Datapath.c | 18 | ||||
-rw-r--r-- | datapath-windows/ovsext/User.c | 18 | ||||
-rw-r--r-- | datapath-windows/ovsext/User.h | 5 |
3 files changed, 36 insertions, 5 deletions
diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c index 6c78ab8a5..9a4827a00 100644 --- a/datapath-windows/ovsext/Datapath.c +++ b/datapath-windows/ovsext/Datapath.c @@ -178,14 +178,22 @@ NETLINK_FAMILY nlDatapathFamilyOps = { }; /* Netlink packet family. */ -/* XXX: Add commands here. */ + +NETLINK_CMD nlPacketFamilyCmdOps[] = { + { .cmd = OVS_PACKET_CMD_EXECUTE, + .handler = OvsNlExecuteCmdHandler, + .supportedDevOp = OVS_TRANSACTION_DEV_OP, + .validateDpIndex = TRUE + } +}; + NETLINK_FAMILY nlPacketFamilyOps = { .name = OVS_PACKET_FAMILY, .id = OVS_WIN_NL_PACKET_FAMILY_ID, .version = OVS_PACKET_VERSION, .maxAttr = OVS_PACKET_ATTR_MAX, - .cmds = NULL, /* XXX: placeholder. */ - .opsCount = 0 + .cmds = nlPacketFamilyCmdOps, + .opsCount = ARRAY_SIZE(nlPacketFamilyCmdOps) }; /* Netlink vport family. */ @@ -785,8 +793,8 @@ OvsDeviceControl(PDEVICE_OBJECT deviceObject, nlFamilyOps = &nlFLowFamilyOps; break; case OVS_WIN_NL_PACKET_FAMILY_ID: - status = STATUS_NOT_IMPLEMENTED; - goto done; + nlFamilyOps = &nlPacketFamilyOps; + break; case OVS_WIN_NL_VPORT_FAMILY_ID: nlFamilyOps = &nlVportFamilyOps; break; diff --git a/datapath-windows/ovsext/User.c b/datapath-windows/ovsext/User.c index e27bd7615..f40846c18 100644 --- a/datapath-windows/ovsext/User.c +++ b/datapath-windows/ovsext/User.c @@ -300,6 +300,24 @@ OvsAllocateNBLForUserBuffer(POVS_SWITCH_CONTEXT switchContext, return nbl; } +/* + *---------------------------------------------------------------------------- + * OvsNlExecuteCmdHandler -- + * Handler for OVS_PACKET_CMD_EXECUTE command. + *---------------------------------------------------------------------------- + */ +NTSTATUS +OvsNlExecuteCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx, + UINT32 *replyLen) +{ + NTSTATUS rc = STATUS_SUCCESS; + + UNREFERENCED_PARAMETER(usrParamsCtx); + UNREFERENCED_PARAMETER(replyLen); + + return rc; +} + NTSTATUS OvsExecuteDpIoctl(PVOID inputBuffer, UINT32 inputLength, diff --git a/datapath-windows/ovsext/User.h b/datapath-windows/ovsext/User.h index e1b1a904e..5e456c74e 100644 --- a/datapath-windows/ovsext/User.h +++ b/datapath-windows/ovsext/User.h @@ -21,6 +21,8 @@ #ifndef __USER_H_ #define __USER_H_ 1 +#include "Datapath.h" + /* * Even we have more cores, I don't think we need * more than 32 queues for processing packets to @@ -109,4 +111,7 @@ NTSTATUS OvsPurgeDpIoctl(PFILE_OBJECT fileObject); NTSTATUS OvsWaitDpIoctl(PIRP irp, PFILE_OBJECT fileObject); +NTSTATUS OvsNlExecuteCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx, + UINT32 *replyLen); + #endif /* __USER_H_ */ |