From: Eli Britstein <[email protected]> The tnl/neigh table was used only for the bridge, even if the tunnel's underlay port is not the bridge's one (internal port for example). Set it to use the correct port.
Signed-off-by: Eli Britstein <[email protected]> Acked-by: Roi Dayan <[email protected]> --- lib/tnl-neigh-cache.c | 4 ++-- ofproto/ofproto-dpif-xlate.c | 11 ++++++----- tests/tunnel-push-pop.at | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/tnl-neigh-cache.c b/lib/tnl-neigh-cache.c index bdff1debc805..7e2eaa8262bf 100644 --- a/lib/tnl-neigh-cache.c +++ b/lib/tnl-neigh-cache.c @@ -375,8 +375,8 @@ tnl_neigh_cache_show(struct unixctl_conn *conn, int argc OVS_UNUSED, struct ds ds = DS_EMPTY_INITIALIZER; struct tnl_neigh_entry *neigh; - ds_put_cstr(&ds, "IP MAC Bridge\n"); - ds_put_cstr(&ds, "==========================================================================\n"); + ds_put_cstr(&ds, "IP MAC Port\n"); + ds_put_cstr(&ds, "========================================================================\n"); ovs_mutex_lock(&mutex); CMAP_FOR_EACH(neigh, cmap_node, &table) { int start_len, need_ws; diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 4cc7001a5b25..d13547b4a7f9 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -3916,17 +3916,18 @@ native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, s_ip = in6_addr_get_mapped_ipv4(&s_ip6); } - err = tnl_neigh_lookup(out_dev->xbridge->name, &d_ip6, &dmac); + err = tnl_neigh_lookup(netdev_get_name(out_dev->netdev), &d_ip6, &dmac); if (err) { struct in6_addr nh_s_ip6 = in6addr_any; xlate_report(ctx, OFT_DETAIL, "neighbor cache miss for %s on bridge %s, " "sending %s request", - buf_dip6, out_dev->xbridge->name, d_ip ? "ARP" : "ND"); + buf_dip6, netdev_get_name(out_dev->netdev), + d_ip ? "ARP" : "ND"); err = ovs_router_get_netdev_source_address(&d_ip6, - out_dev->xbridge->name, + netdev_get_name(out_dev->netdev), &nh_s_ip6); if (err) { nh_s_ip6 = s_ip6; @@ -4414,7 +4415,7 @@ terminate_native_tunnel(struct xlate_ctx *ctx, const struct xport *xport, * do tunnel neighbor snooping. */ if (*tnl_port == ODPP_NONE && (check_neighbor_reply(ctx, flow) || is_garp(flow, wc))) { - tnl_neigh_snoop(flow, wc, ctx->xbridge->name, + tnl_neigh_snoop(flow, wc, netdev_get_name(xport->netdev), ctx->xin->allow_side_effects); } else if (*tnl_port != ODPP_NONE && ctx->xin->allow_side_effects && @@ -4428,7 +4429,7 @@ terminate_native_tunnel(struct xlate_ctx *ctx, const struct xport *xport, s_ip6 = flow->ipv6_src; } - tnl_neigh_set(ctx->xbridge->name, &s_ip6, mac); + tnl_neigh_set(netdev_get_name(xport->netdev), &s_ip6, mac); } } diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at index cf4e622014b2..b6635d09afbd 100644 --- a/tests/tunnel-push-pop.at +++ b/tests/tunnel-push-pop.at @@ -1153,7 +1153,7 @@ AT_CHECK([ovs-appctl netdev-dummy/receive p0 'recirc_id(0),in_port(1),dnl arp(sip=1.1.2.92,tip=1.1.2.88,op=2,sha=f8:bc:12:44:34:b6,tha=aa:55:aa:55:00:03)']) AT_CHECK([ovs-appctl tnl/neigh/show | tail -n+3 | sort], [0], [dnl -1.1.2.92 f8:bc:12:44:34:b6 br0 +1.1.2.92 f8:bc:12:44:34:b6 vtep0 ]) dnl Check GRE tunnel pop. -- 2.21.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
