[ovs-dev] [PATCH] datapath-windows: Optimize conntrack performance

2018-06-06 Thread Anand Kumar
s OVS with conntrack enabled: 3.9-4.0Gbps After optimization: Native: 6.0Gbps OVS: 5.1-5.75Gbps OVS with conntrack enabled:: 4.2-4.4Gbps Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack-nat.c | 7 +- datapath-windows/ovsext/Conntrack-related.c | 17 ++-- datapath-windows/ovsext/C

[ovs-dev] [PATCH v2] datapath-windows: Optimize conntrack performance

2018-06-07 Thread Anand Kumar
on: Native: 6.0Gbps OVS: 5.1-5.75Gbps OVS with conntrack enabled: 3.9-4.0Gbps After optimization: Native: 6.0Gbps OVS: 5.1-5.75Gbps OVS with conntrack enabled:: 4.2-4.4Gbps Tested by loading/unloading driver with driver verifier enabled Signed-off-by: Anand Kumar --- v1->v2: Update c

Re: [ovs-dev] [PATCH v2] datapath-windows: Optimize conntrack performance

2018-06-08 Thread Anand Kumar
Hi Shashank, Thanks for the review. I will address your comments and send out a V3. Regards, Anand Kumar From: Shashank Ram Date: Friday, June 8, 2018 at 10:11 AM To: Anand Kumar Cc: "d...@openvswitch.org" Subject: Re: [ovs-dev] [PATCH v2] datapath-windows: Optimize conntrack p

[ovs-dev] [PATCH v3] datapath-windows: Optimize conntrack performance

2018-06-11 Thread Anand Kumar
iperf3. Before optimization: Native: 6.0Gbps OVS: 5.1-5.75Gbps OVS with conntrack enabled: 3.9-4.0Gbps After optimization: Native: 6.0Gbps OVS: 5.1-5.75Gbps OVS with conntrack enabled:: 4.2-4.4Gbps Tested by loading/unloading driver with driver verifier enabled Signed-off-by: Anand Kumar ---

Re: [ovs-dev] [PATCH v3] datapath-windows: Optimize conntrack performance

2018-06-17 Thread Anand Kumar
Abandoning this change. I have couple of patches to optimize conntrack, will be sending it out as a series. Thanks, Anand Kumar On 6/11/18, 11:39 AM, "Anand Kumar" wrote: - Use spinlock instead of read/write lock for conntrack entry. - Use NdisInterlockedXX wrapper api&#x

[ovs-dev] [PATCH v1 0/4] Optimize conntrack performance

