Type: fix
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
Change-Id: Ia12feee9e46d4951519d5c6f9d1a21d89701dc0f
Signed-off-by: Tetsuya Murakami <tetsuya.mrk@gmail.com>
u8 *rewrite; /**< Precomputed rewrite header */
u8 *rewrite_bsid; /**< Precomputed rewrite header for bindingSID */
u8 *rewrite; /**< Precomputed rewrite header */
u8 *rewrite_bsid; /**< Precomputed rewrite header for bindingSID */
+ u32 egress_fib_table; /**< Egress FIB table for encap packet */
+
dpo_id_t bsid_dpo; /**< DPO for Encaps/Insert for BSID */
dpo_id_t ip6_dpo; /**< DPO for Encaps/Insert IPv6 */
dpo_id_t ip4_dpo; /**< DPO for Encaps IPv6 */
dpo_id_t bsid_dpo; /**< DPO for Encaps/Insert for BSID */
dpo_id_t ip6_dpo; /**< DPO for Encaps/Insert IPv6 */
dpo_id_t ip4_dpo; /**< DPO for Encaps IPv6 */
#endif /* included_vnet_sr_h */
/*
#endif /* included_vnet_sr_h */
/*
segment_list->segments = vec_dup (sl);
segment_list->segments = vec_dup (sl);
+ segment_list->egress_fib_table =
+ ip6_fib_index_from_table_id (sr_policy->fib_table);
+
if (is_encap)
{
segment_list->rewrite = compute_rewrite_encaps (sl);
if (is_encap)
{
segment_list->rewrite = compute_rewrite_encaps (sl);
encaps_processing_v6 (node, b2, ip2, ip2_encap);
encaps_processing_v6 (node, b3, ip3, ip3_encap);
encaps_processing_v6 (node, b2, ip2, ip2_encap);
encaps_processing_v6 (node, b3, ip3, ip3_encap);
+ vnet_buffer (b0)->sw_if_index[VLIB_TX] = sl0->egress_fib_table;
+ vnet_buffer (b1)->sw_if_index[VLIB_TX] = sl1->egress_fib_table;
+ vnet_buffer (b2)->sw_if_index[VLIB_TX] = sl2->egress_fib_table;
+ vnet_buffer (b3)->sw_if_index[VLIB_TX] = sl3->egress_fib_table;
+
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
{
if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
{
if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
encaps_processing_v6 (node, b0, ip0, ip0_encap);
encaps_processing_v6 (node, b0, ip0, ip0_encap);
+ vnet_buffer (b0)->sw_if_index[VLIB_TX] = sl0->egress_fib_table;
+
if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_TRACE) &&
PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
{
if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_TRACE) &&
PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
{
encaps_processing_v4 (node, b2, ip2, ip2_encap);
encaps_processing_v4 (node, b3, ip3, ip3_encap);
encaps_processing_v4 (node, b2, ip2, ip2_encap);
encaps_processing_v4 (node, b3, ip3, ip3_encap);
+ vnet_buffer (b0)->sw_if_index[VLIB_TX] = sl0->egress_fib_table;
+ vnet_buffer (b1)->sw_if_index[VLIB_TX] = sl1->egress_fib_table;
+ vnet_buffer (b2)->sw_if_index[VLIB_TX] = sl2->egress_fib_table;
+ vnet_buffer (b3)->sw_if_index[VLIB_TX] = sl3->egress_fib_table;
+
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
{
if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
{
if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
encaps_processing_v4 (node, b0, ip0, ip0_encap);
encaps_processing_v4 (node, b0, ip0, ip0_encap);
+ vnet_buffer (b0)->sw_if_index[VLIB_TX] = sl0->egress_fib_table;
+
if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_TRACE) &&
PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
{
if (PREDICT_FALSE (node->flags & VLIB_NODE_FLAG_TRACE) &&
PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
{
if (!traffic_type)
return clib_error_return (0, "No L2/L3 traffic specified");
if (!traffic_type)
return clib_error_return (0, "No L2/L3 traffic specified");
+ if (!is_del && !sr_policy_set)
return clib_error_return (0, "No SR policy specified");
/* Make sure that the prefixes are clean */
return clib_error_return (0, "No SR policy specified");
/* Make sure that the prefixes are clean */