Re: [ovs-dev] [PATCH] datapath-windows: NUL character should be left out during VPORT hash lookup

2014-09-30 Thread Samuel Ghinet
To: Samuel Ghinet Cc: dev@openvswitch.org Subject: Re: [PATCH] datapath-windows: NUL character should be left out during VPORT hash lookup > From: Samuel Ghinet > Sent: Tuesday, September 30, 2014 6:24 PM > To: Nithin Raju > Subject: RE: [PATCH] datapath-windows: NUL character should

Re: [ovs-dev] [PATCH 14/14] datapath-windows: Fix potential crash in OvsInitConfiguredSwitchNics: virtPort

2014-09-30 Thread Samuel Ghinet
test vxlan tunneling itself (I think this would be impossible at this stage), only that the vports are created and destroyed as they should. Regards, Sam From: Alin Serdean Sent: Tuesday, September 30, 2014 6:23 PM To: Nithin Raju; Samuel Ghin

Re: [ovs-dev] [PATCH] datapath-windows: NUL character should be left out during VPORT hash lookup

2014-09-30 Thread Samuel Ghinet
From: Samuel Ghinet Sent: Tuesday, September 30, 2014 6:24 PM To: Nithin Raju Subject: RE: [PATCH] datapath-windows: NUL character should be left out during VPORT hash lookup The vport names given by the userspace using netlink command vport add are

Re: [ovs-dev] [PATCH v1 08/10] datapath-windows/Flow.c: FLOW_SET command handler.

2014-09-30 Thread Samuel Ghinet
, that is ok as well. Best Regards, Sam From: Ankur Sharma [ankursha...@vmware.com] Sent: Friday, September 26, 2014 7:51 PM To: Samuel Ghinet; dev@openvswitch.org Subject: RE: [ovs-dev] [PATCH v1 08/10] datapath-windows/Flow.c: FLOW_SET command

Re: [ovs-dev] [PATCH v2] datapath-windows Event read handler

2014-09-30 Thread Samuel Ghinet
day, September 26, 2014 7:17 AM To: Samuel Ghinet; dev@openvswitch.org Subject: RE: [ovs-dev] [PATCH v2] datapath-windows Event read handler Thanks Sam for the review. rc stands for Return Code and it holds the Boolean intermediate return code, returned from the NL functions. I removed the blank l

[ovs-dev] [PATCH 10/14] datapath-windows: Add port friendly name to OVS_VPORT_ENTRY

2014-09-30 Thread Samuel Ghinet
The port friendly name will be set by WMI / powershell script. It will be used from within the netlink command vport new to identify the hyper-v switch port it represents. This patch also adds a function to lookup a vport by the port friendly name. Signed-off-by: Samuel Ghinet --- datapath

[ovs-dev] [PATCH 14/14] datapath-windows: Fix potential crash in OvsInitConfiguredSwitchNics: virtPort

2014-09-30 Thread Samuel Ghinet
virtPort was null, later on its fields would try to be accessed. This patch adds a check for virtPort as well, so that the fields of virtPort will not be accessed if virtPort is NULL. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Vport.c | 5 ++--- 1 file changed, 2 insertions(+), 3

[ovs-dev] [PATCH 13/14] datapath-windows: Add netlink command vport set

2014-09-30 Thread Samuel Ghinet
Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Datapath.c | 128 - 1 file changed, 127 insertions(+), 1 deletion(-) diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c index 7897330..c535cd2 100644 --- a/datapath

[ovs-dev] [PATCH 12/14] datapath-windows: Add netlink command vport delete

2014-09-30 Thread Samuel Ghinet
leted - the field hvDeleted was added to OVS_VPORT_ENTRY to specify if the hyper-v switch port side was deleted; if the ovs (datapath) port number is invalid, then it means that the ovs (datapath) side of the port is deleted (or, not created). Signed-off-by: Samuel Ghinet --- datapath-windows/o

[ovs-dev] [PATCH 11/14] datapath-windows: Add netlink command: vport new

2014-09-30 Thread Samuel Ghinet
port type is vxlan, then the vport pointer is also saved to switchContext->vxlanVport. j. Now that the ovs (datapath) port number and the ovs name were set, the vport can be added to the hash array of vports, hashed on ovs name and to the hash array of vports hashed by ovs (datapath) port num

[ovs-dev] [PATCH 09/14] datapath-wuindows: Make VPORT ovs number values smaller than MAXUINT16

2014-09-30 Thread Samuel Ghinet
t into the hash array of port numbers here, nor into the hash array of port names. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Actions.c | 27 -- datapath-windows/ovsext/Switch.c | 28 ++- datapath-windows/ovsext/Switch.h | 18 ++-- datapath-windows/ovsext/Tunnel.c

[ovs-dev] [PATCH 08/14] datapath-windows: Rename switch context's portHashArray and vport's portLink

2014-09-30 Thread Samuel Ghinet
Array. Also, in order to differentiate between portLink and portNoLink, portLink is renamed to portIdLink. In a future patch the vport functionality will be changed to constraint the port numbers to MAXUINT16. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Datapath.c | 4 ++-- datapath-wi

[ovs-dev] [PATCH 07/14] datapath-windows: Rename switch context's nameHashArray and vport's nameLink

2014-09-30 Thread Samuel Ghinet
ble nameHashArray is renamed to ovsPortNameHashArray, while the nameLink is renamed to ovsPortNameLink. This change will make a clearer connection between these and the vport field "ovsName" to which they revolve around. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Switch.c |

[ovs-dev] [PATCH 06/14] datapath-windows: Rename OvsGetVportNo into OvsComputeVportNo and make public

2014-09-30 Thread Samuel Ghinet
falls on the hyper-v switch port handlers side, but on the netlink vport commands side (vport add), we will need to use this compute port number function from outside Vport.c. Therefore, this function declaration is moved from Vport.c to Vport.h, and becomes public. Signed-off-by: Samuel Ghinet

[ovs-dev] [PATCH 05/14] datapath-windows: Define OVS_DPPORT_NUMBER_INVALID

2014-09-30 Thread Samuel Ghinet
changing the value without modifying many parts of the code. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Datapath.c | 2 +- datapath-windows/ovsext/Vport.c| 2 +- datapath-windows/ovsext/Vport.h| 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/datapath

[ovs-dev] [PATCH 04/14] datapath-windows: Update OVS_SWITCH_CONTEXT: external and internal port

2014-09-30 Thread Samuel Ghinet
POVS_VPORT_ENTRY. This patch does not cleanup the code that already uses casts to POVS_VPORT_ENTRY. This cleanup can be done later on as well. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Switch.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/datapath

[ovs-dev] [PATCH 03/14] datapath-windows: We don't need to keep validation ports in ovs

2014-09-30 Thread Samuel Ghinet
: Samuel Ghinet --- datapath-windows/ovsext/Oid.c | 4 datapath-windows/ovsext/Vport.c | 8 +--- datapath-windows/ovsext/Vport.h | 1 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/datapath-windows/ovsext/Oid.c b/datapath-windows/ovsext/Oid.c index 39e47c2..f67bf11 100644

[ovs-dev] [PATCH 02/14] datapath-windows: Rename hyper-v switch port and nic handlers

2014-09-30 Thread Samuel Ghinet
are nic or port handlers. This will make more clear the usages from netlink vport commands side and from hyper-v switch side. It will also make more obvious which nic and port functions are helper functions. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Oid.c | 24 -

[ovs-dev] [PATCH 01/14] datapath-windows: Remove the old IOCTL vport functions.

2014-09-30 Thread Samuel Ghinet
The old IOCTL vport functions (using the non-netlink device) are no longer needed. They should be removed. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Vport.c | 403 datapath-windows/ovsext/Vport.h | 15 -- 2 files changed, 418 deletions

[ovs-dev] [PATCH 00/14] datapath-windows: Implement the rest of the netlink vport commands

2014-09-30 Thread Samuel Ghinet
Hello guys, This patch number 00 is an introduction to the patch series. I am sorry we could not provide the design behind this much faster. This series of patches is based on that design. I have tested these vport commands with both VMs and vxlan, with both VMs connecting and reconnecting and

Re: [ovs-dev] [PATCH 2/3] datapath-windows: Add Netlink vport command get

2014-09-25 Thread Samuel Ghinet
__ From: Nithin Raju [nit...@vmware.com] Sent: Thursday, September 25, 2014 9:51 PM To: Samuel Ghinet Cc: dev@openvswitch.org; Alin Serdean; Eitan Eliahu; Ankur Sharma; Saurabh Shah Subject: Re: [PATCH 2/3] datapath-windows: Add Netlink vport command get hi Samuel,

Re: [ovs-dev] [PATCH 2/3] datapath-windows: Add Netlink vport command get

2014-09-25 Thread Samuel Ghinet
this the way it was. Regards, Sam From: Eitan Eliahu [elia...@vmware.com] Sent: Wednesday, September 24, 2014 8:00 PM To: Samuel Ghinet; dev@openvswitch.org Cc: Alin Serdean; Nithin Raju; Ankur Sharma; Saurabh Shah Subject: RE: [PATCH 2/3] datapath-windows: Add Ne

[ovs-dev] [PATCH v2 4/4] Add Netlink vport command get

2014-09-25 Thread Samuel Ghinet
The transactional get vport command. This command uses the netlink transactional errors. Signed-off-by: Samuel Ghinet Acked-by: Nithin Raju --- datapath-windows/ovsext/Datapath.c | 83 +- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/datapath

[ovs-dev] [PATCH v4 3/4] Add file: NetlinkError.h

2014-09-25 Thread Samuel Ghinet
rror codes correspond to the userspace error codes defined in: "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\errno.h" Signed-off-by: Samuel Ghinet Acked-by: Eitan Eliahu Acked-by: Alin Gabriel Serdean --- datapath-windows/automake.mk | 1 + datapath-windo

[ovs-dev] [PATCH v4 2/4] Netlink command: vport dump

2014-09-25 Thread Samuel Ghinet
the vxlan destination udp port is currently a constant. When it will become configurable, the vport options netlink attribute will become relevant. Signed-off-by: Samuel Ghinet Acked-by: Alin Gabriel Serdean Acked-by: Nithin Raju --- datapath-windows/ovsext/Datapa

[ovs-dev] [PATCH v3 1/4] datapath-windows: fix OVS_VPORT_TYPE

2014-09-25 Thread Samuel Ghinet
_TYPE" and changes the afferent kernel driver code: o) vport types synthetic and emulated turn to: netdev o) vport type internal turns to: internal o) vport type external truns to: netdev (plus, we hold a field in vport, "isExternal" Signed-off-by: Samuel Ghinet Acked-by: Nithin Raju -

Re: [ovs-dev] [PATCH v1 09/10] datapath-windows/Flow.c: FLOW_DEL command handler.

2014-09-25 Thread Samuel Ghinet
Hey Ankur, A problem I see here with flow delete is that Flow delete requires: - no attributes (i.e. no "key"): if flow flush is requested - key only: if a specific flow key is to be deleted. When / if masks will be allowed for flows, the mask is expected not to exist. How does the current code

Re: [ovs-dev] [PATCH v1 04/10] datapath-windows/Netlink: Allow support for NESTED Attributes in NlAttrValidate

2014-09-25 Thread Samuel Ghinet
In the future it might be useful if we could do recursive validation checks in NlAttrValidate when we have nested attributes. Because I am not sure we can currently validate the netlink attributes nested in parent netlink attributes, using functions like NlAttrValidate. Acked-by: Samuel Ghinet

Re: [ovs-dev] [PATCH v2] datapath-windows Event read handler

2014-09-25 Thread Samuel Ghinet
I now see this new version. The while has been removed I see, along with the issues I had pointed out with the values returned. I will write my comments here, of the things that still remained :) > } > > + > /* > * -- >

Re: [ovs-dev] [PATCH] datapath-windows Event read handler

2014-09-25 Thread Samuel Ghinet
Event.h index f4801b9..a43a0bb 100644 --- a/datapath-windows/ovsext/Event.h +++ b/datapath-windows/ovsext/Event.h @@ -47,4 +47,6 @@ NTSTATUS OvsPollEventIoctl(PFILE_OBJECT fileObject, PVOID inputBuffer, UINT32 outputLength, UINT32 *replyLen); NTSTATUS OvsWaitEventIoctl(PIRP

Re: [ovs-dev] [PATCH v1 10/10] datapath-windows/Flow.c: DEL_FLOWS command handler.

2014-09-25 Thread Samuel Ghinet
Oh, now I see, flow flush is handled :) Date: Wed, 24 Sep 2014 00:15:44 -0700 From: Ankur Sharma To: dev@openvswitch.org Subject: [ovs-dev] [PATCH v1 10/10] datapath-windows/Flow.c: DEL_FLOWS command handler. Message-ID: <1411542944-19374-1

Re: [ovs-dev] [PATCH v1 08/10] datapath-windows/Flow.c: FLOW_SET command handler.

2014-09-25 Thread Samuel Ghinet
Hey Ankur, There are a few differences between flow new and flow set, with regard to the transactional errors that will need to be implemented: Flow New: can do NEW or SET. If netlink command flow new is issued, with netlink flags "create" and "exclusive", and the flow exists, it must return EE

Re: [ovs-dev] [PATCH v1 07/10] datapath-windows/Flow.c: FLOW_NEW command handler.

2014-09-25 Thread Samuel Ghinet
Hey Ankur, > +if (keyAttrs[OVS_KEY_ATTR_TUNNEL]) { > +destKey->tunKey.tunnelId = NlAttrGetU64 > + (tunAttrs[OVS_TUNNEL_KEY_ATTR_ID]); > +destKey->tunKey.dst = NlAttrGetU32 > + (tunAttrs[OVS_TUNNEL_KEY_ATTR_IPV4_DST]

Re: [ovs-dev] [PATCH v1 06/10] datapath-windows/Flow.c : Basic support for add-flow.

2014-09-25 Thread Samuel Ghinet
Hey Ankur, A few notes: > +NETLINK_CMD nlFlowFamilyCmdOps[] = { > +{ .cmd = OVS_FLOW_CMD_NEW, > + .handler = OvsFlowNlNewCmdHandler, > + .supportedDevOp = OVS_TRANSACTION_DEV_OP, > + .validateDpIndex = FALSE > +} > +}; It is possible that we need to

Re: [ovs-dev] [PATCH v1 05/10] datapath-windows/Netlink: Fixed NlAttrParseNested

2014-09-25 Thread Samuel Ghinet
st netlink attribute, and not validate the message itself. It is possible such changes would make code clearer a bit. However, there is existing code that relies on the current format of NlAttrParse, so perhaps on a new patch. Acked-by: Samuel Ghinet Da

Re: [ovs-dev] [PATCH v1 03/10] datapath-windows/Netlink: Added NlAttrLen API

2014-09-25 Thread Samuel Ghinet
One very minor thing: I believe the titles of the commit messages are normally put like "Add NlAttrLen API", not "Added NlAttrLen API". Acked-by: Samuel Ghinet Date: Wed, 24 Sep 2014 00:15:37 -0700 From: Ankur Sharma To: dev@ope

Re: [ovs-dev] [PATCH v1 02/10] datapath-windows/Netlink: Add NlFillOvsMsg API for creating Netlink message headers.

2014-09-25 Thread Samuel Ghinet
you may wish to make some use of my functions as well. Either way it's fine by me. Acked-by: Samuel Ghinet Date: Wed, 24 Sep 2014 00:15:36 -0700 From: Ankur Sharma To: dev@openvswitch.org Subject: [ovs-dev] [PATCH v1 02/10] datapath-windows/Netlink

Re: [ovs-dev] [PATCH v1 01/10] datapath-windows: move OVS_MESSAGE to Netlink.h

2014-09-25 Thread Samuel Ghinet
Acked-by: Samuel Ghinet Date: Wed, 24 Sep 2014 00:15:35 -0700 From: Ankur Sharma To: dev@openvswitch.org Subject: [ovs-dev] [PATCH v1 01/10] datapath-windows: move OVS_MESSAGE to Netlink.h Message-ID: <1411542944-19374-1-git-send-em

[ovs-dev] [PATCH v3] Handle NBLs with multiple NBs

2014-09-24 Thread Samuel Ghinet
NBLs be linked together correctly. Tested: - vxlan - vlan (using patch ports, as specified in INSTALL.Windows) using: - ping - tcp - tcp LSO (tcp segmentation) Reported-at: ovs/ovs-issues#2 Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Actions.c| 41 +++- datapath-windows/o

Re: [ovs-dev] [PATCH v2] Handle NBLs with multiple NBs

2014-09-24 Thread Samuel Ghinet
eated by OvsSplitNblByNB(), but not being > freed using OvsCompleteNBL(). Oops, yes, that slipped me. I fixed it: if OvsSplitNblByNB fails => curNbl = origNbl, so completion can happen. Also, on the Cleanup section, I had put each NBL in the NBL link (newNbl) in the completion list. I

[ovs-dev] [PATCH 3/3] datapath-windows: Make VPORT ovs number values smaller than MAXUINT16

2014-09-24 Thread Samuel Ghinet
portLink of OVS_VPORT_ENTRY is renamed by portIdLink, so as to distinguish it from the new portNoLink. Signed-off-by: Samuel Ghinet --- datapath-windows/include/OvsPub.h | 2 - datapath-windows/ovsext/Actions.c | 27 +++-- datapath-windows/ovsext/Datapath.c | 6 +- datapath-windows/ovsext/Oid.c

[ovs-dev] [PATCH 2/3] datapath-windows: Add Netlink vport command get

2014-09-24 Thread Samuel Ghinet
The transactional get vport command. This command uses the netlink transactional errors. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Datapath.c | 83 ++ 1 file changed, 83 insertions(+) diff --git a/datapath-windows/ovsext/Datapath.c b/datapath

[ovs-dev] [PATCH 1/3] datapath-windows: Add file NetlinkError.h

2014-09-24 Thread Samuel Ghinet
be used by most or all netlink transactional operations. Signed-off-by: Samuel Ghinet --- datapath-windows/automake.mk | 1 + datapath-windows/ovsext/Datapath.c | 10 ++ datapath-windows/ovsext/Datapath.h | 10 +- datapath-windows/ovsex

[ovs-dev] [PATCH v3] datapath-windows: Netlink command: vport dump

2014-09-24 Thread Samuel Ghinet
the vxlan destination udp port is currently a constant. When it will become configurable, the vport options netlink attribute will become relevant. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Datapath.c | 273 - datapath-windows/ovsext/Vport.h|

Re: [ovs-dev] [PATCH v2] datapath-windows: Netlink command: vport dump

2014-09-23 Thread Samuel Ghinet
Oh, I've sent reply with explanations before reading this reply of yours. Anyway, I wrote explanations there for other things as well. Regards, Sam From: Nithin Raju [nit...@vmware.com] Sent: Friday, September 19, 2014 7:43 PM To: Samuel Ghinet Cc

Re: [ovs-dev] [PATCH v2] datapath-windows: Netlink command: vport dump

2014-09-23 Thread Samuel Ghinet
ed: time ago we discussed that the index(es) will be managed by the userspace. The current method (having dump state preserved in the "instance" object in the kernel) makes the dump state be handled by the kernel only, instead. Should we change our methods back to the original design, or you t

[ovs-dev] [PATCH v2] Handle NBLs with multiple NBs

2014-09-23 Thread Samuel Ghinet
ectly. Tested: - vxlan - vlan (using patch ports, as specified in INSTALL.Windows) using: - ping - tcp - tcp LSO (tcp segmentation) Reported-at: ovs/ovs-issues#15 Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Actions.c| 20 +- datapath-windows/ovsext/BufferMgmt.c

[ovs-dev] [PATCH v2] datapath-windows: fix OVS_VPORT_TYPE

2014-09-23 Thread Samuel Ghinet
_TYPE" and changes the afferent kernel driver code: o) vport types synthetic and emulated turn to: netdev o) vport type internal turns to: internal o) vport type external truns to: netdev (plus, we hold a field in vport, "isExternal" Signed-off-by: Samuel Ghinet --- data

Re: [ovs-dev] [PATCH] datapath-windows: Handle NBLs with multiple NBs

2014-09-19 Thread Samuel Ghinet
ve worked a bit more on the netlink vport commands :) Thanks, Sam From: Nithin Raju [nit...@vmware.com] Sent: Friday, September 19, 2014 3:00 AM To: Samuel Ghinet Cc: dev@openvswitch.org; Alin Serdean; Saurabh Shah; Eitan Eliahu; Ankur Sharma Subject: Re: [

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-18 Thread Samuel Ghinet
From: Eitan Eliahu [elia...@vmware.com] Sent: Thursday, September 18, 2014 2:35 PM To: Samuel Ghinet; Nithin Raju Cc: dev@openvswitch.org Subject: RE: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup No Sam, Duplication of handles is done

Re: [ovs-dev] [PATCH] datapath-windows: NetLink kernel side, Event subscription and notification

2014-09-18 Thread Samuel Ghinet
Looks good to me! Acked-by: Samuel Ghinet Date: Wed, 17 Sep 2014 23:12:05 -0700 From: Eitan Eliahu To: dev@openvswitch.org Subject: [ovs-dev] [PATCH] datapath-windows: NetLink kernel side, Event subscription and notification Message-ID

Re: [ovs-dev] [PATCH 5/5 v1] datapath-windows: add OVS_DP_CMD_SET and OVS_DP_CMD_GET transaction support

2014-09-18 Thread Samuel Ghinet
Hey Nithin, I think this could work refactored a bit (such as to better separate commands), but we should postpone refactor for a later time. Acked-by: Samuel Ghinet Date: Tue, 16 Sep 2014 19:06:11 -0700 From: Nithin Raju To: dev@openvswitch.org, sghi

Re: [ovs-dev] [PATCH 4/5 v1] extract-odp-netlink-windows-dp-h: add definition of IFNAMSIZ

2014-09-18 Thread Samuel Ghinet
Acked-by: Samuel Ghinet Date: Tue, 16 Sep 2014 19:06:10 -0700 From: Nithin Raju To: dev@openvswitch.org, sghi...@cloudbasesolutions.com, elia...@vmware.com, ankursha...@vmware.com Subject: [ovs-dev] [PATCH 4/5 v1] extract-odp-netlink-windows-dp-h

Re: [ovs-dev] [PATCH 1/5 v1] datapath-windows: return TRUE on success in NlAttrValidate

2014-09-18 Thread Samuel Ghinet
clarity a bit on the ways "ret" is used and changed. Anyway, it's good the way it is in NlAttrValidate as well. Acked-by: Samuel Ghinet Sam Date: Tue, 16 Sep 2014 19:06:07 -0700 From: Nithin Raju To: dev@openvswitch.org, sghi...@cloudba

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-18 Thread Samuel Ghinet
e? Thanks, Sam, From: Eitan Eliahu [elia...@vmware.com] Sent: Thursday, September 18, 2014 2:16 PM To: Samuel Ghinet; Nithin Raju Cc: dev@openvswitch.org Subject: RE: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup Hi Sam, A

Re: [ovs-dev] [PATCH v2] datapath-windows: Netlink command: vport dump

2014-09-18 Thread Samuel Ghinet
I meant to send it to ML. From: Samuel Ghinet Sent: Wednesday, September 17, 2014 7:46 PM To: Eitan Eliahu Subject: RE: [PATCH v2] datapath-windows: Netlink command: vport dump Hi Eitan, Yes, you're right, I forgot to check the return values fro

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-18 Thread Samuel Ghinet
ure this is a real case? Thanks, Sam From: Eitan Eliahu [elia...@vmware.com] Sent: Monday, September 15, 2014 6:50 PM To: Samuel Ghinet; Nithin Raju Cc: dev@openvswitch.org Subject: RE: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanu

Re: [ovs-dev] [PATCH 3/5 v1] lib/netlink-socket.c: add support for nl_transact() on Windows

2014-09-17 Thread Samuel Ghinet
Oh, except a little typo in the commit message: "Eg. the Windows kernel does not send embed an error" Sam ____ From: Samuel Ghinet Sent: Wednesday, September 17, 2014 4:34 PM To: Nithin Raju; dev@openvswitch.org; elia...@vmware.com; ankursha...@

Re: [ovs-dev] [PATCH 3/5 v1] lib/netlink-socket.c: add support for nl_transact() on Windows

2014-09-17 Thread Samuel Ghinet
Hello Nithin, This patch looks good! Acked-by: Samuel Ghinet From: Nithin Raju [nit...@vmware.com] Sent: Wednesday, September 17, 2014 5:06 AM To: dev@openvswitch.org; Samuel Ghinet; elia...@vmware.com; ankursha...@vmware.com Cc: Nithin Raju Subject

Re: [ovs-dev] [PATCH 2/5 v1] datapath-windows: add OvsComareString() to compare strings

2014-09-17 Thread Samuel Ghinet
Nithin, I don't think there's a need to implement such a function. You can use memcmp, which behaves quite like strncmp. Regards, Sam From: Nithin Raju [nit...@vmware.com] Sent: Wednesday, September 17, 2014 5:06 AM To: dev@openvswitch.org; Sam

[ovs-dev] [PATCH v2] datapath-windows: Netlink command: vport dump

2014-09-17 Thread Samuel Ghinet
the vxlan destination udp port is currently a constant. When it will become configurable, the vport options netlink attribute will become relevant. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Datapath.c | 222 - datapath-windows/ovsext/Vport.h|

[ovs-dev] [PATCH] datapath-windows: fix OVS_VPORT_TYPE

2014-09-17 Thread Samuel Ghinet
r the ovs-dpctl show and vswitchd vport commands to work properly. Signed-off-by: Samuel Ghinet --- datapath-windows/include/OvsDpInterfaceExt.h | 2 + datapath-windows/include/OvsPub.h| 25 ++--- datapath-windows/ovsext/Actions.c| 6 +-- datapath-windows/ovsext/Tunne

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-15 Thread Samuel Ghinet
le HANDLE / FILE_OBJECT are for the same device. So technically it should be impossible that two processes share a HANDLE. Sam From: Eitan Eliahu [elia...@vmware.com] Sent: Monday, September 15, 2014 6:50 PM To: Samuel Ghinet; Nithin Raju Cc: dev@openvswitch.o

Re: [ovs-dev] [PATCH] datapath-windows: Handle NBLs with multiple NBs

2014-09-15 Thread Samuel Ghinet
Eitan: yes, I agree. That's why we need to keep the atDispatch variable (in the patch, which holds the result of the flag check). From: Eitan Eliahu [elia...@vmware.com] Sent: Monday, September 15, 2014 7:06 PM To: Samuel Ghinet; Nithin Raju Cc

Re: [ovs-dev] [PATCH] datapath-windows: Handle NBLs with multiple NBs

2014-09-14 Thread Samuel Ghinet
ptimization is to call OvsQueuePackets() only if countMissedPackets > > 0. Also, the line is longer than 79 characters. You can reduce the length > if possible. Hmm, perhaps it would be better to put the check inside OvsQueuePackets: this would make the code clearer if other callers would like this optimizations. Th

Re: [ovs-dev] [PATCH 2/2] datapath-windows: use the Netlink set API and need new APIs

2014-09-14 Thread Samuel Ghinet
Hello Nithin, Overall, it looks ok. Very minor things, though: (OvsDpFillInfo) o) could you please rename nlWrite into something more boolean-like, like "ok" or whatever you prefer? When I first read that piece of code, I was thinking nlWrite is a ptr returned by NlMsgPutHead. It confused me fo

Re: [ovs-dev] [PATCH 1/2] datapath-windows: fix bug in NlBufCopyAtTailUninit

2014-09-14 Thread Samuel Ghinet
At first on reading this code, I was wondering "why?" Now I think I understand: the function zeroes memory, and must return the ptr to 'next' item to be filled (which is called "tail"). Am I correct? Also, I think it would be nice if you could rename NlBufCopyAtTailUninit -> NlBufZeroAtTailUnini

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-14 Thread Samuel Ghinet
From: Eitan Eliahu [elia...@vmware.com] Sent: Saturday, September 13, 2014 12:01 AM To: Nithin Raju Cc: Samuel Ghinet; dev@openvswitch.org Subject: RE: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup My understating is the Cleanup callback is called when the file

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-14 Thread Samuel Ghinet
te is empty, instead? Thanks, Sam From: Nithin Raju [nit...@vmware.com] Sent: Thursday, September 11, 2014 4:41 AM To: Samuel Ghinet Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup O

Re: [ovs-dev] datapath-windows: adding vport from userspace to kernel

2014-09-14 Thread Samuel Ghinet
happen (I assume this is the expected behavior). Sam From: Nithin Raju [nit...@vmware.com] Sent: Thursday, September 11, 2014 4:31 AM To: Samuel Ghinet; Alin Serdean Cc: dev@openvswitch.org Subject: datapath-windows: adding vport from userspace to kernel hi

Re: [ovs-dev] [PATCH v2 2/2] datapath-windows/Netlink: Nested attributes put/parse.

2014-09-10 Thread Samuel Ghinet
Hi Ankur, > +VOID > +NlMsgPutNested(PNL_BUFFER buf, UINT16 type, > + const PVOID data, UINT32 size) > +{ > +UINT32 offset = NlMsgStartNested(buf, type); > + > +UNREFERENCED_PARAMETER(data); > +UNREFERENCED_PARAMETER(size); > + > +ASSERT(offset); > + > +ASSERT(NlMs

Re: [ovs-dev] [PATCH v2 1/2] datapath-windows/NetlinkBuf.h: Added NlBufSize

2014-09-10 Thread Samuel Ghinet
Acked-by Samuel Ghinet Date: Wed, 10 Sep 2014 16:20:16 -0700 From: Ankur Sharma To: dev@openvswitch.org Subject: [ovs-dev] [PATCH v2 1/2] datapath-windows/NetlinkBuf.h: Added NlBufSize Message-ID: <1410391216-2019-1-git-send-email-ankur

Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during instance cleanup

2014-09-10 Thread Samuel Ghinet
Hey Nithin, AFAIK OvsCleanupOpenInstance is called by OvsCleanupDevice, which is a callback called by NDIS when an IO is pending and the file must be closed. FreeUserDumpState is only for dump operations. Is it possible that an IO to be pending (packet queueing) while at the same time a dump op

Re: [ovs-dev] [PATCH v1] Netlink_socket.c Join/Unjoin an MC group for event subscription

2014-09-10 Thread Samuel Ghinet
Eitan, A few notes: o) regarding the call: > error = nl_sock_send__(sock, &request, 0, true); (parameter 3 is sequence) I found doc comment in nl_sock_allocate_seq, saying: > /* Make it impossible for the next request for sequence numbers to wrap > * around to 0. Start over with 1 to avoid ever

[ovs-dev] [PATCH] datapath-windows: Handle NBLs with multiple NBs

2014-09-09 Thread Samuel Ghinet
ectly. Tested: - vxlan - vlan (using patch ports, as specified in INSTALL.Windows) using: - ping - tcp - tcp LSO (tcp segmentation) Reported-at: ovs/ovs-issues#15 Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Actions.c| 36 +++- datapath-windows/ovsext/BufferMgmt.c

Re: [ovs-dev] OVS-on-HyperV: Agenda for IRC meeting on 9/10

2014-09-09 Thread Samuel Ghinet
There would be one issue from me: there was an email - reply to a vport patch time ago, where hyper-v switch ports were separated from ovs / datapath ports. The discussion had remained pending, but it might be important if we plan netlink commands vport new and vport delete for the near future.

Re: [ovs-dev] [PATCH v2] datapath-windows: update CodingStyle guideline for variable names

2014-09-09 Thread Samuel Ghinet
Acked-by: Samuel Ghinet From: Alin Serdean Sent: Tuesday, September 09, 2014 8:43 PM To: Nithin Raju; dev@openvswitch.org; Samuel Ghinet Subject: RE: [ovs-dev] [PATCH v2] datapath-windows: update CodingStyle guidelinefor variable names Acked-by

Re: [ovs-dev] [PATCH] Create a NBL for each NB when required

2014-09-09 Thread Samuel Ghinet
e to point > it out. We'll fix it. So, technically, in the NDIS Send callback, I should call at every exit point OvsCompleteNBL() only to decrease the reference counter by one, instead of decreasing it in the very beginning and not worry about any missed exit point. As for OvsTunnelPortTx,

Re: [ovs-dev] [PATCH v2] Create a NBL for each NB when required

2014-09-08 Thread Samuel Ghinet
I have tested: - vxlan - vlan (using patch ports, as specified in INSTALL.Windows) using: - ping - tcp - tcp LSO (tcp segmentation) I have put both the "each NB -> NBL" and its refactor in the same patch. Thanks, Sam ____ From: Samuel Ghinet

[ovs-dev] [PATCH v2] Create a NBL for each NB when required

2014-09-08 Thread Samuel Ghinet
s, if the original NBL had more NBs. Signed-off-by: Samuel Ghinet Co-authored-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Actions.c | 60 +- datapath-windows/ovsext/BufferMgmt.c | 78 +--- datapath-windows/ovsext/BufferMgmt.h | 19 ++ datapath-windows/ovsext/Check

[ovs-dev] [PATCH] datapath-windows: Netlink command: vport dump

2014-09-08 Thread Samuel Ghinet
ttribute will become relevant. Signed-off-by: Samuel Ghinet --- datapath-windows/ovsext/Datapath.c | 249 - datapath-windows/ovsext/Vport.h| 11 +- 2 files changed, 254 insertions(+), 6 deletions(-) diff --git a/datapath-windows/ovsext/Datapath.c b/dat

Re: [ovs-dev] [PATCH v2 2/6] NetlinkBuf.c: Netlink buffer mgmt apis.

2014-09-08 Thread Samuel Ghinet
Thanks a lot Ankur, Sam From: Ankur Sharma [ankursha...@vmware.com] Sent: Sunday, September 07, 2014 8:20 PM To: Samuel Ghinet; dev@openvswitch.org Cc: Alin Serdean; Eitan Eliahu; Nithin Raju; Saurabh Shah Subject: RE: [ovs-dev] [PATCH v2 2/6] NetlinkBuf.c

Re: [ovs-dev] [PATCH v2 2/6] NetlinkBuf.c: Netlink buffer mgmt apis.

2014-09-06 Thread Samuel Ghinet
Hello Ankur, I've got one questions about the buffer management and netlink put functions: Do we have here some netlink put functions to use for nested netlink attributes? Thanks, Samuel Date: Thu, 4 Sep 2014 09:44:45 -0700 From: Ben Pfaff To: Ankur Sha

Re: [ovs-dev] [PATCH 9/9 v3] datapath-windows: refactor code to setup dump start state

2014-09-06 Thread Samuel Ghinet
Acked-by: Samuel Ghinet From: Samuel Ghinet Sent: Sunday, September 07, 2014 2:54 AM To: dev@openvswitch.org Cc: Alin Serdean; nit...@vmware.com; ssaur...@vmware.com; Ankur Sharma Subject: [PATCH 9/9 v3] datapath-windows: refactor code to setup

[ovs-dev] [PATCH] Windows NetLink Socket - Support for asynchronous event notification

2014-09-06 Thread Samuel Ghinet
Looks good, as far as I can tell. One minor style thing though: > +goto done; > +} > +} > +else { > +/* The I/O was completed synchronously */ > +poll_immediate_wake(); > +} I think it should have been: > } else { Regards, Sam _

Re: [ovs-dev] [PATCH 9/9 v2] datapath-windows: refactor code to setup dump start state

2014-09-06 Thread Samuel Ghinet
is added, such a thing can go very well with "review comment in another patch" aforementioned. Regards, Sam From: Ankur Sharma [ankursha...@vmware.com] Sent: Saturday, August 30, 2014 2:04 AM To: Ben Pfaff Cc: Eitan Eliahu; Samuel Ghinet; dev@open

[ovs-dev] [PATCH 9/9 v3] datapath-windows: refactor code to setup dump start state

2014-09-06 Thread Samuel Ghinet
Looks good, Sam Date: Fri, 29 Aug 2014 12:05:14 -0700 From: Ankur Sharma To: dev@openvswitch.org Subject: [ovs-dev] [PATCH 9/9 v3] datapath-windows: refactor code to setup dump start state Message-ID: <1409339114-15838-1-git-send-email-ankursha..

[ovs-dev] datapath-windows: add description to members of OVS_USER_PARAMS_CONTEXT

2014-09-06 Thread Samuel Ghinet
It might be a bit late for this note now, but perhaps a separate patch could add it: > UINT32 devOp;/* Device operation of the userspace call. */ "devOp" is as vague as "Device operation" IMHO. Could you please refer to these flags (defined in Datapath.c): > #define OVS_READ_DEV_OP

Re: [ovs-dev] [PATCH] Create a NBL for each NB when required

2014-09-06 Thread Samuel Ghinet
confused me. Regarding OvsSlowPathDecapVxlan: > You can be ASSURED that you'll not get an NBL with multiple NBs here. > OvsInjectPacketThroughActions() has already checked for this case. Nevertheless, it makes the code in OvsSlowPathDecapVxlan make it clear that only one NB is expected. A

Re: [ovs-dev] [PATCH] Create a NBL for each NB when required

2014-09-06 Thread Samuel Ghinet
Thanks, Samuel ____ From: Saurabh Shah [ssaur...@vmware.com] Sent: Friday, August 29, 2014 9:51 PM To: Samuel Ghinet; Alin Serdean; dev@openvswitch.org Subject: RE: [ovs-dev] [PATCH] Create a NBL for each NB when required Hi Samuel, > > &g

Re: [ovs-dev] Please review: [PATCH 1/3] Create a NBL for each NB when required

2014-08-29 Thread Samuel Ghinet
rtial copies, that must be linked to one another). Thanks, Sam ____ From: Samuel Ghinet Sent: Friday, August 29, 2014 4:29 PM To: dev@openvswitch.org; Ankur Sharma; ssaur...@vmware.com; elia...@vmware.com; nit...@vmware.com Cc: Alin Serdean Subject: Please r

