Re: [ovs-dev] [PATCH 2/4] tests: Remove trim_zeros() from ovn tests.

2016-07-29 Thread Daniele Di Proietto





On 28/07/2016 22:22, "Ben Pfaff"  wrote:

>On Thu, Jul 28, 2016 at 07:58:04PM -0700, Daniele Di Proietto wrote:
>> trim_zeros() is not necessary anymore, since now we don't pad packets in
>> the userspace datapath.
>> 
>> Signed-off-by: Daniele Di Proietto 
>
>Oops, I just committed a patch that made a change related to trim_zeros,
>so you'll have to adjust this.  Sorry!  Still, I imagine that most of it was
>sed -e 's/| trim_zeros//' -i ovn.at

No problem, it made my patch simpler!

>
>Acked-by: Ben Pfaff 

Thanks for the reviews, I've pushed this to master
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH 2/4] tests: Remove trim_zeros() from ovn tests.

2016-07-28 Thread Ben Pfaff
On Thu, Jul 28, 2016 at 07:58:04PM -0700, Daniele Di Proietto wrote:
> trim_zeros() is not necessary anymore, since now we don't pad packets in
> the userspace datapath.
> 
> Signed-off-by: Daniele Di Proietto 

Oops, I just committed a patch that made a change related to trim_zeros,
so you'll have to adjust this.  Sorry!  Still, I imagine that most of it was
sed -e 's/| trim_zeros//' -i ovn.at

Acked-by: Ben Pfaff 


Thanks,

Ben.
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH 2/4] tests: Remove trim_zeros() from ovn tests.

2016-07-28 Thread Daniele Di Proietto
trim_zeros() is not necessary anymore, since now we don't pad packets in
the userspace datapath.

Signed-off-by: Daniele Di Proietto 
---
 tests/ovn.at | 135 +++
 1 file changed, 43 insertions(+), 92 deletions(-)

diff --git a/tests/ovn.at b/tests/ovn.at
index dfdd110..5761981 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -737,9 +737,6 @@ vif_to_hv() {
 # digits) and Ethernet type ETHTYPE (4 hex digits).  The OUTPORTs (zero or
 # more) list the VIFs on which the packet should be received.  INPORT and the
 # OUTPORTs are specified as logical switch port numbers, e.g. 11 for vif11.
-trim_zeros() {
-sed 's/\(00\)\{1,\}$//'
-}
 for i in 1 2 3; do
 for j in 1 2 3; do
 : > $i$j.expected
@@ -751,7 +748,7 @@ test_packet() {
 vif=vif$inport
 as $hv ovs-appctl netdev-dummy/receive $vif $packet
 for outport; do
-echo $packet | trim_zeros >> $outport.expected
+echo $packet >> $outport.expected
 done
 }
 
@@ -935,7 +932,7 @@ for i in 1 2 3; do
 for j in 1 2 3; do
 file=hv$i/vif$i$j-tx.pcap
 echo $file
-$PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file | trim_zeros > 
$i$j.packets
+$PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file > $i$j.packets
 sort $i$j.expected > expout
 AT_CHECK([sort $i$j.packets], [0], [expout])
 echo
@@ -1038,9 +1035,6 @@ vif_to_hv() {
 # digits) and Ethernet type ETHTYPE (4 hex digits).  The OUTPORTs (zero or
 # more) list the VIFs on which the packet should be received.  INPORT and the
 # OUTPORTs are specified as logical switch port numbers, e.g. 11 for vif11.
-trim_zeros() {
-sed 's/\(00\)\{1,\}$//'
-}
 for i in 1 2; do
 for j in 1 2 3 4 5; do
 : > $i$j.expected
@@ -1053,7 +1047,7 @@ test_packet() {
 vif=vif$inport
 as $hv ovs-appctl netdev-dummy/receive $vif $packet
 for outport; do
-echo $packet | trim_zeros >> $outport.expected
+echo $packet >> $outport.expected
 done
 }
 
@@ -1120,7 +1114,7 @@ for i in 1 2; do
 for j in 1 2 3 4 5; do
 file=hv$i/vif$i$j-tx.pcap
 echo $file
-$PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file | trim_zeros > 
$i$j.packets
+$PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file > $i$j.packets
 sort $i$j.expected > expout
 AT_CHECK([sort $i$j.packets], [0], [expout])
 echo
@@ -1223,9 +1217,6 @@ sleep 1
 # digits) and Ethernet type ETHTYPE (4 hex digits).  The OUTPORTs (zero or
 # more) list the VIFs on which the packet should be received.  INPORT and the
 # OUTPORTs are specified as logical switch port numbers, e.g. 1 for vif1.
-trim_zeros() {
-sed 's/\(00\)\{1,\}$//'
-}
 for i in 1 2 3; do
 : > $i.expected
 done
@@ -1236,7 +1227,7 @@ test_packet() {
 vif=vif$inport
 as $hv ovs-appctl netdev-dummy/receive $vif $packet
 for outport; do
-echo $packet | trim_zeros >> $outport.expected
+echo $packet >> $outport.expected
 done
 }
 
@@ -1302,7 +1293,7 @@ AT_CHECK([as hv3 ovs-ofctl -O OpenFlow13 show br-int], 
[1], [],
 for i in 1 2 3; do
 file=hv$i/vif$i-tx.pcap
 echo $file
-$PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file | trim_zeros > $i.packets
+$PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file > $i.packets
 sort $i.expected > expout
 AT_CHECK([sort $i.packets], [0], [expout])
 echo
@@ -1384,9 +1375,6 @@ sleep 1
 # digits) and Ethernet type ETHTYPE (4 hex digits).  The OUTPORTs (zero or
 # more) list the VIFs on which the packet should be received.  INPORT and the
 # OUTPORTs are specified as lport numbers, e.g. 1 for vif1.
-trim_zeros() {
-sed 's/\(00\)\{1,\}$//'
-}
 for i in 1 2 3; do
 : > $i.expected
 done
@@ -1397,7 +1385,7 @@ test_packet() {
 vif=vif$inport
 as $hv ovs-appctl netdev-dummy/receive $vif $packet
 for outport; do
-echo $packet | trim_zeros >> $outport.expected
+echo $packet >> $outport.expected
 done
 }
 
@@ -1468,7 +1456,7 @@ as hv3 ovs-ofctl -O OpenFlow13 dump-flows br-phys
 for i in 1 2 3; do
 file=hv$i/vif$i-tx.pcap
 echo $file
-$PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file | trim_zeros > $i.packets
+$PYTHON "$top_srcdir/utilities/ovs-pcap.in" $file > $i.packets
 sort $i.expected > expout
 AT_CHECK([sort $i.packets], [0], [expout])
 echo
@@ -1593,9 +1581,6 @@ sleep 1
 # digits) and Ethernet type ETHTYPE (4 hex digits).  The OUTPORTs (zero or
 # more) list the VIFs on which the packet should be received.  INPORT and the
 # OUTPORTs are specified as logical switch port numbers, e.g. 123 for vif123.
-trim_zeros() {
-sed 's/\(00\)\{1,\}$//'
-}
 for i in 1 2 3; do
 for j in 1 2 3; do
 for k in 1 2 3; do
@@ -1623,7 +1608,7 @@ test_ip() {
 # (and checksum).
 out_lrp=`vif_to_lrp $outport`
 echo