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.
Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev