From 5a0e4aec1af5cf7741c490bce704577e51e536b9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 25 May 2018 17:11:07 -0700 Subject: treewide: Convert leading tabs to spaces. It's always been OVS coding style to use spaces rather than tabs for indentation, but some tabs have snuck in over time. This commit converts them to spaces. Signed-off-by: Ben Pfaff Acked-by: Justin Pettit --- Documentation/faq/issues.rst | 4 +- Documentation/faq/vlan.rst | 2 +- Documentation/group-selection-method-property.txt | 2 +- Documentation/ref/ovs-sim.1.rst | 54 +- Documentation/tutorials/faucet.rst | 70 +- Documentation/tutorials/ovs-advanced.rst | 98 +- NEWS | 2 +- Vagrantfile | 18 +- debian/copyright.in | 136 +- debian/openvswitch-switch.README.Debian | 48 +- debian/openvswitch-switch.init | 30 +- debian/openvswitch-switch.logrotate | 6 +- debian/ovn-central.postinst | 16 +- debian/ovn-host.postinst | 16 +- include/openvswitch/rconn.h | 4 +- lib/dpif-netdev.c | 32 +- lib/dpif.c | 4 +- lib/meta-flow.xml | 2146 ++++++++++----------- lib/ofp-print.c | 8 +- ofproto/ofproto-dpif-ipfix.c | 2 +- ofproto/ofproto-dpif-sflow.c | 426 ++-- ofproto/ofproto-dpif-xlate.c | 2 +- ovn/utilities/ovn-detrace.in | 4 +- ovsdb/ovsdb-tool.c | 6 +- rhel/etc_init.d_openvswitch | 8 +- rhel/etc_sysconfig_network-scripts_ifdown-ovs | 52 +- rhel/etc_sysconfig_network-scripts_ifup-ovs | 338 ++-- rhel/openvswitch-fedora.spec.in | 32 +- rhel/openvswitch-kmod-rhel6.spec.in | 6 +- tests/bfd.at | 12 +- tests/cfm.at | 12 +- tests/classifier.at | 2 +- tests/dpif-netdev.at | 4 +- tests/interface-reconfigure.at | 1112 +++++------ tests/lacp.at | 12 +- tests/ofproto-dpif.at | 992 +++++----- tests/ofproto-macros.at | 12 +- tests/ofproto.at | 40 +- tests/ovn.at | 12 +- tests/ovs-macros.at | 4 +- tests/ovs-ofctl.at | 14 +- tests/ovs-router.at | 4 +- tests/ovsdb-client.at | 12 +- tests/ovsdb-cluster.at | 126 +- tests/ovsdb-condition.at | 6 +- tests/ovsdb-idl.at | 2 +- tests/ovsdb-log.at | 32 +- tests/ovsdb-monitor.at | 12 +- tests/ovsdb-mutation.at | 6 +- tests/ovsdb-query.at | 6 +- tests/ovsdb-row.at | 6 +- tests/ovsdb-schema.at | 22 +- tests/ovsdb-server.at | 170 +- tests/ovsdb-tool.at | 20 +- tests/pmd.at | 92 +- tests/run-oftest | 10 +- tests/run-ryu | 6 +- tests/test-lib.c | 2 +- tests/test-sflow.c | 120 +- tests/tunnel.at | 26 +- tutorial/ovs-sandbox | 12 +- utilities/bugtool/ovs-bugtool-tc-class-show | 6 +- utilities/nlmon.c | 8 +- utilities/ovs-ctl.in | 2 +- utilities/ovs-sim.in | 202 +- vswitchd/bridge.c | 10 +- vswitchd/vswitch.ovsschema | 20 +- vswitchd/vswitch.xml | 2 +- xenserver/openvswitch-xen.spec.in | 2 +- 69 files changed, 3372 insertions(+), 3372 deletions(-) diff --git a/Documentation/faq/issues.rst b/Documentation/faq/issues.rst index f26eebd0d..8a30dad37 100644 --- a/Documentation/faq/issues.rst +++ b/Documentation/faq/issues.rst @@ -301,14 +301,14 @@ network, but it doesn't work. Why not? $ ovs-vsctl add-br br0 $ ovs-vsctl add-port br0 int0 -- set Interface int0 type=internal - $ ip addr add 192.168.0.123/24 dev int0 + $ ip addr add 192.168.0.123/24 dev int0 $ ip link set int0 up Even more simply, you can take advantage of the internal port that every bridge has under the name of the bridge:: $ ovs-vsctl add-br br0 - $ ip addr add 192.168.0.123/24 dev br0 + $ ip addr add 192.168.0.123/24 dev br0 $ ip link set br0 up In more detail, a "tap" device is an interface between the Linux (or BSD) diff --git a/Documentation/faq/vlan.rst b/Documentation/faq/vlan.rst index 991bb3d4c..13d3cde45 100644 --- a/Documentation/faq/vlan.rst +++ b/Documentation/faq/vlan.rst @@ -190,7 +190,7 @@ Q: Can I configure an IP address on a VLAN? $ ovs-vsctl add-port br0 eth0 $ ovs-vsctl add-port br0 vlan9 tag=9 \ -- set interface vlan9 type=internal - $ ip addr add 192.168.0.7/24 dev vlan9 + $ ip addr add 192.168.0.7/24 dev vlan9 $ ip link set vlan0 up See also the following question. diff --git a/Documentation/group-selection-method-property.txt b/Documentation/group-selection-method-property.txt index 5320f24b4..29e8249af 100644 --- a/Documentation/group-selection-method-property.txt +++ b/Documentation/group-selection-method-property.txt @@ -56,7 +56,7 @@ NTR_VENDOR_ID = 0x0000154d The following group property experimenter type defined by this extension. enum ntr_group_mod_subtype { - NTRT_SELECTION_METHOD = 1, + NTRT_SELECTION_METHOD = 1, }; diff --git a/Documentation/ref/ovs-sim.1.rst b/Documentation/ref/ovs-sim.1.rst index 51a415fba..4382598e1 100644 --- a/Documentation/ref/ovs-sim.1.rst +++ b/Documentation/ref/ovs-sim.1.rst @@ -95,9 +95,9 @@ instances. The new sandbox starts out without any bridges. Use ``ovs-vsctl`` in the context of the new sandbox to create a bridge, e.g.:: - sim_add hv0 # Create sandbox hv0. - as hv0 # Set hv0 as default sandbox. - ovs-vsctl add-br br0 # Add bridge br0 inside hv0. + sim_add hv0 # Create sandbox hv0. + as hv0 # Set hv0 as default sandbox. + ovs-vsctl add-br br0 # Add bridge br0 inside hv0. The Open vSwitch instances that ``sim_add`` creates enable ``dummy`` devices. This means that bridges and interfaces can be @@ -191,9 +191,9 @@ one, and then connects the two through an interconnection network net_add n1 for i in 0 1; do - sim_add hv$i - as hv$i ovs-vsctl add-br br0 -- add-port br0 vif$i - as hv$i net_attach n1 br0 + sim_add hv$i + as hv$i ovs-vsctl add-br br0 -- add-port br0 vif$i + as hv$i net_attach n1 br0 done Here’s an extended version that also starts OVN:: @@ -202,13 +202,13 @@ Here’s an extended version that also starts OVN:: ovn-nbctl ls-add lsw0 net_add n1 for i in 0 1; do - sim_add hv$i - as hv$i - ovs-vsctl add-br br-phys - ovn_attach n1 br-phys 192.168.0.`expr $i + 1` - ovs-vsctl add-port br-int vif$i -- set Interface vif$i external-ids:iface-id=lp$i - ovn-nbctl lsp-add lsw0 lp$i - ovn-nbctl lsp-set-addresses lp$i f0:00:00:00:00:0$i + sim_add hv$i + as hv$i + ovs-vsctl add-br br-phys + ovn_attach n1 br-phys 192.168.0.`expr $i + 1` + ovs-vsctl add-port br-int vif$i -- set Interface vif$i external-ids:iface-id=lp$i + ovn-nbctl lsp-add lsw0 lp$i + ovn-nbctl lsp-set-addresses lp$i f0:00:00:00:00:0$i done Here’s a primitive OVN "scale test" (adjust the scale by changing @@ -219,23 +219,23 @@ Here’s a primitive OVN "scale test" (adjust the scale by changing net_add n1 ovn-nbctl ls-add br0 for i in `seq $n`; do - (sim_add hv$i - as hv$i - ovs-vsctl add-br br-phys - y=$(expr $i / 256) - x=$(expr $i % 256) - ovn_attach n1 br-phys 192.168.$y.$x - ovs-vsctl add-port br-int vif$i -- set Interface vif$i external-ids:iface-id=lp$i) & - case $i in - *50|*00) echo $i; wait ;; - esac + (sim_add hv$i + as hv$i + ovs-vsctl add-br br-phys + y=$(expr $i / 256) + x=$(expr $i % 256) + ovn_attach n1 br-phys 192.168.$y.$x + ovs-vsctl add-port br-int vif$i -- set Interface vif$i external-ids:iface-id=lp$i) & + case $i in + *50|*00) echo $i; wait ;; + esac done wait for i in `seq $n`; do - yy=$(printf %02x $(expr $i / 256)) - xx=$(printf $02x $(expr $i % 256)) - ovn-nbctl lsp-add br0 lp$i - ovn-nbctl lsp-set-addresses lp$i f0:00:00:00:$yy:$xx + yy=$(printf %02x $(expr $i / 256)) + xx=$(printf $02x $(expr $i % 256)) + ovn-nbctl lsp-add br0 lp$i + ovn-nbctl lsp-set-addresses lp$i f0:00:00:00:$yy:$xx done When the scale test has finished initializing, you can watch the diff --git a/Documentation/tutorials/faucet.rst b/Documentation/tutorials/faucet.rst index aaaffe769..9696dfd02 100644 --- a/Documentation/tutorials/faucet.rst +++ b/Documentation/tutorials/faucet.rst @@ -302,14 +302,14 @@ information, run ``man ovs-vswitchd.conf.db`` and search for ``connection_mode``):: $ ovs-vsctl add-br br0 \ - -- set bridge br0 other-config:datapath-id=0000000000000001 \ - -- add-port br0 p1 -- set interface p1 ofport_request=1 \ - -- add-port br0 p2 -- set interface p2 ofport_request=2 \ - -- add-port br0 p3 -- set interface p3 ofport_request=3 \ - -- add-port br0 p4 -- set interface p4 ofport_request=4 \ - -- add-port br0 p5 -- set interface p5 ofport_request=5 \ - -- set-controller br0 tcp:127.0.0.1:6653 \ - -- set controller br0 connection-mode=out-of-band + -- set bridge br0 other-config:datapath-id=0000000000000001 \ + -- add-port br0 p1 -- set interface p1 ofport_request=1 \ + -- add-port br0 p2 -- set interface p2 ofport_request=2 \ + -- add-port br0 p3 -- set interface p3 ofport_request=3 \ + -- add-port br0 p4 -- set interface p4 ofport_request=4 \ + -- add-port br0 p5 -- set interface p5 ofport_request=5 \ + -- set-controller br0 tcp:127.0.0.1:6653 \ + -- set controller br0 connection-mode=out-of-band .. note:: @@ -1290,40 +1290,40 @@ the ways that OVS tries to optimize megaflows. Update dps: switch-1: - dp_id: 0x1 - timeout: 3600 - arp_neighbor_timeout: 3600 - interfaces: - 1: - native_vlan: 100 - acl_in: 1 - 2: - native_vlan: 100 - 3: - native_vlan: 100 - 4: - native_vlan: 200 - 5: - native_vlan: 200 + dp_id: 0x1 + timeout: 3600 + arp_neighbor_timeout: 3600 + interfaces: + 1: + native_vlan: 100 + acl_in: 1 + 2: + native_vlan: 100 + 3: + native_vlan: 100 + 4: + native_vlan: 200 + 5: + native_vlan: 200 vlans: 100: - faucet_vips: ["10.100.0.254/24"] + faucet_vips: ["10.100.0.254/24"] 200: - faucet_vips: ["10.200.0.254/24"] + faucet_vips: ["10.200.0.254/24"] routers: router-1: - vlans: [100, 200] + vlans: [100, 200] acls: 1: - - rule: - dl_type: 0x800 - nw_proto: 6 - tcp_dst: 8080 - actions: - allow: 0 - - rule: - actions: - allow: 1 + - rule: + dl_type: 0x800 + nw_proto: 6 + tcp_dst: 8080 + actions: + allow: 0 + - rule: + actions: + allow: 1 Then restart Faucet:: diff --git a/Documentation/tutorials/ovs-advanced.rst b/Documentation/tutorials/ovs-advanced.rst index db8a53ebc..fa9fdc7bf 100644 --- a/Documentation/tutorials/ovs-advanced.rst +++ b/Documentation/tutorials/ovs-advanced.rst @@ -337,7 +337,7 @@ The output should look something like this:: bridge("br0") ------------- 0. dl_dst=01:80:c2:00:00:00/ff:ff:ff:ff:ff:f0, priority 32768 - drop + drop Final flow: unchanged Megaflow: recirc_id=0,in_port=1,dl_src=00:00:00:00:00:00/01:00:00:00:00:00,dl_dst=01:80:c2:00:00:00/ff:ff:ff:ff:ff:f0,dl_type=0x0000 @@ -370,9 +370,9 @@ The output should be:: bridge("br0") ------------- 0. priority 0 - resubmit(,1) + resubmit(,1) 1. No match. - drop + drop Final flow: unchanged Megaflow: recirc_id=0,in_port=1,dl_src=00:00:00:00:00:00/01:00:00:00:00:00,dl_dst=01:80:c2:00:00:10/ff:ff:ff:ff:ff:f0,dl_type=0x0000 @@ -450,11 +450,11 @@ yet):: bridge("br0") ------------- 0. priority 0 - resubmit(,1) + resubmit(,1) 1. in_port=1, priority 99 - resubmit(,2) + resubmit(,2) 2. No match. - drop + drop Final flow: unchanged Megaflow: recirc_id=0,in_port=1,dl_src=00:00:00:00:00:00/01:00:00:00:00:00,dl_dst=00:00:00:00:00:00/ff:ff:ff:ff:ff:f0,dl_type=0x0000 @@ -477,12 +477,12 @@ table 2:: bridge("br0") ------------- 0. priority 0 - resubmit(,1) + resubmit(,1) 1. in_port=2,vlan_tci=0x0000, priority 99 - mod_vlan_vid:20 - resubmit(,2) + mod_vlan_vid:20 + resubmit(,2) 2. No match. - drop + drop Final flow: in_port=2,dl_vlan=20,dl_vlan_pcp=0,dl_src=00:00:00:00:00:00,dl_dst=00:00:00:00:00:00,dl_type=0x0000 Megaflow: recirc_id=0,in_port=2,vlan_tci=0x0000,dl_src=00:00:00:00:00:00/01:00:00:00:00:00,dl_dst=00:00:00:00:00:00/ff:ff:ff:ff:ff:f0,dl_type=0x0000 @@ -503,9 +503,9 @@ The output shows the packet matching the default drop flow:: bridge("br0") ------------- 0. priority 0 - resubmit(,1) + resubmit(,1) 1. priority 0 - drop + drop Final flow: unchanged Megaflow: recirc_id=0,in_port=2,vlan_tci=0x0005,dl_src=00:00:00:00:00:00/01:00:00:00:00:00,dl_dst=00:00:00:00:00:00/ff:ff:ff:ff:ff:f0,dl_type=0x0000 @@ -584,15 +584,15 @@ particular flow that was added:: bridge("br0") ------------- 0. priority 0 - resubmit(,1) + resubmit(,1) 1. in_port=1, priority 99 - resubmit(,2) + resubmit(,2) 2. priority 32768 - learn(table=10,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG0[0..15]) - -> table=10 vlan_tci=0x0014/0x0fff,dl_dst=50:00:00:00:00:01 priority=32768 actions=load:0x1->NXM_NX_REG0[0..15] - resubmit(,3) + learn(table=10,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG0[0..15]) + -> table=10 vlan_tci=0x0014/0x0fff,dl_dst=50:00:00:00:00:01 priority=32768 actions=load:0x1->NXM_NX_REG0[0..15] + resubmit(,3) 3. No match. - drop + drop Final flow: unchanged Megaflow: recirc_id=0,in_port=1,vlan_tci=0x0014/0x1fff,dl_src=50:00:00:00:00:01,dl_dst=00:00:00:00:00:00/ff:ff:ff:ff:ff:f0,dl_type=0x0000 @@ -694,20 +694,20 @@ table 10) that the flow's destination was unknown:: bridge("br0") ------------- 0. priority 0 - resubmit(,1) + resubmit(,1) 1. in_port=1, priority 99 - resubmit(,2) + resubmit(,2) 2. priority 32768 - learn(table=10,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG0[0..15]) - -> table=10 vlan_tci=0x0014/0x0fff,dl_dst=f0:00:00:00:00:01 priority=32768 actions=load:0x1->NXM_NX_REG0[0..15] - resubmit(,3) + learn(table=10,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG0[0..15]) + -> table=10 vlan_tci=0x0014/0x0fff,dl_dst=f0:00:00:00:00:01 priority=32768 actions=load:0x1->NXM_NX_REG0[0..15] + resubmit(,3) 3. priority 50 - resubmit(,10) - 10. No match. - drop - resubmit(,4) + resubmit(,10) + 10. No match. + drop + resubmit(,4) 4. No match. - drop + drop Final flow: unchanged Megaflow: recirc_id=0,in_port=1,dl_vlan=20,dl_src=f0:00:00:00:00:01,dl_dst=90:00:00:00:00:01,dl_type=0x0000 @@ -745,21 +745,21 @@ the learned port ``p1`` into register ``0``:: bridge("br0") ------------- 0. priority 0 - resubmit(,1) + resubmit(,1) 1. in_port=2,vlan_tci=0x0000, priority 99 - mod_vlan_vid:20 - resubmit(,2) + mod_vlan_vid:20 + resubmit(,2) 2. priority 32768 - learn(table=10,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG0[0..15]) - -> table=10 vlan_tci=0x0014/0x0fff,dl_dst=90:00:00:00:00:01 priority=32768 actions=load:0x2->NXM_NX_REG0[0..15] - resubmit(,3) + learn(table=10,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG0[0..15]) + -> table=10 vlan_tci=0x0014/0x0fff,dl_dst=90:00:00:00:00:01 priority=32768 actions=load:0x2->NXM_NX_REG0[0..15] + resubmit(,3) 3. priority 50 - resubmit(,10) - 10. vlan_tci=0x0014/0x0fff,dl_dst=f0:00:00:00:00:01, priority 32768 - load:0x1->NXM_NX_REG0[0..15] - resubmit(,4) + resubmit(,10) + 10. vlan_tci=0x0014/0x0fff,dl_dst=f0:00:00:00:00:01, priority 32768 + load:0x1->NXM_NX_REG0[0..15] + resubmit(,4) 4. No match. - drop + drop Final flow: reg0=0x1,in_port=2,dl_vlan=20,dl_vlan_pcp=0,dl_src=90:00:00:00:00:01,dl_dst=f0:00:00:00:00:01,dl_type=0x0000 Megaflow: recirc_id=0,in_port=2,vlan_tci=0x0000,dl_src=90:00:00:00:00:01,dl_dst=f0:00:00:00:00:01,dl_type=0x0000 @@ -781,20 +781,20 @@ executed in table 10, that the destination has now been learned:: bridge("br0") ------------- 0. priority 0 - resubmit(,1) + resubmit(,1) 1. in_port=1, priority 99 - resubmit(,2) + resubmit(,2) 2. priority 32768 - learn(table=10,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG0[0..15]) - -> table=10 vlan_tci=0x0014/0x0fff,dl_dst=f0:00:00:00:00:01 priority=32768 actions=load:0x1->NXM_NX_REG0[0..15] - resubmit(,3) + learn(table=10,NXM_OF_VLAN_TCI[0..11],NXM_OF_ETH_DST[]=NXM_OF_ETH_SRC[],load:NXM_OF_IN_PORT[]->NXM_NX_REG0[0..15]) + -> table=10 vlan_tci=0x0014/0x0fff,dl_dst=f0:00:00:00:00:01 priority=32768 actions=load:0x1->NXM_NX_REG0[0..15] + resubmit(,3) 3. priority 50 - resubmit(,10) - 10. vlan_tci=0x0014/0x0fff,dl_dst=90:00:00:00:00:01, priority 32768 - load:0x2->NXM_NX_REG0[0..15] - resubmit(,4) + resubmit(,10) + 10. vlan_tci=0x0014/0x0fff,dl_dst=90:00:00:00:00:01, priority 32768 + load:0x2->NXM_NX_REG0[0..15] + resubmit(,4) 4. No match. - drop + drop Implementing Table 4: Output Processing diff --git a/NEWS b/NEWS index 484c6dc3d..7f6589a46 100644 --- a/NEWS +++ b/NEWS @@ -933,7 +933,7 @@ v1.8.0 - 26 Feb 2013 were allowed.) - Allow support for arbitrary Ethernet masks. (Previously, only the multicast bit in the destination address could be individually - masked.) + masked.) - New field OXM_OF_METADATA, to align with OpenFlow 1.1. - The OFPST_QUEUE request now reports an error if a specified port or queue does not exist, or for requests for a specific queue on all diff --git a/Vagrantfile b/Vagrantfile index 28e9219b8..0192f66ea 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -20,15 +20,15 @@ $bootstrap_debian = <