AT_CHECK([ovs-ofctl -O OpenFlow12 add-flow br0 'ip actions=write_actions(group:1234)'])
AT_CHECK([ovs-appctl ofproto/trace br0 'in_port=1,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:07,dl_type=0x0800,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_proto=1,nw_tos=0,nw_ttl=128,icmp_type=8,icmp_code=0'], [0], [stdout])
AT_CHECK([tail -1 stdout], [0],
- [Datapath actions: drop
+ [Datapath actions: 10
])
OVS_VSWITCHD_STOP
AT_CLEANUP
AT_CHECK([strip_metadata < ofctl_monitor.log], [0], [dnl
NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
+tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
dnl
NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
+tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
dnl
NXT_PACKET_IN (xid=0x0): cookie=0xd total_len=58 in_port=1 (via action) data_len=58 (unbuffered)
-tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.255.255,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7745
+tcp,vlan_tci=0x0000,dl_src=60:66:66:66:00:06,dl_dst=50:54:00:00:00:07,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=255,tp_src=80,tp_dst=0,tcp_flags=0 tcp_csum:7744
])
AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])
type=6
ifspeed=100000000
direction=0
- status=0
+ status=3
in_octets=202
in_unicasts=3
in_multicasts=4294967295
type=6
ifspeed=100000000
direction=0
- status=0
+ status=3
in_octets=148
in_unicasts=2
in_multicasts=4294967295
type=6
ifspeed=100000000
direction=0
- status=0
+ status=3
in_octets=0
in_unicasts=0
in_multicasts=4294967295
type=6
ifspeed=100000000
direction=0
- status=0
+ status=3
in_octets=0
in_unicasts=0
in_multicasts=4294967295
type=6
ifspeed=100000000
direction=0
- status=0
+ status=3
in_octets=202
in_unicasts=3
in_multicasts=4294967295
type=6
ifspeed=100000000
direction=0
- status=0
+ status=3
in_octets=148
in_unicasts=2
in_multicasts=4294967295
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
LOCAL(br0): addr:aa:55:aa:55:00:00
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
])
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
1(p1): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
speed: 0 Mbps now, 0 Mbps max
99(p2): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
speed: 0 Mbps now, 0 Mbps max
LOCAL(br0): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
])
AT_CHECK([strip_xids < stdout], [0], [dnl
OFPST_PORT_DESC reply:
LOCAL(br0): addr:aa:55:aa:55:00:00
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
speed: 0 Mbps now, 0 Mbps max
])
OVS_VSWITCHD_STOP
AT_CHECK([strip_xids < stdout], [0], [dnl
OFPST_PORT_DESC reply (OF1.2):
LOCAL(br0): addr:aa:55:aa:55:00:00
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
])
OVS_VSWITCHD_STOP
AT_CHECK([strip_xids < stdout | sed 's/00:0./00:0x/'], [0], [dnl
OFPST_PORT_DESC reply (OF1.5):
1(p1): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
2(p2): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
3(p3): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
LOCAL(br0): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
])
AT_CHECK([ovs-ofctl -F OXM-OpenFlow15 -O OpenFlow15 -vwarn dump-ports-desc br0 2], [0], [stdout])
AT_CHECK([strip_xids < stdout | sed 's/00:0./00:0x/'], [0], [dnl
OFPST_PORT_DESC reply (OF1.5):
2(p2): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
])
OVS_VSWITCHD_STOP
AT_CHECK([strip_xids < stdout | sed 's/00:0./00:0x/'], [0], [dnl
OFPST_PORT_DESC reply (OF1.6):
1(p1): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
2(p2): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
3(p3): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
LOCAL(br0): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
])
AT_CHECK([ovs-ofctl -F OXM-OpenFlow16 -O OpenFlow16 -vwarn dump-ports-desc br0 2], [0], [stdout])
AT_CHECK([strip_xids < stdout | sed 's/00:0./00:0x/'], [0], [dnl
OFPST_PORT_DESC reply (OF1.6):
2(p2): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max
])
OVS_VSWITCHD_STOP
for command_config_state in \
'up 0 0' \
'noflood NO_FLOOD 0' \
- 'down PORT_DOWN,NO_FLOOD LINK_DOWN' \
- 'flood PORT_DOWN LINK_DOWN' \
- 'no-receive PORT_DOWN,NO_RECV LINK_DOWN' \
- 'no-forward PORT_DOWN,NO_RECV,NO_FWD LINK_DOWN' \
- 'no-packet-in PORT_DOWN,NO_RECV,NO_FWD,NO_PACKET_IN LINK_DOWN' \
- 'forward PORT_DOWN,NO_RECV,NO_PACKET_IN LINK_DOWN' \
- 'packet-in PORT_DOWN,NO_RECV LINK_DOWN' \
+ 'flood 0 0' \
+ 'no-receive NO_RECV 0' \
+ 'no-forward NO_RECV,NO_FWD 0' \
+ 'no-packet-in NO_RECV,NO_FWD,NO_PACKET_IN 0' \
+ 'forward NO_RECV,NO_PACKET_IN 0' \
+ 'packet-in NO_RECV 0' \
'up NO_RECV 0' \
- 'receive 0 0'
+ 'receive 0 0' \
+ 'down PORT_DOWN LINK_DOWN'
do
+ printf '\n--- %s --- \n\n' "$command_config_state"
set $command_config_state
command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
AT_CHECK([ovs-ofctl -vwarn mod-port br0 br0 $command])
OVS_VSWITCHD_START
for command_config_state in \
'up 0 LIVE' \
- 'down PORT_DOWN LINK_DOWN' \
- 'no-receive PORT_DOWN,NO_RECV LINK_DOWN' \
- 'no-forward PORT_DOWN,NO_RECV,NO_FWD LINK_DOWN' \
- 'no-packet-in PORT_DOWN,NO_RECV,NO_FWD,NO_PACKET_IN LINK_DOWN' \
- 'forward PORT_DOWN,NO_RECV,NO_PACKET_IN LINK_DOWN' \
- 'packet-in PORT_DOWN,NO_RECV LINK_DOWN' \
+ 'no-receive NO_RECV LIVE' \
+ 'no-forward NO_RECV,NO_FWD LIVE' \
+ 'no-packet-in NO_RECV,NO_FWD,NO_PACKET_IN LIVE' \
+ 'forward NO_RECV,NO_PACKET_IN LIVE' \
+ 'packet-in NO_RECV LIVE' \
'up NO_RECV LIVE' \
- 'receive 0 LIVE'
+ 'receive 0 LIVE' \
+ 'down PORT_DOWN LINK_DOWN'
do
+ printf '\n--- %s --- \n\n' "$command_config_state"
set $command_config_state
command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
AT_CHECK([ovs-ofctl -O OpenFlow12 -vwarn mod-port br0 br0 $command])
OVS_VSWITCHD_START
for command_config_state in \
'up 0 LIVE' \
- 'down PORT_DOWN LINK_DOWN' \
- 'no-receive PORT_DOWN,NO_RECV LINK_DOWN' \
- 'no-forward PORT_DOWN,NO_RECV,NO_FWD LINK_DOWN' \
- 'no-packet-in PORT_DOWN,NO_RECV,NO_FWD,NO_PACKET_IN LINK_DOWN' \
- 'forward PORT_DOWN,NO_RECV,NO_PACKET_IN LINK_DOWN' \
- 'packet-in PORT_DOWN,NO_RECV LINK_DOWN' \
+ 'no-receive NO_RECV LIVE' \
+ 'no-forward NO_RECV,NO_FWD LIVE' \
+ 'no-packet-in NO_RECV,NO_FWD,NO_PACKET_IN LIVE' \
+ 'forward NO_RECV,NO_PACKET_IN LIVE' \
+ 'packet-in NO_RECV LIVE' \
'up NO_RECV LIVE' \
- 'receive 0 LIVE'
+ 'receive 0 LIVE' \
+ 'down PORT_DOWN LINK_DOWN'
do
+ printf '\n--- %s --- \n\n' "$command_config_state"
set $command_config_state
command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
AT_CHECK([ovs-ofctl -O OpenFlow14 -vwarn mod-port br0 br0 $command])
OVS_VSWITCHD_START
for command_config_state in \
'up 0 LIVE' \
- 'down PORT_DOWN LINK_DOWN' \
- 'no-receive PORT_DOWN,NO_RECV LINK_DOWN' \
- 'no-forward PORT_DOWN,NO_RECV,NO_FWD LINK_DOWN' \
- 'no-packet-in PORT_DOWN,NO_RECV,NO_FWD,NO_PACKET_IN LINK_DOWN' \
- 'forward PORT_DOWN,NO_RECV,NO_PACKET_IN LINK_DOWN' \
- 'packet-in PORT_DOWN,NO_RECV LINK_DOWN' \
+ 'no-receive NO_RECV LIVE' \
+ 'no-forward NO_RECV,NO_FWD LIVE' \
+ 'no-packet-in NO_RECV,NO_FWD,NO_PACKET_IN LIVE' \
+ 'forward NO_RECV,NO_PACKET_IN LIVE' \
+ 'packet-in NO_RECV LIVE' \
'up NO_RECV LIVE' \
- 'receive 0 LIVE'
+ 'receive 0 LIVE' \
+ 'down PORT_DOWN LINK_DOWN'
do
+ printf '\n--- %s --- \n\n' "$command_config_state"
set $command_config_state
command=$[1] config=`echo $[2] | sed 's/,/ /g'` state=$[3]
AT_CHECK([ovs-ofctl -O OpenFlow16 -vwarn mod-port br0 br0 $command])
AT_CLEANUP
AT_SETUP([ofproto - asynchronous message control (OpenFlow 1.0)])
-OVS_VSWITCHD_START
+OVS_VSWITCHD_START([set bridge br0 other_config:hwaddr=00:01:02:03:04:05])
AT_CHECK([ovs-ofctl -P standard monitor br0 --detach --no-chdir --pidfile])
check_async () {
printf '\n\n--- check_async %d ---\n\n\n' $1
ovs-vsctl add-port br0 test -- set Interface test type=dummy ofport_request=1
if test X"$1" = X"OFPPR_ADD"; then shift;
echo >>expout "OFPT_PORT_STATUS: ADD: 1(test): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl del-port br0 test
if test X"$1" = X"OFPPR_DELETE"; then shift;
echo >>expout "OFPT_PORT_STATUS: DEL: 1(test): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl add-port br0 test -- set Interface test type=dummy
if test X"$1" = X"OFPPR_ADD"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.2): ADD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
+ speed: 0 Mbps now, 0 Mbps max
+OFPT_PORT_STATUS (OF1.2): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl del-port br0 test
if test X"$1" = X"OFPPR_DELETE"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.2): DEL: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl add-port br0 test -- set Interface test type=dummy
if test X"$1" = X"OFPPR_ADD"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.3): ADD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
+ speed: 0 Mbps now, 0 Mbps max
+OFPT_PORT_STATUS (OF1.3): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl del-port br0 test
if test X"$1" = X"OFPPR_DELETE"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.3): DEL: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl add-port br0 test -- set Interface test type=dummy
if test X"$1" = X"OFPPR_ADD"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.4): ADD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
+ speed: 0 Mbps now, 0 Mbps max
+OFPT_PORT_STATUS (OF1.4): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max"
fi
# OFPT_PORT_STATUS, OFPPR_MODIFY
- ovs-ofctl -O OpenFlow14 -vwarn mod-port br0 test up
+ ovs-ofctl -O OpenFlow14 -vwarn mod-port br0 test down
if test X"$1" = X"OFPPR_MODIFY"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.4): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: 0
- state: LINK_DOWN
+ config: PORT_DOWN
+ state: 0
speed: 0 Mbps now, 0 Mbps max
OFPT_PORT_STATUS (OF1.4): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: 0
- state: LIVE
+ config: PORT_DOWN
+ state: LINK_DOWN
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl del-port br0 test
if test X"$1" = X"OFPPR_DELETE"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.4): DEL: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: 0
- state: LIVE
+ config: PORT_DOWN
+ state: LINK_DOWN
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl add-port br0 test -- set Interface test type=dummy
if test X"$1" = X"OFPPR_ADD"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.5): ADD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: PORT_DOWN
- state: LINK_DOWN
+ config: 0
+ state: 0
+ speed: 0 Mbps now, 0 Mbps max
+OFPT_PORT_STATUS (OF1.5): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
+ config: 0
+ state: LIVE
speed: 0 Mbps now, 0 Mbps max"
fi
# OFPT_PORT_STATUS, OFPPR_MODIFY
- ovs-ofctl -O OpenFlow15 -vwarn mod-port br0 test up
+ ovs-ofctl -O OpenFlow15 -vwarn mod-port br0 test down
if test X"$1" = X"OFPPR_MODIFY"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.5): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: 0
- state: LINK_DOWN
+ config: PORT_DOWN
+ state: 0
speed: 0 Mbps now, 0 Mbps max
-OFPT_PORT_STATUS (OF1.5): MOD: 2(test): addr:aa:55:aa:55:00:0x
- config: 0
- state: LIVE
+OFPT_PORT_STATUS (OF1.5): MOD: ${INDEX}(test): addr:aa:55:aa:55:00:0x
+ config: PORT_DOWN
+ state: LINK_DOWN
speed: 0 Mbps now, 0 Mbps max"
fi
ovs-vsctl del-port br0 test
if test X"$1" = X"OFPPR_DELETE"; then shift;
echo >>expout "OFPT_PORT_STATUS (OF1.5): DEL: ${INDEX}(test): addr:aa:55:aa:55:00:0x
- config: 0
- state: LIVE
+ config: PORT_DOWN
+ state: LINK_DOWN
speed: 0 Mbps now, 0 Mbps max"
fi