2018-06-17 Thread Anand Kumar
This patch series is primarily to refactor conntrack code for better throughput with conntrack. With this patch series TCP throughput with conntrack increased by ~50%. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Anand Kumar (4

[ovs-dev] [PATCH v4 4/4] datapath-windows: Compute ct hash based on 5-tuple and zone

2018-06-17 Thread Anand Kumar
Conntrack 5-tuple consists of src address, dst address, src port, dst port and protocol which will be unique to a ct session. Use this information along with zone to compute hash. Also re-factor conntrack code related to parsing netlink attributes. Signed-off-by: Anand Kumar --- datapath

[ovs-dev] [PATCH v4 1/4] datapath-windows: Use spinlock instead of RW lock for ct entry

2018-06-17 Thread Anand Kumar
kedXX. - Update 'ctTotalRelatedEntries' using interlocked functions. - Move conntrack lock out of NAT module. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack-nat.c | 7 +- datapath-windows/ovsext/Conntrack-related.c | 17 ++-- datapath-windows/ovsext/Conntrack.

[ovs-dev] [PATCH v4 2/4] datapath-windows: Remove NAT locks in conntrack.

2018-06-17 Thread Anand Kumar
TCP traffic. - Optimize conntrack look up. - Remove 'bucketlockRef' member from conntrack entry structure. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack-ftp.c | 4 +- datapath-windows/ovsext/Conntrack-tcp.c | 15 ++--- datapath-windows/ovsext/Conntrack.c

[ovs-dev] [PATCH v4 3/4] datapath-windows: Implement locking in conntrack NAT.

2018-06-17 Thread Anand Kumar
The 'ovsNatTable' and 'ovsUnNatTable' tables are shared between cleanup threads and packet processing thread. In order to protect these two tables use a spinlock. Also introduce counters to track number of nat entries. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/

Re: [ovs-dev] [PATCH v4 1/4] datapath-windows: Use spinlock instead of RW lock for ct entry

2018-06-18 Thread Anand Kumar
Hi Shashank, Thanks for the review. Please find my response inline. Thanks, Anand Kumar From: Shashank Ram Date: Monday, June 18, 2018 at 11:27 AM To: Anand Kumar , "d...@openvswitch.org" Subject: Re: [ovs-dev] [PATCH v4 1/4] datapath-windows: Use spinlock instead of RW lock fo

Re: [ovs-dev] [PATCH v4 2/4] datapath-windows: Remove NAT locks in conntrack.

2018-06-18 Thread Anand Kumar
Hi Shashank, Thanks for the review. Please find my response inline. Thanks, Anand Kumar On 6/18/18, 11:54 AM, "Shashank Ram" wrote: On 06/17/2018 10:37 PM, Anand Kumar wrote: > This patch primarily gets rid of NdisRWLock in conntrack for NAT > function

Re: [ovs-dev] [PATCH v4 3/4] datapath-windows: Implement locking in conntrack NAT.

2018-06-18 Thread Anand Kumar
Hi Shashank, I will address this in next version of the patch. Thanks, Anand Kumar On 6/18/18, 2:36 PM, "Shashank Ram" wrote: This patch should be combined with the patch where NAT lock is removed from CT. Keeping this separate will cause the previous patches in this

[ovs-dev] [PATCH v2 1/3] datapath-windows: Use spinlock instead of RW lock for ct entry

2018-06-18 Thread Anand Kumar
kedXX. - Update 'ctTotalRelatedEntries' using interlocked functions. - Move conntrack lock out of NAT module. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Calculate the dispatch level only

[ovs-dev] [PATCH v2 0/3] Optimize conntrack performance

2018-06-18 Thread Anand Kumar
This patch series is primarily to refactor conntrack code for better throughput with conntrack. With this patch series TCP throughput with conntrack increased by ~50%. Anand Kumar (3): datapath-windows: Use spinlock instead of RW lock for ct entry datapath-windows: Implement locking in

[ovs-dev] [PATCH v2 3/3] datapath-windows: Compute ct hash based on 5-tuple and zone

2018-06-18 Thread Anand Kumar
with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Updated commit message to include testing done. --- datapath-windows/ovsext/Conntrack.c | 228 ++-- datapath-windows/ovsext/Conntrack.h | 2 - 2 files changed,

[ovs-dev] [PATCH v2 2/3] datapath-windows: Implement locking in conntrack NAT.

2018-06-18 Thread Anand Kumar
x27;bucketlockRef' member from conntrack entry structure. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Merge patch 2 and 3 so that NAT locks related changes are in a single pa

[ovs-dev] [PATCH v3 0/3] Optimize conntrack performance

2018-06-18 Thread Anand Kumar
This patch series is primarily to refactor conntrack code for better throughput with conntrack. With this patch series TCP throughput with conntrack increased by ~50%. Anand Kumar (3): datapath-windows: Use spinlock instead of RW lock for ct entry datapath-windows: Implement locking in

[ovs-dev] [PATCH v3 1/3] datapath-windows: Use spinlock instead of RW lock for ct entry

2018-06-18 Thread Anand Kumar
kedXX. - Update 'ctTotalRelatedEntries' using interlocked functions. - Move conntrack lock out of NAT module. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Calculate the dispatch level only

[ovs-dev] [PATCH v3 2/3] datapath-windows: Implement locking in conntrack NAT.

2018-06-18 Thread Anand Kumar
x27;bucketlockRef' member from conntrack entry structure. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Merge patch 2 and 3 so that NAT locks related changes are in a

[ovs-dev] [PATCH v3 3/3] datapath-windows: Compute ct hash based on 5-tuple and zone

2018-06-18 Thread Anand Kumar
with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Updated commit message to include testing done. v2->v3: No change. --- datapath-windows/ovsext/Conntrack.c | 228 ++-- datapath-windows/ovsext/Conntrack.h |

[ovs-dev] [PATCH v4 0/3] Optimize conntrack performance

2018-06-19 Thread Anand Kumar
This patch series is primarily to refactor conntrack code for better throughput with conntrack. With this patch series TCP throughput with conntrack increased by ~50%. Anand Kumar (3): datapath-windows: Use spinlock instead of RW lock for ct entry datapath-windows: Implement locking in

[ovs-dev] [PATCH v4 2/3] datapath-windows: Implement locking in conntrack NAT.

2018-06-19 Thread Anand Kumar
x27;bucketlockRef' member from conntrack entry structure. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Merge patch 2 and 3 so that NAT locks related changes are in a single pa

[ovs-dev] [PATCH v4 1/3] datapath-windows: Use spinlock instead of RW lock for ct entry

2018-06-19 Thread Anand Kumar
kedXX. - Update 'ctTotalRelatedEntries' using interlocked functions. - Move conntrack lock out of NAT module. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Calculate the dispatch level only

[ovs-dev] [PATCH v4 3/3] datapath-windows: Compute ct hash based on 5-tuple and zone

2018-06-19 Thread Anand Kumar
with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar --- v1->v2: Updated commit message to include testing done. v2->v3: No change v3->v4: No change --- datapath-windows/ovsext/Conntrack.c | 228 ++-- datapath-windo

Re: [ovs-dev] [PATCH v2 0/3] Optimize conntrack performance

2018-06-19 Thread Anand Kumar
Hi Alin, Thanks for running the code analysis on the patch series. As discussed in the Hyper-V meeting, I have addressed them and send out a v4 of my patch series. Thanks, Anand Kumar On 6/19/18, 9:14 AM, "Alin Serdean" wrote: Thanks a lot for the series and the ben

Re: [ovs-dev] [PATCH v4 2/3] datapath-windows: Implement locking in conntrack NAT.

2018-06-22 Thread Anand Kumar
Hi Alin, Thanks for reviewing the patch series. I will send out a v5 to address this issue and retain the acks. Thanks, Anand Kumar On 6/22/18, 7:18 AM, "Alin Serdean" wrote: > -Mesaj original- > De la: ovs-dev-boun...@openvswitch.org boun...@openvswitch.org&

[ovs-dev] [PATCH v5 0/3] Optimize conntrack performance

2018-06-22 Thread Anand Kumar
This patch series is primarily to refactor conntrack code for better throughput with conntrack. With this patch series TCP throughput with conntrack increased by ~50%. Anand Kumar (3): datapath-windows: Use spinlock instead of RW lock for ct entry datapath-windows: Implement locking in

[ovs-dev] [PATCH v5 1/3] datapath-windows: Use spinlock instead of RW lock for ct entry

2018-06-22 Thread Anand Kumar
kedXX. - Update 'ctTotalRelatedEntries' using interlocked functions. - Move conntrack lock out of NAT module. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- v1->

[ovs-dev] [PATCH v5 3/3] datapath-windows: Compute ct hash based on 5-tuple and zone

2018-06-22 Thread Anand Kumar
with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- v1->v2: Updated commit message to include testing done. v2->v3: No change v3->v4: No change v4->v5: No change --- datapath-windows/ovsext/Connt

[ovs-dev] [PATCH v5 2/3] datapath-windows: Implement locking in conntrack NAT.

2018-06-22 Thread Anand Kumar
x27;bucketlockRef' member from conntrack entry structure. Testing: Verified loading/unloading the driver with driver verified enabled. Ran TCP/UDP and ICMP traffic. Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- v1->v2: Merge patch 2 and 3 so that NAT locks related changes

Re: [ovs-dev] [PATCH] datapath-windows: Remove the workaround in NAT for TCP checksum

2017-10-16 Thread Anand Kumar
Hi Alin, Thanks for applying the patch. Yes, we need this on branch 2.8 as well. Thanks, Anand Kumar On 10/16/17, 7:33 AM, "Alin Serdean" wrote: It looks good and I managed to test it, sorry for the delay. I had some issues while disabling the offloads on the hw

[ovs-dev] [PATCH] datapath-windows: Update OvsIPv4TunnelKey flags in geneve decap.

2017-10-17 Thread Anand Kumar
Set the geneve flags OVS_TNL_F_GENEVE_OPT and OVS_TNL_F_CRT_OPT in OvsDecapGeneve, so that windows behavior is similiar to linux https://github.com/openvswitch/ovs/blob/master/datapath/linux/compat/geneve.c#L242 Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Geneve.c | 8 1

Re: [ovs-dev] [PATCH] datapath-windows: Update OvsIPv4TunnelKey flags in geneve decap.

2017-10-18 Thread Anand Kumar
Hi Shashank, I have set the tunnel key flags OVS_TNL_F_GENEVE_OPT by default to match the linux behavior @https://github.com/openvswitch/ovs/blob/master/datapath/linux/compat/geneve.c#L242 Thanks, Anand Kumar On 10/18/17, 9:07 AM, "Shashank Ram" wrote: On 10/17/1

Re: [ovs-dev] [PATCH] datapath-windows: Update OvsIPv4TunnelKey flags in geneve decap.

2017-10-19 Thread Anand Kumar
Hi Sairam, Sure, I will add the check to see if there are any geneve tunnel options and set OVS_TNL_F_GENEVE_OPT accordingly and send out v2 version of the patch. Thanks, Anand Kumar On 10/19/17, 8:13 AM, "Sairam Venugopal" wrote: Anand, Looks like Linux does make a ch

[ovs-dev] [PATCH v2] datapath-windows: Update OvsIPv4TunnelKey flags in geneve decap.

2017-10-19 Thread Anand Kumar
OVS_TNL_F_GENEVE_OPT if the packet has geneve options. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Geneve.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/datapath-windows/ovsext/Geneve.c b/datapath-windows/ovsext/Geneve.c index 43374e2..6dca69b 100644 --- a

Re: [ovs-dev] [PATCH 1/4] windows: _set_output_format is no longer required from VS2015

2017-11-07 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 11/1/17, 10:19 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Gabriel Serdean" wrote: _set_output_format is deprecated ang no longer required starting from MSC_VER 1900 (VS 2015): https://urldefense.proofpoint.co

Re: [ovs-dev] [PATCH 3/4] build-windows: Add check for struct timespec

2017-11-07 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 11/1/17, 10:19 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Gabriel Serdean" wrote: Starting from WDK 10 the structure `timespec` is defined in . This patch adds a check for the structure to make aware of it,

Re: [ovs-dev] [PATCH 2/4] windows: Add interlocked function definitions for VS 2015

2017-11-07 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 11/1/17, 10:19 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Gabriel Serdean" wrote: For some unclear and accidental reasons, the Windows 10 SDK renamed _Interlocked* functions to _InlineInterlocked* (al

Re: [ovs-dev] [PATCH 4/4] ofp-actions: Add compare to offsetof need for MSVC 2015/17

2017-11-07 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 11/1/17, 10:19 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Gabriel Serdean" wrote: Unfortunately starting from VS 2015, the "C" definition for `offsetof` has been changed. Please see: https://urldefen

[ovs-dev] [PATCH v1 0/3] datapath-windows: New lock implementation in conntrack

2017-11-14 Thread Anand Kumar
This patch series replaces existing one RW lock implemenation in conntrack with two RW locks in conntrack and one RW lock in NAT. Anand Kumar (3): datapath-windows: Refactor conntrack code. datapath-windows: Add a global level RW lock for NAT datapath-windows: Optimize conntrack lock

[ovs-dev] [PATCH v1 1/3] datapath-windows: Refactor conntrack code.

2017-11-14 Thread Anand Kumar
Some of the functions and code are refactored so that new conntrack lock can be implemented Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack-nat.c | 11 +-- datapath-windows/ovsext/Conntrack.c | 170 ++-- datapath-windows/ovsext/Conntrack.h

[ovs-dev] [PATCH v1 2/3] datapath-windows: Add a global level RW lock for NAT

2017-11-14 Thread Anand Kumar
Currently NAT module relies on the existing conntrack lock. This patch provides a basic lock implementation for NAT module in conntrack. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack.c | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions

[ovs-dev] [PATCH v1 3/3] datapath-windows: Optimize conntrack lock implementation.

2017-11-14 Thread Anand Kumar
reference(bucketLockRef) to the corresponding OvsCtBucketLock of conntrack table. We need this reference to retrieve ovsCtBucketLock from ct entry for delete operation. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack-nat.c | 6 + datapath-windows/ovsext/Conntrack.c | 231

Re: [ovs-dev] [PATCH] datapath-windows: Account for VLAN tag in tunnel Decap

2017-11-21 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 11/20/17, 3:06 PM, "ovs-dev-boun...@openvswitch.org on behalf of Shashank Ram" wrote: Decap functions for tunneling protocols do not compute the packet header offsets correctly when there is a VLAN tag in the L2 header. This

[ovs-dev] [PATCH v1] Add support to delete a conntrack entry by 5-tuple

2017-11-21 Thread Anand Kumar
since conntrack 5-tuple is an optional parameter. Anand Kumar (1): datapath-windows: Add support for deleting conntrack entry by 5 tuple. datapath-windows/ovsext/Conntrack.c | 146 +--- 1 file changed, 134 insertions(+), 12 deletions(-) -- 2.9.3.windows.1

[ovs-dev] [PATCH v1] datapath-windows: Add support for deleting conntrack entry by 5-tuple.

2017-11-21 Thread Anand Kumar
To delete a conntrack entry specified by 5-tuple pass an additional conntrack 5-tuple parameter to flush-conntrack. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack.c | 146 +--- 1 file changed, 134 insertions(+), 12 deletions(-) diff --git a

[ovs-dev] [PATCH v2 0/3] datapath-windows: New lock implementation in conntrack

2018-01-23 Thread Anand Kumar
This patch series replaces existing one RW lock implemenation in conntrack with two RW locks in conntrack and one RW lock in NAT. --- v1->v2: - Patch 3, address review comments --- Anand Kumar (3): datapath-windows: Refactor conntrack code. datapath-windows: Add a global level RW lock for

[ovs-dev] [PATCH v2 1/3] datapath-windows: Refactor conntrack code.

2018-01-23 Thread Anand Kumar
Some of the functions and code are refactored so that new conntrack lock can be implemented Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Conntrack-nat.c | 11 +- datapath-windows/ovsext/Conntrack.c | 174 ++-- datapath

[ovs-dev] [PATCH v2 2/3] datapath-windows: Add a global level RW lock for NAT

2018-01-23 Thread Anand Kumar
Currently NAT module relies on the existing conntrack lock. This patch provides a basic lock implementation for NAT module in conntrack. Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Conntrack.c | 36 ++-- 1 file changed

[ovs-dev] [PATCH v2 3/3] datapath-windows: Optimize conntrack lock implementation.

2018-01-23 Thread Anand Kumar
reference(bucketLockRef) to the corresponding OvsCtBucketLock of conntrack table. We need this reference to retrieve ovsCtBucketLock from ct entry for delete operation. Signed-off-by: Anand Kumar --- v1->v2: Address potential memory leak in conntrack initialization. --- datapath-windows/ovs

[ovs-dev] [PATCH v3 0/3] datapath-windows: New lock implementation in conntrack

2018-01-23 Thread Anand Kumar
This patch series replaces existing one RW lock implemenation in conntrack with two RW locks in conntrack and one RW lock in NAT. --- v1->v2: - Patch 3, address review comments v2->v3: - Patch 3, fix invalid memory access after deleting ct entry --- Anand Kumar (3): datapath-windows: Re

[ovs-dev] [PATCH v3 1/3] datapath-windows: Refactor conntrack code.

2018-01-23 Thread Anand Kumar
Some of the functions and code are refactored so that new conntrack lock can be implemented Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Conntrack-nat.c | 11 +- datapath-windows/ovsext/Conntrack.c | 174 ++-- datapath

[ovs-dev] [PATCH v3 3/3] datapath-windows: Optimize conntrack lock implementation.

2018-01-23 Thread Anand Kumar
reference(bucketLockRef) to the corresponding OvsCtBucketLock of conntrack table. We need this reference to retrieve ovsCtBucketLock from ct entry for delete operation. Signed-off-by: Anand Kumar --- v1->v2: Address potential memory leak in conntrack initialization. v2->v3: Fix invalid memory

[ovs-dev] [PATCH v3 2/3] datapath-windows: Add a global level RW lock for NAT

2018-01-23 Thread Anand Kumar
Currently NAT module relies on the existing conntrack lock. This patch provides a basic lock implementation for NAT module in conntrack. Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Conntrack.c | 36 ++-- 1 file changed

[ovs-dev] [PATCH v4 2/3] datapath-windows: Add a global level RW lock for NAT

2018-01-29 Thread Anand Kumar
Currently NAT module relies on the existing conntrack lock. This patch provides a basic lock implementation for NAT module in conntrack. Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Conntrack.c | 36 ++-- 1 file changed

[ovs-dev] [PATCH v4 0/3] datapath-windows: New lock implementation in conntrack

2018-01-29 Thread Anand Kumar
analyzer warning message --- Anand Kumar (3): datapath-windows: Refactor conntrack code. datapath-windows: Add a global level RW lock for NAT datapath-windows: Optimize conntrack lock implementation. datapath-windows/ovsext/Conntrack-nat.c | 17 +- datapath-windows/ovsext/Conntrack.c

[ovs-dev] [PATCH v4 1/3] datapath-windows: Refactor conntrack code.

2018-01-29 Thread Anand Kumar
Some of the functions and code are refactored so that new conntrack lock can be implemented Signed-off-by: Anand Kumar Acked-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Conntrack-nat.c | 11 +- datapath-windows/ovsext/Conntrack.c | 174 ++-- datapath

[ovs-dev] [PATCH v4 3/3] datapath-windows: Optimize conntrack lock implementation.

2018-01-29 Thread Anand Kumar
reference(bucketLockRef) to the corresponding OvsCtBucketLock of conntrack table. We need this reference to retrieve ovsCtBucketLock from ct entry for delete operation. Signed-off-by: Anand Kumar --- v1->v2: Address potential memory leak in conntrack initialization. v2->v3: Fix invalid memory

Re: [ovs-dev] [PATCH v3 3/3] datapath-windows: Optimize conntrack lock implementation.

2018-01-29 Thread Anand Kumar
Hi Alin, Thanks for the review. I’ll address the warning and send out the patch. Thanks, Anand Kumar On 1/29/18, 5:20 AM, "Alin Serdean" wrote: Trimming the patch a bit. Just one small nit from the static analyzer inlined. Rest looks good. Acked-by: Al

[ovs-dev] [PATCH] datapath-windows: Add trace level logs in conntrack for invalid ct state.

2018-02-02 Thread Anand Kumar
Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack-icmp.c | 1 + datapath-windows/ovsext/Conntrack-tcp.c | 4 datapath-windows/ovsext/Conntrack.c | 4 3 files changed, 9 insertions(+) diff --git a/datapath-windows/ovsext/Conntrack-icmp.c b/datapath-windows/ovsext

Re: [ovs-dev] [PATCH] datapath-windows: Add trace level logs in conntrack for invalid ct state.

2018-02-02 Thread Anand Kumar
Hi Alin, Thanks for the quick review. I will expand log messages to “Invalid XXX packet detected”. I’m not sure if I follow your comment about “s/syn/SYN/g”. Do you want me to change it to Uppercase? Thanks, Anand Kumar On 2/2/18, 2:06 PM, "Alin Serdean" wrote: Looks good ju

[ovs-dev] [PATCH v2] datapath-windows: Add trace level logs in conntrack for invalid ct state.

2018-02-02 Thread Anand Kumar
Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack-icmp.c | 1 + datapath-windows/ovsext/Conntrack-tcp.c | 4 datapath-windows/ovsext/Conntrack.c | 6 ++ 3 files changed, 11 insertions(+) diff --git a/datapath-windows/ovsext/Conntrack-icmp.c b/datapath-windows

Re: [ovs-dev] [PATCH] datapath-windows: Support to selectively compile targets

2018-02-12 Thread Anand Kumar
Hi, My thoughts are with Shashank on this, it makes sense to have 1 configure and 1 make command to build a particular target, instead of having flexibility to specify multiple targets. Thanks, Anand Kumar On 2/8/18, 10:56 AM, "ovs-dev-boun...@openvswitch.org on behalf of Shashank

Re: [ovs-dev] [PATCH] datapath-windows: Support to selectively compile targets

2018-02-16 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar From: Shashank Ram Sent: Tuesday, February 6, 2018 1:29 PM To: d...@openvswitch.org Cc: Shashank Ram Subject: [PATCH

[ovs-dev] [PATCH] datapath-windows: On Debug builds, dump NBL info based on OVS_DBG_DEFAULT macro

2018-02-26 Thread Anand Kumar
Currently nbl information is getting dumped whenever a nbl is copied or allocated, since OVS_DBG_DEFAULT is set to OVS_DBG_INFO for debug builds, which affects the ovs performance. Instead dump nbl information only when OVS_DBG_DEFAULT is set to OVS_LOG_LOUD Signed-off-by: Anand Kumar

Re: [ovs-dev] [PATCH] datapath-windows: fix hash creation on ct mark

2018-02-27 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 2/21/18, 6:57 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Gabriel Serdean" wrote: Use key->ct.mark instead of key->ct.zone when generating the hash over the mark. Signed-off-by: Alin

Re: [ovs-dev] [PATCH v2] datapath-windows: Support to selectively compile targets

2018-02-27 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 2/27/18, 11:57 AM, "ovs-dev-boun...@openvswitch.org on behalf of Shashank Ram" wrote: Adds support to selectively compile kernel driver for target versions. This is useful when environments to compile for all targets mi

[ovs-dev] [PATCH v2] datapath-windows: On Debug builds, dump NBL info based on OVS_DBG_DEFAULT macro

2018-02-27 Thread Anand Kumar
Currently nbl information is getting dumped whenever a nbl is copied or allocated, since OVS_DBG_DEFAULT is set to OVS_DBG_INFO for debug builds, which affects the ovs performance. Instead dump nbl information only when OVS_DBG_DEFAULT is set to OVS_LOG_LOUD Signed-off-by: Anand Kumar

[ovs-dev] [PATCH] datapath-windows: Do not drop Ip fragments less than MIN_FRAGMENT_SIZE

2018-03-05 Thread Anand Kumar
: Anand Kumar --- datapath-windows/ovsext/IpFragment.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/datapath-windows/ovsext/IpFragment.c b/datapath-windows/ovsext/IpFragment.c index 3d5277a..da9d33a 100644 --- a/datapath-windows/ovsext/IpFragment.c +++ b/datapath-windows

Re: [ovs-dev] [PATCH] datapath-windows: Do not drop Ip fragments less than MIN_FRAGMENT_SIZE

2018-03-06 Thread Anand Kumar
Thanks for the review. MIN_FRAGMENT_SIZE is used to determine maximum number of fragments that are allowed for an IP datagram. I will update the macro MAX_FRAGMENTS to compute the value based on MIN_FRAGMENT_SIZE. Regards, Anand Kumar On 3/6/18, 5:43 AM, "aserd...@ovn.org" wro

[ovs-dev] [PATCH v2] datapath-windows: Do not drop Ip fragments less than MIN_FRAGMENT_SIZE

2018-03-06 Thread Anand Kumar
: Anand Kumar --- datapath-windows/ovsext/IpFragment.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/datapath-windows/ovsext/IpFragment.c b/datapath-windows/ovsext/IpFragment.c index 3d5277a..d59d7cf 100644 --- a/datapath-windows/ovsext/IpFragment.c +++ b/datapath

Re: [ovs-dev] [PATCH v2] datapath-windows: Do not drop Ip fragments less than MIN_FRAGMENT_SIZE

2018-03-07 Thread Anand Kumar
Hi Alin, Thanks for reviewing the patch. Can we get this patch applied? Thanks, Anand Kumar On 3/7/18, 3:42 AM, "ovs-dev-boun...@openvswitch.org on behalf of aserd...@ovn.org" wrote: Acked-by: Alin Gabriel Serdean Alin. -Mesaj original- De la: ov

Re: [ovs-dev] [PATCH] datapath-windows: Add software checksums for nbl which contain multiple nb

2017-04-21 Thread Anand Kumar
Acked-by: Anand Kumar On 4/20/17, 7:43 PM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: Until now we only needed to compute software checksums on net buffer lists containing a single net buffer. This patch allows the software checksums to be ap

[ovs-dev] [PATCH v7 2/5] datapath-windows: Added Ipv4 fragments support in Conntrack

2017-04-21 Thread Anand Kumar
This patch adds support for tracking Ipv4 fragments in conntrack module. Individual fragments are not tracked and are consumed by the fragmentation/reassembly. Only the reassembled Ipv4 datagram is tracked and treated as a single ct entry. Signed-off-by: Anand Kumar --- v6->v7: Made changes

[ovs-dev] [PATCH v7 3/5] datapath-windows: Retain MRU value in the _OVS_BUFFER_CONTEXT.

2017-04-21 Thread Anand Kumar
This patch introduces a new field MRU(Maximum Recieved Unit) in the _OVS_BUFFER_CONTEXT and it is used only for Ip Fragments to retain MRU for the reassembled IP datagram when the packet is forwarded to userspace. Signed-off-by: Anand Kumar --- v6->v7: Increase value size in OVS_BUFFER_CONT

[ovs-dev] [PATCH v7 5/5] datapath-windows: Fragment NBL based on MRU size

2017-04-21 Thread Anand Kumar
This patch adds support for Fragmenting NBL based on the MRU value. MRU value is updated only for Ipv4 fragments, if it is non zero, then fragment the NBL. Signed-off-by: Anand Kumar --- v6->v7: Fragment the NBL for tunnel packets v5->v6: No Change v4->v5: - Use MRU informati

[ovs-dev] [PATCH v7 1/5] datapath-windows: Added a new file to support Ipv4 fragments.

2017-04-21 Thread Anand Kumar
Ipv4 fragments. Signed-off-by: Anand Kumar --- v6->v7: Added new memory pool tag and align function description v5->v6: No Change v4->v5: - Modified Patch 3 to retain MRU in _OVS_BUFFER_CONTEXT instead of using it in ovsForwardingContext with minor changes in rest of the

[ovs-dev] [PATCH v7 4/5] datapath-windows: Updated OvsTcpSegmentNBL to handle IP fragments.

2017-04-21 Thread Anand Kumar
With this patch, OvsTcpSegmentNBL not only supports fragmenting NBL to TCP segments but also Ipv4 fragments. To reflect the new changes, renamed function name from OvsTcpSegmentNBL to OvsFragmentNBL and created a wrapper for OvsTcpSegmentNBL. Signed-off-by: Anand Kumar --- v6->v7: As per Al

[ovs-dev] [PATCH v7 0/5] datapath-windows: Add support for Ipv4 fragments

2017-04-21 Thread Anand Kumar
ch 4 updated to make it compile for release mode. --- Anand Kumar (5): datapath-windows: Added a new file to support Ipv4 fragments. datapath-windows: Added Ipv4 fragments support in Conntrack datapath-windows: Retain MRU value in the _OVS_BUFFER_CONTEXT. datapath-windows: Updated OvsTcp

[ovs-dev] [PATCH v8 0/5] datapath-windows: Add support for Ipv4 fragments

2017-05-04 Thread Anand Kumar
messages, summary, fixed alignment issues. v1->v2: - Patch 4 updated to make it compile for release mode. --- Anand Kumar (5): datapath-windows: Added a new file to support Ipv4 fragments. datapath-windows: Added Ipv4 fragments support in Conntrack datapath-windows: Retain MRU value in th

[ovs-dev] [PATCH v8 3/5] datapath-windows: Retain MRU value in the _OVS_BUFFER_CONTEXT.

2017-05-04 Thread Anand Kumar
This patch introduces a new field MRU(Maximum Recieved Unit) in the _OVS_BUFFER_CONTEXT and it is used only for Ip Fragments to retain MRU for the reassembled IP datagram when the packet is forwarded to userspace. Signed-off-by: Anand Kumar --- v7->v8: No change v6->v7: Increase value s

[ovs-dev] [PATCH v8 5/5] datapath-windows: Fragment NBL based on MRU size

2017-05-04 Thread Anand Kumar
This patch adds support for Fragmenting NBL based on the MRU value. MRU value is updated only for Ipv4 fragments, if it is non zero, then fragment the NBL and send out the new NBL to the vnic. Signed-off-by: Anand Kumar --- v7->v8: No change v6->v7: Fragment the NBL for tunnel packets v5-&

[ovs-dev] [PATCH v8 4/5] datapath-windows: Updated OvsTcpSegmentNBL to handle IP fragments.

2017-05-04 Thread Anand Kumar
With this patch, OvsTcpSegmentNBL not only supports fragmenting NBL to TCP segments but also Ipv4 fragments. To reflect the new changes, renamed function name from OvsTcpSegmentNBL to OvsFragmentNBL and created a wrapper for OvsTcpSegmentNBL. Signed-off-by: Anand Kumar --- v7->v8: No change

[ovs-dev] [PATCH v8 1/5] datapath-windows: Added a new file to support Ipv4 fragments.

2017-05-04 Thread Anand Kumar
Ipv4 fragments. Signed-off-by: Anand Kumar --- v7->v8: Address locking issues found by inspection that could resolve the assertion observed by Alin in OvsLookupIPFrag() with verifier enabled. v6->v7: Added new memory pool tag and align function description v5->v6: No Chan

[ovs-dev] [PATCH v8 2/5] datapath-windows: Added Ipv4 fragments support in Conntrack

2017-05-04 Thread Anand Kumar
This patch adds support for tracking Ipv4 fragments in conntrack module. Individual fragments are not tracked and are consumed by the fragmentation/reassembly. Only the reassembled Ipv4 datagram is tracked and treated as a single ct entry. Signed-off-by: Anand Kumar --- v7->v8: No change v6-

Re: [ovs-dev] [PATCH] datapath-windows: Update the key after defragmentation

2017-05-17 Thread Anand Kumar
Acked-by: Anand Kumar kumaran...@vmware.com Thanks, Anand Kumar On 5/17/17, 6:49 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: Update the key used by the actions which follow up defragmentation, with no fragment set in the IP header. F

Re: [ovs-dev] [PATCH] datapath-windows: Fix possible null dereference in ipfragment

2017-05-17 Thread Anand Kumar
Thanks for identifying and fixing this. Acked-by: Anand Kumar Regards, Anand Kumar On 5/17/17, 6:54 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: Found using static analysis tools. Signed-off-by: Alin Gabriel Serdean --- datapa

Re: [ovs-dev] [PATCH] datapath-windows: Fix alignment in actions

2017-05-17 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 5/17/17, 5:57 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: Found by inspection. Signed-off-by: Alin Gabriel Serdean --- datapath-windows/ovsext/Actions.c | 24

Re: [ovs-dev] [PATCH] datapath-windows: Report success for conntrack actions over frags

2017-05-17 Thread Anand Kumar
Hi Alin, Thank you for identifying and fixing issue in fragmenatation. Acked-by: Anand Kumar Regards, Anand Kumar On 5/17/17, 6:43 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: When a conntrack action is applied over an IP fragment we pend th

Re: [ovs-dev] [PATCH 1/3] datapath-windows: Remove Strsafe usage from datapath

2017-05-24 Thread Anand Kumar
Thank you for the patches. Acked-By: Anand Kumar Thanks, Anand Kumar On 5/23/17, 10:59 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: The removal is mandatory to use the VStudio 2013 static code analyzer. The only function that was used from t

Re: [ovs-dev] [PATCH 2/3] datapath-windows: add two new build targets for code analysis

2017-05-24 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 5/23/17, 10:59 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: Add two new build targets: 'Win8Analyze' and 'Win8.1Analyze'. The new build targets have the static code analyzer (buil

Re: [ovs-dev] [PATCH 3/3] appveyor: Add new make target

2017-05-24 Thread Anand Kumar
Acked-by: Anand Kumar Thanks, Anand Kumar On 5/23/17, 10:59 AM, "ovs-dev-boun...@openvswitch.org on behalf of Alin Serdean" wrote: This patch adds the new make target 'datapath_windows_analyze' (static analysis over the windows datapath code) to the appveyor bu

[ovs-dev] [PATCH] datapath-windows: Add validations in fragmentation module

2017-05-25 Thread Anand Kumar
- Minimum valid fragment size is 400 bytes, any fragment smaller is likely to be intentionally crafted. - Validate maximum length of an Ip datagram - Added counters to keep track of number of fragments for a given Ip datagram. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Actions.c

Re: [ovs-dev] [PATCH v2] datapath-windows: Refactor OvsCreateNewNBLsFromMultipleNBs

2017-07-27 Thread Anand Kumar
Thanks for refactoring it. Acked-by: Anand Kumar Thanks, Anand Kumar On 7/24/17, 3:31 PM, "ovs-dev-boun...@openvswitch.org on behalf of Shashank Ram" wrote: Previously, the function would take the curNbl and nextNbl as inputs, and modify the linked list, and merge

[ovs-dev] [PATCH] datapath-windows: Fix conntrack lookups for reversed keys

2017-08-01 Thread Anand Kumar
once. Testing Done: - Verified that ICMP requests are no longer treated as replies in Conntrack. Change-Id: I826a164cfb9137e2167c404ff5c9bfd9dfaa33ad Co-authored-by: Sairam Venugopal Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack.c | 19 ++- 1 file change

[ovs-dev] [PATCH] datapath-windows: Do not modify port field for ICMP during SNAT/DNAT

2017-08-10 Thread Anand Kumar
issue by not modifying icmp_id field during SNAT/DNAT only for ICMP traffic The current NAT module doesn't take the ICMP type/id/code into account during the lookups. Fix this to make it similar with the other conntrack module. Signed-off-by: Anand Kumar --- datapath-windows/ovsext/Conntrack-

[ovs-dev] [PATCH] datapath-windows: Update ICMP-Type and Code comparison in CT lookup

2017-08-11 Thread Anand Kumar
- Update the CT comparison function to compare individual fields instead of NdisEqualMemory. - Add in some padding for the ct_endpoint's union. - Update the Orig Tuple to use ICMP Type and Code instead of Port for ICMP Co-authored-by: Sairam Venugopal Signed-off-by: Anand Kumar --- dat

Re: [ovs-dev] [PATCH] datapath-windows: Do not modify port field for ICMP during SNAT/DNAT

2017-08-15 Thread Anand Kumar
Hi Alin, Thanks for reviewing the patch. Please find my responses inline. Will send out a v2 patch addressing the review comments. Thanks, Anand Kumar On 8/14/17, 8:14 PM, "Alin Serdean" wrote: We should revisit how we do hashes and compares over the 'OVS_CT_KEY&

Re: [ovs-dev] [PATCH] datapath-windows: Update ICMP-Type and Code comparison in CT lookup

2017-08-15 Thread Anand Kumar
Hi Alin, Thanks for the review. Please find my responses inline. Will address the review comments and send out v2 version of the patch. Thanks, Anand Kumar On 8/14/17, 8:04 PM, "Alin Serdean" wrote: Hi Sai and Anand, Thanks a lot for the patch. I have a few questions

  1   2   3   >