@@ -144,7 +144,7 @@ static int _link_state_build(adapter_info_t *drv, nthw_mac_pcs_t *mac_pcs,
144144 & lh_remote_fault , & lh_internal_local_fault ,
145145 & lh_received_local_fault );
146146
147- assert (port >= 0 && port < NUM_ADAPTER_PORTS_MAX );
147+ RTE_ASSERT (port >= 0 && port < NUM_ADAPTER_PORTS_MAX );
148148 state -> nim_present = nthw_gpio_phy_is_module_present (gpio_phy , (uint8_t )port );
149149 state -> lh_nim_absent = !state -> nim_present ;
150150 state -> link_up = phy_link_state ? true : false;
@@ -177,7 +177,7 @@ static int _link_state_build(adapter_info_t *drv, nthw_mac_pcs_t *mac_pcs,
177177 */
178178static bool _nim_is_present (nthw_gpio_phy_t * gpio_phy , uint8_t if_no )
179179{
180- assert (if_no < NUM_ADAPTER_PORTS_MAX );
180+ RTE_ASSERT (if_no < NUM_ADAPTER_PORTS_MAX );
181181
182182 return nthw_gpio_phy_is_module_present (gpio_phy , if_no );
183183}
@@ -258,8 +258,8 @@ static int _create_nim(adapter_info_t *drv, int port, bool enable)
258258 nt4ga_link_t * link_info = & drv -> nt4ga_link ;
259259 nthw_mac_pcs_t * mac_pcs = & link_info -> u .var100g .mac_pcs100g [port ];
260260
261- assert (port >= 0 && port < NUM_ADAPTER_PORTS_MAX );
262- assert (link_info -> variables_initialized );
261+ RTE_ASSERT (port >= 0 && port < NUM_ADAPTER_PORTS_MAX );
262+ RTE_ASSERT (link_info -> variables_initialized );
263263
264264 gpio_phy = & link_info -> u .var100g .gpio_phy [port ];
265265 nim_ctx = & link_info -> u .var100g .nim_ctx [port ];
@@ -355,8 +355,8 @@ static int _port_init(adapter_info_t *drv, nthw_fpga_t *fpga, int port)
355355
356356 nthw_mac_pcs_t * mac_pcs ;
357357
358- assert (port >= 0 && port < NUM_ADAPTER_PORTS_MAX );
359- assert (link_info -> variables_initialized );
358+ RTE_ASSERT (port >= 0 && port < NUM_ADAPTER_PORTS_MAX );
359+ RTE_ASSERT (link_info -> variables_initialized );
360360
361361 if (fpga && fpga -> p_fpga_info ) {
362362 adapter_id = fpga -> p_fpga_info -> n_nthw_adapter_id ;
@@ -444,7 +444,7 @@ static int _port_init(adapter_info_t *drv, nthw_fpga_t *fpga, int port)
444444
445445 } else {
446446 NT_LOG (ERR , NTNIC , "Unhandled AdapterId/HwId: %02x_hwid%d" , adapter_id , hw_id );
447- assert (0 );
447+ RTE_ASSERT (0 );
448448 }
449449
450450 _reset_rx (drv , mac_pcs );
@@ -494,7 +494,7 @@ static int _common_ptp_nim_state_machine(void *data)
494494 goto NT4GA_LINK_100G_MON_EXIT ;
495495 }
496496
497- assert (adapter_no >= 0 && adapter_no < NUM_ADAPTER_MAX );
497+ RTE_ASSERT (adapter_no >= 0 && adapter_no < NUM_ADAPTER_MAX );
498498 nim_ctx = link_info -> u .var100g .nim_ctx ;
499499 link_state = link_info -> link_state ;
500500 mac_pcs = link_info -> u .var100g .mac_pcs100g ;
@@ -521,7 +521,7 @@ static int _common_ptp_nim_state_machine(void *data)
521521 break ;
522522
523523 /* Has the administrative port state changed? */
524- assert (!(disable_port && enable_port ));
524+ RTE_ASSERT (!(disable_port && enable_port ));
525525
526526 if (disable_port ) {
527527 memset (& link_state [i ], 0 , sizeof (link_state [i ]));
@@ -603,7 +603,7 @@ static int _common_ptp_nim_state_machine(void *data)
603603 continue ;
604604 }
605605
606- assert (new_state .br ); /* Cannot be zero if NIM is present */
606+ RTE_ASSERT (new_state .br ); /* Cannot be zero if NIM is present */
607607 NT_LOG (DBG , NTNIC ,
608608 "%s: NIM id = %u (%s), br = %u, vendor = '%s', pn = '%s', sn='%s'" ,
609609 drv -> mp_port_id_str [i ], nim_ctx -> nim_id ,
@@ -669,7 +669,7 @@ static int nt4ga_link_100g_ports_init(struct adapter_info_s *p_adapter_info, nth
669669 /*
670670 * Initialize global variables
671671 */
672- assert (adapter_no >= 0 && adapter_no < NUM_ADAPTER_MAX );
672+ RTE_ASSERT (adapter_no >= 0 && adapter_no < NUM_ADAPTER_MAX );
673673
674674 if (res == 0 && !p_adapter_info -> nt4ga_link .variables_initialized ) {
675675 nthw_mac_pcs_t * mac_pcs = p_adapter_info -> nt4ga_link .u .var100g .mac_pcs100g ;
0 commit comments