summaryrefslogtreecommitdiffstats
path: root/src/vnet/map/ip4_map_t.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-02-20 20:29:41 -0800
committerOle Trøan <otroan@employees.org>2017-03-29 15:21:20 +0000
commit9705c3833a7b18609df8ae315a0aa062e1d2e180 (patch)
tree5e84c96ead76bdd40e405fdec46d9a424effd502 /src/vnet/map/ip4_map_t.c
parent04a75e3230ab71248fc29a56b9f64bdaee0c17ac (diff)
MAP - add the domain struct directly into the dat-path and avoid the indirectiob throught the map-DPO
Change-Id: Ifb72a1c1258440fdc4845aca8aecf2abd63526b1 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/map/ip4_map_t.c')
-rw-r--r--src/vnet/map/ip4_map_t.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/vnet/map/ip4_map_t.c b/src/vnet/map/ip4_map_t.c
index 15974d8a46e..b63d76bf4f4 100644
--- a/src/vnet/map/ip4_map_t.c
+++ b/src/vnet/map/ip4_map_t.c
@@ -1100,10 +1100,12 @@ ip4_map_t (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
next1 = IP4_MAPT_NEXT_DROP;
}
- d0 = ip4_map_get_domain (vnet_buffer (p0)->ip.adj_index[VLIB_TX],
- &vnet_buffer (p0)->map_t.map_domain_index);
- d1 = ip4_map_get_domain (vnet_buffer (p1)->ip.adj_index[VLIB_TX],
- &vnet_buffer (p1)->map_t.map_domain_index);
+ vnet_buffer (p0)->map_t.map_domain_index =
+ vnet_buffer (p0)->ip.adj_index[VLIB_TX];
+ d0 = ip4_map_get_domain (vnet_buffer (p0)->map_t.map_domain_index);
+ vnet_buffer (p1)->map_t.map_domain_index =
+ vnet_buffer (p1)->ip.adj_index[VLIB_TX];
+ d1 = ip4_map_get_domain (vnet_buffer (p1)->map_t.map_domain_index);
vnet_buffer (p0)->map_t.mtu = d0->mtu ? d0->mtu : ~0;
vnet_buffer (p1)->map_t.mtu = d1->mtu ? d1->mtu : ~0;
@@ -1213,8 +1215,9 @@ ip4_map_t (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
next0 = IP4_MAPT_NEXT_DROP;
}
- d0 = ip4_map_get_domain (vnet_buffer (p0)->ip.adj_index[VLIB_TX],
- &vnet_buffer (p0)->map_t.map_domain_index);
+ vnet_buffer (p0)->map_t.map_domain_index =
+ vnet_buffer (p0)->ip.adj_index[VLIB_TX];
+ d0 = ip4_map_get_domain (vnet_buffer (p0)->map_t.map_domain_index);
vnet_buffer (p0)->map_t.mtu = d0->mtu ? d0->mtu : ~0;