[ovs-dev] [PATCH] ovs-save: Parse geneve tlv map correctly.

Ben Pfaff blp at ovn.org
Mon Oct 8 18:12:27 UTC 2018


On Sun, Oct 07, 2018 at 09:53:15PM -0700, Gurucharan Shetty wrote:
> We now have an extra space in the o/p of `ovs-ofctl dump-tlv-map`.
> 
> Fixes: 5a0e4aec1af (treewide: Convert leading tabs to spaces.)
> Signed-off-by: Gurucharan Shetty <guru at ovn.org>
> ---
>  utilities/ovs-save | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utilities/ovs-save b/utilities/ovs-save
> index 5c046bb..f85d97a 100755
> --- a/utilities/ovs-save
> +++ b/utilities/ovs-save
> @@ -117,7 +117,7 @@ save_flows () {
>  
>          printf "%s" "ovs-ofctl add-tlv-map ${bridge} '"
>          ovs-ofctl dump-tlv-map ${bridge} | \
> -        awk '/^ 0x/ {if (cnt != 0) printf ","; \
> +        awk '/^  0x/ {if (cnt != 0) printf ","; \

It might be better to use /^  *0x/, because that will handle either
form.  ovs-save is used during upgrades so there's some ambiguity about
which version of ovs-ofctl is going to be used, and in general accepting
more flexible input is good.

Acked-by: Ben Pfaff <blp at ovn.org>

Thanks,

Ben.


More information about the dev mailing list