Message ID | 1538974395-9691-1-git-send-email-guru@ovn.org |
---|---|
State | Accepted |
Commit | b2b3f8ce30b03673a8fbd6678a8aa431cc3b402c |
Headers | show |
Series | [ovs-dev] ovs-save: Parse geneve tlv map correctly. | expand |
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@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@ovn.org> Thanks, Ben.
On Mon, 8 Oct 2018 at 11:12, Ben Pfaff <blp@ovn.org> wrote: > 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@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@ovn.org> > You are right. I will use your suggestion and merge to master and 2.10 > > Thanks, > > Ben. >
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 ","; \ cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}' echo "'"
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@ovn.org> --- utilities/ovs-save | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)