X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdpo%2Fdpo.c;h=d8342ff17aece30979ce9695bc0c8895c49ba4f6;hb=8f5fef2c7;hp=1331b5501bc35a394d366026529dd87793a81b25;hpb=ab4fbedf27ece4ea623d7c3b54cc54f0133ba1f7;p=vpp.git diff --git a/src/vnet/dpo/dpo.c b/src/vnet/dpo/dpo.c index 1331b5501bc..d8342ff17ae 100644 --- a/src/vnet/dpo/dpo.c +++ b/src/vnet/dpo/dpo.c @@ -23,6 +23,8 @@ * The VLIB graph nodes are graph of types, the DPO graph is a graph of instances. */ +// clang-format off + #include #include #include @@ -395,6 +397,18 @@ dpo_get_urpf(const dpo_id_t *dpo) return (~0); } +u16 +dpo_get_mtu(const dpo_id_t *dpo) +{ + if (dpo_id_is_valid(dpo) && + (NULL != dpo_vfts[dpo->dpoi_type].dv_get_mtu)) + { + return (dpo_vfts[dpo->dpoi_type].dv_get_mtu(dpo)); + } + + return (0xffff); +} + static u32 dpo_get_next_node (dpo_type_t child_type, dpo_proto_t child_proto, @@ -649,3 +663,5 @@ VLIB_CLI_COMMAND (show_fib_memory, static) = { .short_help = "show dpo memory", }; /* *INDENT-ON* */ + +// clang-format on