void pktgen_blink_enable_disable(port_info_t * info, char * str) { if ( parseState(str) == ENABLE_STATE ) { pktgen.blinklist |= (1 << info->pid); } else { pktgen.blinklist &= ~(1 << info->pid); rte_eth_led_on(info->pid); } }
int rw_piot_set_led(rw_piot_api_handle_t api_handle, int on) { rw_piot_device_t *rw_piot_dev = RWPIOT_GET_DEVICE(api_handle); int ret; ASSERT(RWPIOT_VALID_DEVICE(rw_piot_dev)); if (NULL == rw_piot_dev) { RW_PIOT_LOG(RTE_LOG_ERR, "PIOT Could not find device by handle\n"); return -1; } if (on) { ret = rte_eth_led_on(rw_piot_dev->rte_port_id); } else { ret = rte_eth_led_off(rw_piot_dev->rte_port_id); } return ret; }