[ovs-dev] Please review: [PATCH 3/3] Refactor OvsStartNBLIngress

2014-08-29 Thread Samuel Ghinet
Hello, Below is part 3 of the patch - main refactor of the ingress path (OvsStartNBLIngress / OvsExtSendNBL) Thank you! Samuel Ghinet = addressing issues: o) clearer variable names o) merge OvsExtSendNBL and OvsStartNBLIngress into OvsExtSendNBL (there is no reason to

[ovs-dev] Please review: [PATCH 2/3] Refactor OvsInitNBLContext and OvsInitExternalNBLContext

2014-08-29 Thread Samuel Ghinet
Hello, Part 2 of the patch is below: === --- datapath-windows/ovsext/OvsBufferMgmt.c | 39 + 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/datapath-windows/ovsext/OvsBufferMgmt.c b/datapath-windows/ovsext/OvsBufferMgmt.c ind

[ovs-dev] Please review: [PATCH 1/3] Create a NBL for each NB when required

2014-08-29 Thread Samuel Ghinet
ke as argument a NET_BUFFER. I have also added a few ASSERTs where the NET_BUFFER_LIST is expected to have only one NET_BUFFER." Signed-off-by: Samuel Ghinet Co-authored-by: Alin Gabriel Serdean --- datapath-windows/ovsext/OvsActions.c | 20 - datapath-windows/ovsext/OvsBufferMgmt

Re: [ovs-dev] [PATCH 9/9 v2] datapath-windows: refactor code to setup dump start state

2014-08-29 Thread Samuel Ghinet
Nithin, I had expected you modify the original patch with my suggestions, not add a new patch on top of it, by which to refactor the original patch. So this patch is: Not acked-by: Samuel Ghinet Regards, Sam Date: Fri, 29 Aug 2014 01:15:21 -0700 From

Re: [ovs-dev] [PATCH 8/9 v2] datpath-windows: fix the dp index check in ValidateNetlinkCmd()

2014-08-29 Thread Samuel Ghinet
Nithin, This patch goes: Not acked-by: Samuel Ghinet Regards, Sam Date: Fri, 29 Aug 2014 01:15:20 -0700 From: Nithin Raju To: dev@openvswitch.org Subject: [ovs-dev] [PATCH 8/9 v2] datpath-windows: fix the dp index check in

Re: [ovs-dev] [PATCH 7/9 v2] datapath-windows: add clarifications to markers in dump state

2014-08-29 Thread Samuel Ghinet
Nithin, This patch goes: Not acked-by: Samuel Ghinet Regards, Sam Date: Fri, 29 Aug 2014 01:15:19 -0700 From: Nithin Raju To: dev@openvswitch.org Subject: [ovs-dev] [PATCH 7/9 v2] datapath-windows: add clarifications to markers in dump

Re: [ovs-dev] [PATCH 6/9 v2] datapath-windows: Check for device operation in OvsGetDpCmdHandler

2014-08-29 Thread Samuel Ghinet
Nithin, This patch goes: Not acked-by: Samuel Ghinet Regards, Sam Date: Fri, 29 Aug 2014 01:15:18 -0700 From: Nithin Raju To: dev@openvswitch.org Subject: [ovs-dev] [PATCH 6/9 v2] datapath-windows: Check for device operation in

Re: [ovs-dev] [PATCH 5/9 v2] datapath-windows: add description to members of OVS_USER_PARAMS_CONTEXT

2014-08-29 Thread Samuel Ghinet
Nithin, This patch goes: Not acked-by: Samuel Ghinet Regards, Sam Message: 1 Date: Fri, 29 Aug 2014 01:15:17 -0700 From: Nithin Raju To: dev@openvswitch.org Subject: [ovs-dev] [PATCH 5/9 v2] datapath-windows: add description to members of

[ovs-dev] [PATCH 4/9 v2] datapath-windows: add support for GET_DP command to dump datpaths

2014-08-29 Thread Samuel Ghinet
Nithin, I had given some suggestions, which you agreed upon, but you did not apply them to this patch. Also, note the typo in the comment: > In this patch, we add support for the GET_DP netlink command to dump > the datpaaths So this patch goes: Not acked-by: Samuel Ghinet Regard

  1   2   3   >