Change-Id: I9b325b454ef80ffff80a0b0e23b24e3313127376
Signed-off-by: Dave Barach <dave@barachs.net>
ip0->dst_address.as_u64[1] = new_dst0->as_u64[1];
if (PREDICT_TRUE (sr0->segments_left > 0))
ip0->dst_address.as_u64[1] = new_dst0->as_u64[1];
if (PREDICT_TRUE (sr0->segments_left > 0))
}
/* End of the path. Clean up the SR header, or not */
}
/* End of the path. Clean up the SR header, or not */
- if (sr0->flags & clib_host_to_net_u16(IP6_SR_HEADER_FLAG_CLEANUP))
+ if (PREDICT_FALSE
+ (sr0->segments_left == 0 &&
+ (sr0->flags & clib_host_to_net_u16(IP6_SR_HEADER_FLAG_CLEANUP))))
{
u64 *copy_dst0, *copy_src0;
u16 new_l0;
{
u64 *copy_dst0, *copy_src0;
u16 new_l0;
ip1->dst_address.as_u64[1] = new_dst1->as_u64[1];
if (PREDICT_TRUE (sr1->segments_left > 0))
ip1->dst_address.as_u64[1] = new_dst1->as_u64[1];
if (PREDICT_TRUE (sr1->segments_left > 0))
}
/* End of the path. Clean up the SR header, or not */
}
/* End of the path. Clean up the SR header, or not */
- if (sr1->flags & clib_host_to_net_u16(IP6_SR_HEADER_FLAG_CLEANUP))
+ if (PREDICT_FALSE
+ (sr1->segments_left == 0 &&
+ (sr1->flags & clib_host_to_net_u16(IP6_SR_HEADER_FLAG_CLEANUP))))
{
u64 *copy_dst1, *copy_src1;
u16 new_l1;
{
u64 *copy_dst1, *copy_src1;
u16 new_l1;
ip0->dst_address.as_u64[1] = new_dst0->as_u64[1];
if (PREDICT_TRUE (sr0->segments_left > 0))
ip0->dst_address.as_u64[1] = new_dst0->as_u64[1];
if (PREDICT_TRUE (sr0->segments_left > 0))
}
/* End of the path. Clean up the SR header, or not */
}
/* End of the path. Clean up the SR header, or not */
- if (sr0->flags & clib_host_to_net_u16(IP6_SR_HEADER_FLAG_CLEANUP))
+ if (PREDICT_FALSE
+ (sr0->segments_left == 0 &&
+ (sr0->flags & clib_host_to_net_u16(IP6_SR_HEADER_FLAG_CLEANUP))))
{
u64 *copy_dst0, *copy_src0;
u16 new_l0;
{
u64 *copy_dst0, *copy_src0;
u16 new_l0;