-----Original Message----- From: William Tu <u9012...@gmail.com> Sent: Wednesday, June 1, 2022 2:13 AM To: Ilya Maximets <i.maxim...@ovn.org> Cc: <d...@openvswitch.org> <d...@openvswitch.org>; Alin Gabriel Serdean <aserd...@ovn.org> Subject: Re: [ovs-dev] [PATCH] datapath-windows: Detect CT timeout.
On Tue, May 31, 2022 at 12:09 PM Ilya Maximets <i.maxim...@ovn.org> wrote: > > On 5/31/22 20:29, William Tu wrote: > > CT timeout is not supported in Windows datapath, but currently it > > incorrectly reports to ovs-vswitchd as supported blow > > "system@ovs-system: Datapath supports timeout policy in conntrack > > action". The patches detects it and returns not support. > > > > Cc: Alin-Gabriel Serdean <aserd...@ovn.org> > > Cc: Wilson Peng <pweis...@vmware.com> > > Signed-off-by: William Tu <u9012...@gmail.com> > > --- > > datapath-windows/ovsext/Conntrack.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/datapath-windows/ovsext/Conntrack.c > > b/datapath-windows/ovsext/Conntrack.c > > index 471bf961b..b33676cc1 100644 > > --- a/datapath-windows/ovsext/Conntrack.c > > +++ b/datapath-windows/ovsext/Conntrack.c > > @@ -1436,6 +1436,9 @@ OvsExecuteConntrackAction(OvsForwardingContext > > *fwdCtx, > > } > > } > > break; > > + case OVS_CT_ATTR_TIMEOUT: > > + return NDIS_STATUS_NOT_SUPPORTED; > > + break; > > 'break;' here should not be necessary, I guess. > > > default: > > OVS_LOG_TRACE("Invalid netlink attr type: %u", > > NlAttrType(ctAttr)); > > break; > > Similar to the other patch, shouldn't the return just be part of the > 'default' case instead of a 'break'. > Skipping unknown attributes doesn't seem correct. > Thanks for taking a look. yes, we should log it with the attribute info and return. [Alin] FWIW the skip is due to the fact that not all the actions were implemented and skipping those which we didn't knew what to do with them was the next best thing. That's the story behind it 😊. @William Tu We use to add code here OvsProbeSupportedFeature (https://github.com/openvswitch/ovs/blob/master/datapath-windows/ovsext/Flow.c#L3270-L3281) to probe features supported by the windows datapath. That returns an encapsulated netlink message back to vswitchd. Let me know if you me to write a patch for it. I think the controller today should probe datapath features in ovsdb (ex: ovs-vsctl list-dp-cap) and based on the result to program each ovs-vswitchd, on Windows or Linux. Unfortunately the "ovs-vsctl list-dp-cap" is also broken in Windows, I will fix it too. [Alin] I'm not familiar with that command. When was it added? Regards, William _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev