Thanks, Darrel, for the quick patch. 
I have one major concern (see below).

> >     This code doesn't care across packets.  It simply always sets
> >     CS_ESTABLISHED and CS_REPLY_DIR when ctx->reply is true.
> >
> >     Did I misunderstand something?
> >
> > There are Two separate ‘if’ conditions, (
> > The second ‘if’ condition gets executed whether the present packet is a 
> > reply or not.
> > Think about it.
> 
> I guess I confused myself.  My original point was unclear.  I was
> considering that you would add something like ->status, which was a bitset
> for the connection, and then be able to track many different conditions
> (not just reply_seen, but for possible future expansion).
> 
> I think your answer...
> 
> > I have patch to convert flags to a bitarray but that is for later and
> > there are other considerations,
> > so I deferred it.
> 
> ...does address that.  If that's the case, I'm okay.

I'm not convinced the generic struct conn should have a reply_seen state that 
governs whether the connection is considered established or not, no matter if 
encoded as boolean or bit in a bitarray.

I my view this is protocol specific and should be derived from connection state 
already maintained in the specific connection structs conn_tcp, conn_icmp and 
conn_other. Why should we duplicate this state? 

The simple reply_seen logic is OK for icmp and udp (other) but only a crude 
approximation of the actual conn_tcp behavior. It might treat a tcp connection 
as established at the first "reply" packet even if that was not a valid Syn-Ack 
packet according to conn_tcp. And future protocols like sctp might have yet 
other rules for treating a connection as established.

Please consider to change this and base the packet's established state on the 
state of the actual connection after the xxx_conn_update(). The 
xxx_conn_update() functions could return not only if the packet belongs to a 
valid connection but also if the connection is "established" or not.

BR, Jan
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to