On 7/23/21 4:58 PM, Salvatore Daniele wrote:
> From: Adrian Moreno <[email protected]>
> 
> The match keyword "igmp" is not supported in ofp-parse, which means
> that flow dumps cannot be restored. Previously a workaround was
> added to ovs-save to avoid changing output in stable branches.
> 
> This patch changes the output to print igmp match in the accepted
> ofp-parse format (ip,nw_proto=2). Tests are added, and NEWS is
> updated to reflect this change.
> 
> The workaround in ovs-save is still included to ensure that flows
> can be restored when upgrading an older ovs-vswitchd. This workaround
> should be removed in later versions.
> 
> Signed-off-by: Adrian Moreno <[email protected]>
> Signed-off-by: Salvatore Daniele <[email protected]>
> Co-authored-by: Salvatore Daniele <[email protected]>
> Acked-by: Flavio Leitner <[email protected]>
> ---
>  NEWS               | 2 ++
>  lib/match.c        | 2 --
>  tests/ovs-ofctl.at | 6 ++++++
>  3 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/NEWS b/NEWS
> index 75045b67d..3d63fd136 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -90,6 +90,8 @@ v2.16.0 - xx xxx xxxx
>         space in order to resolve a number of issues with per-vport dispatch.
>       * New vswitchd unixctl command `dpif-netlink/dispatch-mode` will return
>         the current dispatch mode for each datapath.
> +   - ovs-ofctl dump-flows no longer prints "igmp". Instead the flag
> +       "ip,nw_proto=2" is used.
>  
>  
>  v2.15.0 - 15 Feb 2021
> diff --git a/lib/match.c b/lib/match.c
> index ba716579d..4a0778c30 100644
> --- a/lib/match.c
> +++ b/lib/match.c
> @@ -1556,8 +1556,6 @@ match_format(const struct match *match,
>                  skip_proto = true;
>                  if (f->nw_proto == IPPROTO_ICMP) {
>                      ds_put_format(s, "%sicmp%s,", colors.value, colors.end);
> -                } else if (f->nw_proto == IPPROTO_IGMP) {
> -                    ds_put_format(s, "%sigmp%s,", colors.value, colors.end);
>                  } else if (f->nw_proto == IPPROTO_TCP) {
>                      ds_put_format(s, "%stcp%s,", colors.value, colors.end);
>                  } else if (f->nw_proto == IPPROTO_UDP) {

Same question here.  This function prints 'igmp_type' and 'igmp_code' as well.
And I don't think that OVS is able to parse them.  Moreover, printing them
and not printing the 'igmp' type doesn't make much sense.  So, the printing
branch should, probably fall to the default case and print generic 'tp_src'
and 'tp_dst' instead.  Will that work?

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to