예제 #1
0
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;
}
예제 #2
0
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;
}
예제 #3
0
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;
}
예제 #4
0
/*
 * 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;
}
예제 #5
0
int
onlp_sfpi_presence_bitmap_get(onlp_sfp_bitmap_t* dst)
{
    AIM_BITMAP_CLR_ALL(dst);
    return ONLP_STATUS_OK;
}