pool_get (lcm->fwd_entry_pool, fe);
fe->locator_pairs = a->locator_pairs;
gid_address_copy (&fe->reid, &a->rmt_eid);
- gid_address_copy (&fe->leid, &src_map->eid);
+ gid_address_copy (&fe->leid, &a->lcl_eid);
fe->is_src_dst = is_src_dst;
hash_set (lcm->fwd_entry_by_mapping_index, dst_map_index,
fe - lcm->fwd_entry_pool);
}
+typedef struct
+{
+ u32 si;
+ u32 di;
+} fwd_entry_mt_arg_t;
+
+static void *
+dp_add_fwd_entry_thread_fn (void *arg)
+{
+ fwd_entry_mt_arg_t *a = arg;
+ lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
+ dp_add_fwd_entry (lcm, a->si, a->di);
+ return 0;
+}
+
+static int
+dp_add_fwd_entry_from_mt (u32 si, u32 di)
+{
+ fwd_entry_mt_arg_t a;
+
+ memset (&a, 0, sizeof (a));
+ a.si = si;
+ a.di = di;
+
+ vl_api_rpc_call_main_thread (dp_add_fwd_entry_thread_fn,
+ (u8 *) & a, sizeof (a));
+ return 0;
+}
+
/**
* Returns vector of adjacencies.
*
&src);
if (~0 != si)
{
- dp_add_fwd_entry (lcm, si, di);
+ dp_add_fwd_entry_from_mt (si, di);
}
}
}