On Tue, May 31, 2022 at 12:06 PM Ilya Maximets <[email protected]> wrote: > > On 5/31/22 20:27, William Tu wrote: > > Truncate action is not supported in Windows datapath, but > > currently it incorrectly reports to ovs-vswitchd as supported blow > > "system@ovs-system: Datapath supports truncate action". > > The patches detects it and returns not support. > > > > Cc: Alin-Gabriel Serdean <[email protected]> > > Cc: Wilson Peng <[email protected]> > > Signed-off-by: William Tu <[email protected]> > > --- > > datapath-windows/ovsext/Actions.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/datapath-windows/ovsext/Actions.c > > b/datapath-windows/ovsext/Actions.c > > index 0f7f78932..3a5e71ee9 100644 > > --- a/datapath-windows/ovsext/Actions.c > > +++ b/datapath-windows/ovsext/Actions.c > > @@ -2502,6 +2502,11 @@ OvsDoExecuteActions(POVS_SWITCH_CONTEXT > > switchContext, > > } > > break; > > } > > + case OVS_ACTION_ATTR_TRUNC: > > + status = NDIS_STATUS_NOT_SUPPORTED; > > + dropReason = L"OVS-truncate action not supported"; > > + goto dropit; > > + break; > > Hmm. I don't know much about windows datapath, but shouldn't > this just be a behavior of the 'default' case? i.e.: > > default: > status = NDIS_STATUS_NOT_SUPPORTED; > dropReason = L"Unknown action"; // or generate the string > // dynamically with a number? > break; > > Current code seems to skip all the unknown actions. > That doesn't seem correct.
Thanks for taking a look and you're right. Current code simply skips if the action is not supported, and there is no warning/error message logged at all. Ideally ovs-vswitchd should detect the right action supported in datapath, and generate/translate the corresponding datapath flow from openflow flow. I will work on the next patch to drop the unsupported action. William _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
