int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { /* * Report all SFP-capable ports. * BA: SFP 49, 50, 51, 52 */ AIM_BITMAP_SET(bmap, 48); AIM_BITMAP_SET(bmap, 49); AIM_BITMAP_SET(bmap, 50); AIM_BITMAP_SET(bmap, 51); return ONLP_STATUS_OK; }
int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { int p; for(p = 1; p <= QSFP_NUM; p++) { AIM_BITMAP_SET(bmap, p); } return ONLP_STATUS_OK; }
int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { int p; for(p = 0; p < sfp_count__; p++) { AIM_BITMAP_SET(bmap, p); } return ONLP_STATUS_OK; }
int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { int p = 1; AIM_BITMAP_CLR_ALL(bmap); for (; p <= NUM_OF_SFP_PORT; p++) { AIM_BITMAP_SET(bmap, p); } return ONLP_STATUS_OK; }
int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { int p, port_name; for(p = 1; p < 33; p++) { if (onlp_file_read_int(&port_name, sfp_get_port_info_path(p, "port_name")) == 0) { AIM_BITMAP_SET(bmap, port_name); } } return ONLP_STATUS_OK; }
int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { /* * Ports {0, 54} */ int p; for(p = 0; p < 54; p++) { AIM_BITMAP_SET(bmap, p); } return ONLP_STATUS_OK; }
int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { /* * Ports {0, CHASSIS_SFP_COUNT} */ int p; for(p = 0; p < CHASSIS_SFP_COUNT; p++) { AIM_BITMAP_SET(bmap, p); } return ONLP_STATUS_OK; }
int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { /* * Ports {0, 64} */ int p; AIM_BITMAP_CLR_ALL(bmap); for(p = 0; p < NUM_OF_SFP_PORT; p++) { AIM_BITMAP_SET(bmap, p); } return ONLP_STATUS_OK; }
int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { /* * Ports {0, 32} */ int p; AIM_BITMAP_INIT(bmap, 64); AIM_BITMAP_CLR_ALL(bmap); for(p = 0; p < 32; p++) { AIM_BITMAP_SET(bmap, p); } return ONLP_STATUS_OK; }
/* * This function should populate the give bitmap with * all valid, SFP-capable port numbers. * * Only port numbers in this bitmap will be queried by the the * ONLP framework. * * No SFPI functions will be called with ports that are * not in this bitmap. You can ignore all error checking * on the incoming ports defined in this interface. */ int onlp_sfpi_bitmap_get(onlp_sfp_bitmap_t* bmap) { int p; int total_port = 0; int board_model_id = onlp_board_model_id_get(); switch (board_model_id) { case HURACAN_WITH_BMC: case HURACAN_WITHOUT_BMC: case HURACAN_A_WITH_BMC: case HURACAN_A_WITHOUT_BMC: total_port = 32; break; case SESTO_WITH_BMC: case SESTO_WITHOUT_BMC: case NCIIX_WITH_BMC: case NCIIX_WITHOUT_BMC: total_port = 54; break; case ASTERION_WITH_BMC: case ASTERION_WITHOUT_BMC: total_port = 64; break; default: break; } AIM_BITMAP_CLR_ALL(bmap); for(p = 0; p < total_port; p++) AIM_BITMAP_SET(bmap, p); return ONLP_STATUS_OK; }