Re: [ovs-dev] [patch_v4 4/6] Unset CS_NEW for established connections.

2017-02-07 Thread Darrell Ball


On 1/27/17, 5:57 PM, "ovs-dev-boun...@openvswitch.org on behalf of Daniele Di 
Proietto"  
wrote:

2017-01-24 20:40 GMT-08:00 Darrell Ball :
> Signed-off-by: Darrell Ball 
> ---
>  lib/conntrack.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/conntrack.c b/lib/conntrack.c
> index 34728a6..aaecb00 100644
> --- a/lib/conntrack.c
> +++ b/lib/conntrack.c
> @@ -443,6 +443,7 @@ conn_update_state(struct conntrack *ct, struct 
dp_packet *pkt,
>  switch (res) {
>  case CT_UPDATE_VALID:
>  *state |= CS_ESTABLISHED;
> +*state &= ~CS_NEW;

Maybe I'm missing something, but can *state be !=0 at this point?

Oops
This was part of an  change that was partially lost in a snapshot.
It has a theoretical impact for NAT and also simplifies the code by removing 
the separate
state variable.
I ended up recovering the full change, but folded it in to the previous patch.


>  if (ctx->reply) {
>  *state |= CS_REPLY_DIR;
>  }
> --
> 1.9.1
>
> ___
> dev mailing list
> d...@openvswitch.org
> 
https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev=DwICAg=uilaK90D4TOVoH58JNXRgQ=BVhFA09CGX7JQ5Ih-uZnsw=Zuz9hdr8jIP3kNwO5WNr3uvKPbYeZfj2QCXIFpf48OQ=F-gXytKhymeMT8jAULQODbb9f2H0N0yLwapNTC7lKJA=
 
___
dev mailing list
d...@openvswitch.org

https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev=DwICAg=uilaK90D4TOVoH58JNXRgQ=BVhFA09CGX7JQ5Ih-uZnsw=Zuz9hdr8jIP3kNwO5WNr3uvKPbYeZfj2QCXIFpf48OQ=F-gXytKhymeMT8jAULQODbb9f2H0N0yLwapNTC7lKJA=
 


___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [patch_v4 4/6] Unset CS_NEW for established connections.

2017-01-27 Thread Daniele Di Proietto
2017-01-24 20:40 GMT-08:00 Darrell Ball :
> Signed-off-by: Darrell Ball 
> ---
>  lib/conntrack.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/conntrack.c b/lib/conntrack.c
> index 34728a6..aaecb00 100644
> --- a/lib/conntrack.c
> +++ b/lib/conntrack.c
> @@ -443,6 +443,7 @@ conn_update_state(struct conntrack *ct, struct dp_packet 
> *pkt,
>  switch (res) {
>  case CT_UPDATE_VALID:
>  *state |= CS_ESTABLISHED;
> +*state &= ~CS_NEW;

Maybe I'm missing something, but can *state be !=0 at this point?

>  if (ctx->reply) {
>  *state |= CS_REPLY_DIR;
>  }
> --
> 1.9.1
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [patch_v4 4/6] Unset CS_NEW for established connections.

2017-01-24 Thread Darrell Ball
Signed-off-by: Darrell Ball 
---
 lib/conntrack.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/conntrack.c b/lib/conntrack.c
index 34728a6..aaecb00 100644
--- a/lib/conntrack.c
+++ b/lib/conntrack.c
@@ -443,6 +443,7 @@ conn_update_state(struct conntrack *ct, struct dp_packet 
*pkt,
 switch (res) {
 case CT_UPDATE_VALID:
 *state |= CS_ESTABLISHED;
+*state &= ~CS_NEW;
 if (ctx->reply) {
 *state |= CS_REPLY_DIR;
 }
-- 
1.9.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev