@@ -58,6 +58,7 @@ static map<string, sai_hostif_trap_type_t> trap_id_map = {
5858 {" bgp" , SAI_HOSTIF_TRAP_TYPE_BGP},
5959 {" dhcpv6" , SAI_HOSTIF_TRAP_TYPE_DHCPV6},
6060 {" ospfv6" , SAI_HOSTIF_TRAP_TYPE_OSPFV6},
61+ {" isis" , SAI_HOSTIF_TRAP_TYPE_ISIS},
6162 {" vrrpv6" , SAI_HOSTIF_TRAP_TYPE_VRRPV6},
6263 {" bgpv6" , SAI_HOSTIF_TRAP_TYPE_BGPV6},
6364 {" neigh_discovery" , SAI_HOSTIF_TRAP_TYPE_IPV6_NEIGHBOR_DISCOVERY},
@@ -75,7 +76,10 @@ static map<string, sai_hostif_trap_type_t> trap_id_map = {
7576 {" bfd" , SAI_HOSTIF_TRAP_TYPE_BFD},
7677 {" bfdv6" , SAI_HOSTIF_TRAP_TYPE_BFDV6},
7778 {" 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}
7983};
8084
8185static map<string, sai_packet_action_t > packet_action_map = {
@@ -519,7 +523,7 @@ task_process_status CoppOrch::processCoppRule(Consumer& consumer)
519523 policer_attribs, genetlink_attribs))
520524 {
521525 return task_process_status::task_invalid_entry;
522- }
526+ }
523527
524528 /* Set host interface trap group */
525529 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)
583587 if (sai_status != SAI_STATUS_SUCCESS)
584588 {
585589 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 ,
587591 trap_group_name.c_str ());
588592 task_process_status handle_status = handleSaiSetStatus (SAI_API_HOSTIF, sai_status);
589593 if (handle_status != task_process_status::task_success)
@@ -601,10 +605,10 @@ task_process_status CoppOrch::processCoppRule(Consumer& consumer)
601605 }
602606 if (!genetlink_attribs.empty ())
603607 {
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]) !=
605609 m_trap_group_hostif_map.end ())
606610 {
607- SWSS_LOG_ERROR (" Genetlink hostif exists for the trap group %s" ,
611+ SWSS_LOG_ERROR (" Genetlink hostif exists for the trap group %s" ,
608612 trap_group_name.c_str ());
609613 return task_process_status::task_failed;
610614 }
@@ -800,7 +804,7 @@ bool CoppOrch::trapGroupProcessTrapIdChange (string trap_group_name,
800804 SWSS_LOG_ERROR (" Failed to set traps to trap group %s" , trap_group_name.c_str ());
801805 return false ;
802806 }
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]) !=
804808 m_trap_group_hostif_map.end ())
805809 {
806810 if (!createGenetlinkHostIfTable (add_trap_ids))
@@ -819,7 +823,7 @@ bool CoppOrch::trapGroupProcessTrapIdChange (string trap_group_name,
819823 * A trap ID will be present in rem_trap_id in two scenarios
820824 * 1) When trap group for a trap ID is changed
821825 * 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
823827 * group. This would result in changing the mapping of trap id to trap group
824828 * In case 2 the mapping will remain the same. In this case the trap
825829 * object needs to be deleted
@@ -830,7 +834,7 @@ bool CoppOrch::trapGroupProcessTrapIdChange (string trap_group_name,
830834 m_syncdTrapIds[i].trap_obj );
831835 if (sai_status != SAI_STATUS_SUCCESS)
832836 {
833- SWSS_LOG_ERROR (" Failed to remove trap object %" PRId64 " " ,
837+ SWSS_LOG_ERROR (" Failed to remove trap object %" PRId64 " " ,
834838 m_syncdTrapIds[i].trap_obj );
835839 task_process_status handle_status = handleSaiRemoveStatus (SAI_API_HOSTIF, sai_status);
836840 if (handle_status != task_success)
@@ -1092,4 +1096,3 @@ bool CoppOrch::trapGroupUpdatePolicer (string trap_group_name,
10921096 }
10931097 return true ;
10941098}
1095-
0 commit comments