On 18 August 2016 at 14:06, Joe Stringer <j...@ovn.org> wrote: > On 18 August 2016 at 11:09, William Tu <u9012...@gmail.com> wrote: >> Ubuntu 14.04 with kernel 3.13 fails to set a GRE tunnel's mac address >> after device state is up. The patch first introduces additional args >> 'link-args' for 'ip link set' and uses it to adds mac address setting >> in ADD_NATIVE_TUNNEL. As a result, the device could be configured before >> becoming up state. Note that the original 'link-args' is renamed to >> 'type-args'. >> >> Signed-off-by: William Tu <u9012...@gmail.com> >> --- >> tests/system-common-macros.at | 13 +++++++------ >> tests/system-traffic.at | 3 +-- >> 2 files changed, 8 insertions(+), 8 deletions(-) >> >> diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at >> index 4ffc382..27a9652 100644 >> --- a/tests/system-common-macros.at >> +++ b/tests/system-common-macros.at >> @@ -118,22 +118,23 @@ m4_define([ADD_OVS_TUNNEL], >> ) >> >> # ADD_NATIVE_TUNNEL([type], [port], [namespace], [remote-addr], >> [overlay-addr], >> -# [link-args]) >> +# [type-args], [link-args]) >> # >> # Add a native tunnel device within 'namespace', with name 'port' and type >> # 'type'. The tunnel device will be configured as point-to-point with the >> # 'remote-addr' as the underlay address of the remote tunnel endpoint (as >> # viewed from the perspective of that namespace). >> # >> -# 'port' will be configured with the address 'overlay-addr'. 'link-args' is >> -# made available so that additional arguments can be passed to "ip link", >> -# for instance to configure the vxlan destination port. >> +# 'port' will be configured with the address 'overlay-addr'. 'type-args' is >> +# made available so that additional arguments can be passed to "ip link add" >> +# for configuring specific link type's arguments, for instance to configure >> +# the vxlan destination port. 'link-args' is made for arguments passed to >> +# "ip link set", for instance to configure MAC address. >> # >> m4_define([ADD_NATIVE_TUNNEL], >> [NS_CHECK_EXEC([$3], [ip link add dev $2 type $1 remote $4 $6]) >> NS_CHECK_EXEC([$3], [ip addr add dev $2 $5]) >> - NS_CHECK_EXEC([$3], [ip link set dev $2 up]) >> - NS_CHECK_EXEC([$3], [ip link set dev $2 mtu 1450]) >> + NS_CHECK_EXEC([$3], [ip link set dev $2 mtu 1450 $7 up]) >> ] >> ) >> >> diff --git a/tests/system-traffic.at b/tests/system-traffic.at >> index 2f42efa..898b620 100644 >> --- a/tests/system-traffic.at >> +++ b/tests/system-traffic.at >> @@ -384,9 +384,8 @@ AT_CHECK([ip link set dev br-underlay up]) >> dnl Set up tunnel endpoints on OVS outside the namespace and with a native >> dnl linux device inside the namespace. >> ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [172.31.1.1], [10.1.1.100/24]) >> -ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], >> [10.1.1.1/24]) >> +ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], >> [10.1.1.1/24], [], [address e6:66:c1:11 > > I think that this test is intended to check what happens when we > truncate packets, not when we truncate lines in the test. > > Maybe you forgot to add something to the commit?
William pointed out to me offlist that the following diff will fix the patch. I plan to apply this soon. Thanks, Wililam! diff --git a/tests/system-traffic.at b/tests/system-traffic.at index 898b620bb8e5..0de1aa4920c2 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -384,7 +384,8 @@ AT_CHECK([ip link set dev br-underlay up]) dnl Set up tunnel endpoints on OVS outside the namespace and with a native dnl linux device inside the namespace. ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [172.31.1.1], [10.1.1.100/24]) -ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], [10.1.1.1/24], [], [address e6:66:c1:11 +ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], [10.1.1.1/24], + [], [address e6:66:c1:11:11:11]) AT_CHECK([ovs-vsctl -- set interface at_gre0 ofport_request=1]) NS_CHECK_EXEC([at_ns0], [arp -s 10.1.1.2 e6:66:c1:22:22:22]) _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev