From: Eli Britstein <el...@nvidia.com> In case native tunnel output cannot be performed due to missing details such as routing/neigh currently the action is silently dropped. Add a coverage counter for it.
Signed-off-by: Eli Britstein <el...@nvidia.com> Acked-by: Roi Dayan <r...@nvidia.com> --- ofproto/ofproto-dpif-xlate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index e59ff17ade63..416d996a79f3 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -72,6 +72,7 @@ COVERAGE_DEFINE(xlate_actions); COVERAGE_DEFINE(xlate_actions_oversize); COVERAGE_DEFINE(xlate_actions_too_many_output); +COVERAGE_DEFINE(xlate_actions_tnl_void); VLOG_DEFINE_THIS_MODULE(ofproto_dpif_xlate); @@ -3895,6 +3896,7 @@ native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, err = tnl_route_lookup_flow(ctx, flow, &d_ip6, &s_ip6, &out_dev); if (err) { + COVERAGE_INC(xlate_actions_tnl_void); xlate_report(ctx, OFT_WARN, "native tunnel routing failed"); return err; } @@ -3906,6 +3908,7 @@ native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, /* Use mac addr of bridge port of the peer. */ err = netdev_get_etheraddr(out_dev->netdev, &smac); if (err) { + COVERAGE_INC(xlate_actions_tnl_void); xlate_report(ctx, OFT_WARN, "tunnel output device lacks Ethernet address"); return err; @@ -3920,6 +3923,7 @@ native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, if (err) { struct in6_addr nh_s_ip6 = in6addr_any; + COVERAGE_INC(xlate_actions_tnl_void); xlate_report(ctx, OFT_DETAIL, "neighbor cache miss for %s on bridge %s, " "sending %s request", @@ -3960,6 +3964,7 @@ native_tunnel_output(struct xlate_ctx *ctx, const struct xport *xport, netdev_init_tnl_build_header_params(&tnl_params, flow, &s_ip6, dmac, smac); err = tnl_port_build_header(xport->ofport, &tnl_push_data, &tnl_params); if (err) { + COVERAGE_INC(xlate_actions_tnl_void); xlate_report(ctx, OFT_WARN, "native tunnel header build failed"); return err; } -- 2.21.0 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev