Hi Sai! Please see my comments inline. Besides that it looks good to me.
Thanks, Paul > -----Original Message----- > From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Sairam > Venugopal > Sent: Tuesday, June 21, 2016 4:23 AM > To: dev@openvswitch.org > Subject: [ovs-dev] [PATCH 9/9] datapath-windows: Add support for > Conntrack IPCTNL_MSG_CT_GET cmd in Datapath.c > > This will be used by userspace for dumping conntrack entries - "ovs-dpctl > dump-conntrack". > > Signed-off-by: Sairam Venugopal <vsai...@vmware.com> > --- > datapath-windows/ovsext/Datapath.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/datapath-windows/ovsext/Datapath.c b/datapath- > windows/ovsext/Datapath.c > index 7cc8390..5cc0614 100644 > --- a/datapath-windows/ovsext/Datapath.c > +++ b/datapath-windows/ovsext/Datapath.c > @@ -104,7 +104,8 @@ NetlinkCmdHandler OvsGetNetdevCmdHandler, > OvsPendPacketCmdHandler, > OvsSubscribePacketCmdHandler, > OvsReadPacketCmdHandler, > - OvsCtDeleteCmdHandler; > + OvsCtDeleteCmdHandler, > + OvsCtDumpCmdHandler; > > static NTSTATUS HandleGetDpTransaction(POVS_USER_PARAMS_CONTEXT > usrParamsCtx, > UINT32 *replyLen); > @@ -288,7 +289,13 @@ NETLINK_CMD nlCtFamilyCmdOps[] = { > { .cmd = IPCTNL_MSG_CT_DELETE, > .handler = OvsCtDeleteCmdHandler, > .supportedDevOp = OVS_TRANSACTION_DEV_OP, > - .validateDpIndex = TRUE > + .validateDpIndex = FALSE > + }, > + { .cmd = IPCTNL_MSG_CT_GET, > + .handler = OvsCtDumpCmdHandler, > + .supportedDevOp = OVS_TRANSACTION_DEV_OP | > + OVS_WRITE_DEV_OP | OVS_READ_DEV_OP, > + .validateDpIndex = FALSE > } > }; [Paul Boca] Now you have 2 NETLINK_CMDs, maybe it would be nice to declare a NETLINK_FAMILY which points to nlCtFamilyCmdOps. It is functional but it doesn't mentain the style used here. > > @@ -904,6 +911,7 @@ OvsDeviceControl(PDEVICE_OBJECT deviceObject, > > ASSERT(ovsMsg); > switch (ovsMsg->nlMsg.nlmsgType) { > + case NFNL_TYPE_CT_GET: [Paul Boca] If you declare a new NETLINK_FAMILY then you will have here only one case with OVS_WIN_..._FAMILY_ID > case NFNL_TYPE_CT_DEL: > nlFamilyOps = &nlCtFamilyOps; > break; > -- > 2.5.0.windows.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev