struct ofproto_dpif *ofproto = ofproto_dpif_cast(port->up.ofproto);
const struct netdev *netdev = port->up.netdev;
char namebuf[NETDEV_VPORT_NAME_BUFSIZE];
+ const char *dp_port_name;
struct dpif_port dpif_port;
int error;
return 0;
}
- error = dpif_port_query_by_name(ofproto->backer->dpif,
- netdev_vport_get_dpif_port(netdev, namebuf,
- sizeof namebuf),
+ dp_port_name = netdev_vport_get_dpif_port(netdev, namebuf, sizeof namebuf);
+ error = dpif_port_query_by_name(ofproto->backer->dpif, dp_port_name,
&dpif_port);
if (error) {
return error;
if (netdev_get_tunnel_config(netdev)) {
atomic_count_inc(&ofproto->backer->tnl_count);
error = tnl_port_add(port, port->up.netdev, port->odp_port,
- ovs_native_tunneling_is_on(ofproto), namebuf);
+ ovs_native_tunneling_is_on(ofproto), dp_port_name);
if (error) {
atomic_count_dec(&ofproto->backer->tnl_count);
dpif_port_destroy(&dpif_port);
{
struct ofport_dpif *port = ofport_dpif_cast(port_);
char namebuf[NETDEV_VPORT_NAME_BUFSIZE];
+ const char *dp_port_name;
struct netdev *netdev = port->up.netdev;
if (port->bundle && port->bundle->bond) {
ofproto_dpif_monitor_port_update(port, port->bfd, port->cfm,
port->lldp, port->up.pp.hw_addr);
- netdev_vport_get_dpif_port(netdev, namebuf, sizeof namebuf);
+ dp_port_name = netdev_vport_get_dpif_port(netdev, namebuf, sizeof namebuf);
if (port->is_tunnel) {
struct ofproto_dpif *ofproto = ofproto_dpif_cast(port->up.ofproto);
if (tnl_port_reconfigure(port, netdev, port->odp_port,
- ovs_native_tunneling_is_on(ofproto), namebuf)) {
+ ovs_native_tunneling_is_on(ofproto),
+ dp_port_name)) {
ofproto->backer->need_revalidate = REV_RECONFIGURE;
}
}
1.1.2.93 f8:bc:12:44:34:b7 br0
])
+AT_CHECK([ovs-appctl tnl/ports/show |sort], [0], [dnl
+Listening ports:
+genev_sys_6081 (6081) : eth_type(0x0800),ipv4(src=1.1.2.92,proto=17,frag=no),udp(dst=6081)
+gre_sys (3) : eth_type(0x0800),ipv4(src=1.1.2.92,proto=47,frag=no)
+vxlan_sys_4789 (4789) : eth_type(0x0800),ipv4(src=1.1.2.92,proto=17,frag=no),udp(dst=4789)
+vxlan_sys_4789 (4789) : eth_type(0x0800),ipv4(src=1.1.2.93,proto=17,frag=no),udp(dst=4789)
+])
+
dnl Check VXLAN tunnel pop
AT_CHECK([ovs-appctl ofproto/trace ovs-dummy 'in_port(1),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=1.1.2.92,dst=1.1.2.88,proto=17,tos=0,ttl=64,frag=no),udp(src=51283,dst=4789)'], [0], [stdout])
AT_CHECK([tail -1 stdout], [0],