summaryrefslogtreecommitdiffstats
path: root/src/vnet/map/ip4_map.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.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.c')
-rw-r--r--src/vnet/map/ip4_map.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/vnet/map/ip4_map.c b/src/vnet/map/ip4_map.c
index 2be9ad37e72..1a20d704732 100644
--- a/src/vnet/map/ip4_map.c
+++ b/src/vnet/map/ip4_map.c
@@ -293,12 +293,10 @@ ip4_map (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
p1 = vlib_get_buffer (vm, pi1);
ip40 = vlib_buffer_get_current (p0);
ip41 = vlib_buffer_get_current (p1);
- d0 =
- ip4_map_get_domain (vnet_buffer (p0)->ip.adj_index[VLIB_TX],
- &map_domain_index0);
- d1 =
- ip4_map_get_domain (vnet_buffer (p1)->ip.adj_index[VLIB_TX],
- &map_domain_index1);
+ map_domain_index0 = vnet_buffer (p0)->ip.adj_index[VLIB_TX];
+ d0 = ip4_map_get_domain (map_domain_index0);
+ map_domain_index1 = vnet_buffer (p1)->ip.adj_index[VLIB_TX];
+ d1 = ip4_map_get_domain (map_domain_index1);
ASSERT (d0);
ASSERT (d1);
@@ -464,9 +462,8 @@ ip4_map (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
p0 = vlib_get_buffer (vm, pi0);
ip40 = vlib_buffer_get_current (p0);
- d0 =
- ip4_map_get_domain (vnet_buffer (p0)->ip.adj_index[VLIB_TX],
- &map_domain_index0);
+ map_domain_index0 = vnet_buffer (p0)->ip.adj_index[VLIB_TX];
+ d0 = ip4_map_get_domain (map_domain_index0);
ASSERT (d0);
/*
@@ -597,9 +594,8 @@ ip4_map_reass (vlib_main_t * vm,
p0 = vlib_get_buffer (vm, pi0);
ip60 = vlib_buffer_get_current (p0);
ip40 = (ip4_header_t *) (ip60 + 1);
- d0 =
- ip4_map_get_domain (vnet_buffer (p0)->ip.adj_index[VLIB_TX],
- &map_domain_index0);
+ map_domain_index0 = vnet_buffer (p0)->ip.adj_index[VLIB_TX];
+ d0 = ip4_map_get_domain (map_domain_index0);
map_ip4_reass_lock ();
map_ip4_reass_t *r = map_ip4_reass_get (ip40->src_address.as_u32,