@@ -58,6 +58,7 @@ static map<string, sai_hostif_trap_type_t> trap_id_map = {
58
58
{" bgp" , SAI_HOSTIF_TRAP_TYPE_BGP},
59
59
{" dhcpv6" , SAI_HOSTIF_TRAP_TYPE_DHCPV6},
60
60
{" ospfv6" , SAI_HOSTIF_TRAP_TYPE_OSPFV6},
61
+ {" isis" , SAI_HOSTIF_TRAP_TYPE_ISIS},
61
62
{" vrrpv6" , SAI_HOSTIF_TRAP_TYPE_VRRPV6},
62
63
{" bgpv6" , SAI_HOSTIF_TRAP_TYPE_BGPV6},
63
64
{" neigh_discovery" , SAI_HOSTIF_TRAP_TYPE_IPV6_NEIGHBOR_DISCOVERY},
@@ -75,7 +76,10 @@ static map<string, sai_hostif_trap_type_t> trap_id_map = {
75
76
{" bfd" , SAI_HOSTIF_TRAP_TYPE_BFD},
76
77
{" bfdv6" , SAI_HOSTIF_TRAP_TYPE_BFDV6},
77
78
{" src_nat_miss" , SAI_HOSTIF_TRAP_TYPE_SNAT_MISS},
78
- {" dest_nat_miss" , SAI_HOSTIF_TRAP_TYPE_DNAT_MISS}
79
+ {" dest_nat_miss" , SAI_HOSTIF_TRAP_TYPE_DNAT_MISS},
80
+ {" ldp" , SAI_HOSTIF_TRAP_TYPE_LDP},
81
+ {" bfd_micro" , SAI_HOSTIF_TRAP_TYPE_BFD_MICRO},
82
+ {" bfdv6_micro" , SAI_HOSTIF_TRAP_TYPE_BFDV6_MICRO}
79
83
};
80
84
81
85
static map<string, sai_packet_action_t > packet_action_map = {
@@ -519,7 +523,7 @@ task_process_status CoppOrch::processCoppRule(Consumer& consumer)
519
523
policer_attribs, genetlink_attribs))
520
524
{
521
525
return task_process_status::task_invalid_entry;
522
- }
526
+ }
523
527
524
528
/* Set host interface trap group */
525
529
if (m_trap_group_map.find (trap_group_name) != m_trap_group_map.end ())
@@ -583,7 +587,7 @@ task_process_status CoppOrch::processCoppRule(Consumer& consumer)
583
587
if (sai_status != SAI_STATUS_SUCCESS)
584
588
{
585
589
SWSS_LOG_ERROR (" Failed to set attribute %d on trap %" PRIx64 " "
586
- " on group %s" , i.id , m_syncdTrapIds[trap_id].trap_obj ,
590
+ " on group %s" , i.id , m_syncdTrapIds[trap_id].trap_obj ,
587
591
trap_group_name.c_str ());
588
592
task_process_status handle_status = handleSaiSetStatus (SAI_API_HOSTIF, sai_status);
589
593
if (handle_status != task_process_status::task_success)
@@ -601,10 +605,10 @@ task_process_status CoppOrch::processCoppRule(Consumer& consumer)
601
605
}
602
606
if (!genetlink_attribs.empty ())
603
607
{
604
- if (m_trap_group_hostif_map.find (m_trap_group_map[trap_group_name]) !=
608
+ if (m_trap_group_hostif_map.find (m_trap_group_map[trap_group_name]) !=
605
609
m_trap_group_hostif_map.end ())
606
610
{
607
- SWSS_LOG_ERROR (" Genetlink hostif exists for the trap group %s" ,
611
+ SWSS_LOG_ERROR (" Genetlink hostif exists for the trap group %s" ,
608
612
trap_group_name.c_str ());
609
613
return task_process_status::task_failed;
610
614
}
@@ -800,7 +804,7 @@ bool CoppOrch::trapGroupProcessTrapIdChange (string trap_group_name,
800
804
SWSS_LOG_ERROR (" Failed to set traps to trap group %s" , trap_group_name.c_str ());
801
805
return false ;
802
806
}
803
- if (m_trap_group_hostif_map.find (m_trap_group_map[trap_group_name]) !=
807
+ if (m_trap_group_hostif_map.find (m_trap_group_map[trap_group_name]) !=
804
808
m_trap_group_hostif_map.end ())
805
809
{
806
810
if (!createGenetlinkHostIfTable (add_trap_ids))
@@ -819,7 +823,7 @@ bool CoppOrch::trapGroupProcessTrapIdChange (string trap_group_name,
819
823
* A trap ID will be present in rem_trap_id in two scenarios
820
824
* 1) When trap group for a trap ID is changed
821
825
* 2) When trap ID is completely removed
822
- * In case 1 the first call would be to add the trap ids to a different
826
+ * In case 1 the first call would be to add the trap ids to a different
823
827
* group. This would result in changing the mapping of trap id to trap group
824
828
* In case 2 the mapping will remain the same. In this case the trap
825
829
* object needs to be deleted
@@ -830,7 +834,7 @@ bool CoppOrch::trapGroupProcessTrapIdChange (string trap_group_name,
830
834
m_syncdTrapIds[i].trap_obj );
831
835
if (sai_status != SAI_STATUS_SUCCESS)
832
836
{
833
- SWSS_LOG_ERROR (" Failed to remove trap object %" PRId64 " " ,
837
+ SWSS_LOG_ERROR (" Failed to remove trap object %" PRId64 " " ,
834
838
m_syncdTrapIds[i].trap_obj );
835
839
task_process_status handle_status = handleSaiRemoveStatus (SAI_API_HOSTIF, sai_status);
836
840
if (handle_status != task_success)
@@ -1092,4 +1096,3 @@ bool CoppOrch::trapGroupUpdatePolicer (string trap_group_name,
1092
1096
}
1093
1097
return true ;
1094
1098
}
1095
-
0 commit comments