aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo/dpo.h
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2020-12-21 08:29:34 +0000
committerOle Tr�an <otroan@employees.org>2021-02-15 17:27:48 +0000
commit8f5fef2c78b95de1a636ce27111722b71702212a (patch)
treea0ebd0189969ccae1f0bdd7c1a9c18dd7a066f2e /src/vnet/dpo/dpo.h
parent54be0cc044f445853fae7b8995c477605250af16 (diff)
ip: Path MTU
Type: feature Support setting the MTU for a peer on an interface. The minimum value of the path and interface MTU is used at forwarding time. the path MTU is specified for a given peer, by address and table-ID. In the forwarding plane the MTU is enfored either: 1 - if the peer is attached, then the MTU is set on the peer's adjacency 2 - if the peer is not attached, it is remote, then a DPO is added to the peer's FIB entry to perform the necessary fragmentation. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I8b9ea6a07868b50e97e2561f18d9335407dea7ae
Diffstat (limited to 'src/vnet/dpo/dpo.h')
-rw-r--r--src/vnet/dpo/dpo.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/vnet/dpo/dpo.h b/src/vnet/dpo/dpo.h
index ee4990d0058..e9976c2dd87 100644
--- a/src/vnet/dpo/dpo.h
+++ b/src/vnet/dpo/dpo.h
@@ -24,6 +24,8 @@
* instances.
*/
+// clang-format off
+
#ifndef __DPO_H__
#define __DPO_H__
@@ -362,6 +364,16 @@ extern void dpo_stack_from_node(u32 child_node,
extern u32 dpo_get_urpf(const dpo_id_t *dpo);
/**
+ * Get the MTU DPO
+ *
+ * @param dpo
+ * The DPO from which to get the MTU
+ *
+ * @return MTU (0xffff if something more usefull was unavailable)
+ */
+extern u16 dpo_get_mtu(const dpo_id_t *dpo);
+
+/**
* @brief A lock function registered for a DPO type
*/
typedef void (*dpo_lock_fn_t)(dpo_id_t *dpo);
@@ -389,6 +401,11 @@ typedef u32* (*dpo_get_next_node_t)(const dpo_id_t *dpo);
typedef u32 (*dpo_get_urpf_t)(const dpo_id_t *dpo);
/**
+ * @brief Given a DPO instance return the MTU
+ */
+typedef u16 (*dpo_get_mtu_t)(const dpo_id_t *dpo);
+
+/**
* @brief Called during FIB interposition when the originally
* registered DPO is used to 'clone' an instance for interposition
* at a particular location in the FIB graph.
@@ -433,6 +450,10 @@ typedef struct dpo_vft_t_
*/
dpo_get_urpf_t dv_get_urpf;
/**
+ * Get MTU
+ */
+ dpo_get_mtu_t dv_get_mtu;
+ /**
* Signal on an interposed child that the parent has changed
*/
dpo_mk_interpose_t dv_mk_interpose;
@@ -548,3 +569,5 @@ do { \
if ((YESNO)) vlib_worker_thread_barrier_release((VM));
#endif
+
+// clang-format on