Exemplo n.º 1
0
static sw_error_t
_fal_port_autoneg_restart(a_uint32_t dev_id, fal_port_t port_id)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->port_autoneg_restart)
        return SW_NOT_SUPPORTED;

    rv = p_api->port_autoneg_restart(dev_id, port_id);
    return rv;
}
Exemplo n.º 2
0
static sw_error_t
_fal_fdb_port_del(a_uint32_t dev_id, a_uint32_t fid, fal_mac_addr_t * addr, fal_port_t port_id)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->fdb_port_del)
        return SW_NOT_SUPPORTED;

    rv = p_api->fdb_port_del(dev_id, fid, addr, port_id);
    return rv;
}
Exemplo n.º 3
0
static sw_error_t
_fal_fdb_first(a_uint32_t dev_id, fal_fdb_entry_t * entry)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->fdb_first)
        return SW_NOT_SUPPORTED;

    rv = p_api->fdb_first(dev_id, entry);
    return rv;
}
Exemplo n.º 4
0
static sw_error_t
_fal_fdb_learn_exceed_cmd_get(a_uint32_t dev_id, fal_fwd_cmd_t * cmd)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->fdb_learn_exceed_cmd_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->fdb_learn_exceed_cmd_get(dev_id, cmd);
    return rv;
}
Exemplo n.º 5
0
static sw_error_t
_fal_fdb_del_by_port(a_uint32_t dev_id, fal_port_t port_id, a_uint32_t flag)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->fdb_del_by_port)
        return SW_NOT_SUPPORTED;

    rv = p_api->fdb_del_by_port(dev_id, port_id, flag);
    return rv;
}
Exemplo n.º 6
0
static sw_error_t
_fal_fdb_learn_limit_get(a_uint32_t dev_id, a_bool_t * enable, a_uint32_t * cnt)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->fdb_learn_limit_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->fdb_learn_limit_get(dev_id, enable, cnt);
    return rv;
}
Exemplo n.º 7
0
static sw_error_t
_fal_fdb_age_time_get(a_uint32_t dev_id, a_uint32_t * time)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->age_time_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->age_time_get(dev_id, time);
    return rv;
}
Exemplo n.º 8
0
static sw_error_t
_fal_fdb_vlan_ivl_svl_get(a_uint32_t dev_id, fal_fdb_smode* smode)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->vlan_ivl_svl_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->vlan_ivl_svl_get(dev_id, smode);
    return rv;
}
Exemplo n.º 9
0
static sw_error_t
_fal_port_flowctrl_get(a_uint32_t dev_id, fal_port_t port_id, a_bool_t * enable)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->port_flowctrl_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->port_flowctrl_get(dev_id, port_id, enable);
    return rv;
}
Exemplo n.º 10
0
static sw_error_t
_fal_header_type_set(a_uint32_t dev_id, a_bool_t enable, a_uint32_t type)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->header_type_set)
        return SW_NOT_SUPPORTED;

    rv = p_api->header_type_set(dev_id, enable, type);
    return rv;
}
Exemplo n.º 11
0
sw_error_t
fal_acl_rule_dump(a_uint32_t dev_id)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->acl_rule_dump)
        return SW_NOT_SUPPORTED;

    rv = p_api->acl_rule_dump(dev_id);
    return rv;
}
Exemplo n.º 12
0
static sw_error_t
_fal_acl_list_destroy(a_uint32_t dev_id, a_uint32_t list_id)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->acl_list_destroy)
        return SW_NOT_SUPPORTED;

    rv = p_api->acl_list_destroy(dev_id, list_id);
    return rv;
}
Exemplo n.º 13
0
Arquivo: fal_ip.c Projeto: jhbsz/102
static sw_error_t
_fal_ip_intf_entry_del(a_uint32_t dev_id, a_uint32_t del_mode,
                       fal_intf_mac_entry_t * entry)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->ip_intf_entry_del)
        return SW_NOT_SUPPORTED;

    rv = p_api->ip_intf_entry_del(dev_id, del_mode, entry);
    return rv;
}
Exemplo n.º 14
0
Arquivo: fal_ip.c Projeto: jhbsz/102
static sw_error_t
_fal_ip_arp_guard_get(a_uint32_t dev_id, fal_port_t port_id,
                      fal_source_guard_mode_t * mode)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->ip_arp_guard_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->ip_arp_guard_get(dev_id, port_id, mode);
    return rv;
}
Exemplo n.º 15
0
Arquivo: fal_ip.c Projeto: jhbsz/102
static sw_error_t
_fal_ip_pt_arp_learn_get(a_uint32_t dev_id, fal_port_t port_id,
                         a_uint32_t * flags)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->ip_pt_arp_learn_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->ip_pt_arp_learn_get(dev_id, port_id, flags);
    return rv;
}
Exemplo n.º 16
0
static sw_error_t
_fal_cosmap_dscp_to_pri_get(a_uint32_t dev_id, a_uint32_t dscp,
                            a_uint32_t * pri)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->cosmap_dscp_to_pri_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->cosmap_dscp_to_pri_get(dev_id, dscp, pri);
    return rv;
}
Exemplo n.º 17
0
static sw_error_t
_fal_cosmap_egress_remark_get(a_uint32_t dev_id, a_uint32_t tbl_id,
                              fal_egress_remark_table_t * tbl)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->cosmap_egress_remark_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->cosmap_egress_remark_get(dev_id, tbl_id, tbl);
    return rv;
}
Exemplo n.º 18
0
static sw_error_t
_fal_cosmap_pri_to_ehqueue_get(a_uint32_t dev_id, a_uint32_t pri,
                               a_uint32_t * queue)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->cosmap_pri_to_ehqueue_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->cosmap_pri_to_ehqueue_get(dev_id, pri, queue);
    return rv;
}
Exemplo n.º 19
0
static sw_error_t
_fal_portvlan_member_add(a_uint32_t dev_id, fal_port_t port_id,
                         a_uint32_t mem_port_id)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->portvlan_member_add)
        return SW_NOT_SUPPORTED;

    rv = p_api->portvlan_member_add(dev_id, port_id, mem_port_id);
    return rv;
}
Exemplo n.º 20
0
static sw_error_t
_fal_port_egvlanmode_get(a_uint32_t dev_id, fal_port_t port_id,
                         fal_pt_1q_egmode_t * pport_egvlanmode)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->port_egvlanmode_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->port_egvlanmode_get(dev_id, port_id, pport_egvlanmode);
    return rv;
}
Exemplo n.º 21
0
static sw_error_t
_fal_acl_rule_src_filter_sts_get(a_uint32_t dev_id,
                                 a_uint32_t rule_id, a_bool_t* enable)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->acl_rule_src_filter_sts_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->acl_rule_src_filter_sts_get(dev_id, rule_id, enable);
    return rv;
}
Exemplo n.º 22
0
sw_error_t
athena_mib_init(a_uint32_t dev_id)
{
    HSL_DEV_ID_CHECK(dev_id);

#ifndef HSL_STANDALONG
    hsl_api_t *p_api;

    SW_RTN_ON_NULL (p_api = hsl_api_ptr_get(dev_id));

    p_api->get_mib_info = athena_get_mib_info;
#endif

    return SW_OK;
}
Exemplo n.º 23
0
Arquivo: fal_ip.c Projeto: jhbsz/102
static sw_error_t
_fal_ip_host_next(a_uint32_t dev_id, a_uint32_t next_mode,
                  fal_host_entry_t * host_entry)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->ip_host_next)
        return SW_NOT_SUPPORTED;

    rv = p_api->ip_host_next(dev_id, next_mode, host_entry);
    return rv;
}
Exemplo n.º 24
0
static sw_error_t
_fal_port_rxhdr_mode_set(a_uint32_t dev_id, fal_port_t port_id,
                         fal_port_header_mode_t mode)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->port_rxhdr_mode_set)
        return SW_NOT_SUPPORTED;

    rv = p_api->port_rxhdr_mode_set(dev_id, port_id, mode);
    return rv;
}
Exemplo n.º 25
0
Arquivo: fal_ip.c Projeto: jhbsz/102
static sw_error_t
_fal_ip_host_counter_bind(a_uint32_t dev_id, a_uint32_t entry_id,
                          a_uint32_t cnt_id, a_bool_t enable)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->ip_host_counter_bind)
        return SW_NOT_SUPPORTED;

    rv = p_api->ip_host_counter_bind(dev_id, entry_id, cnt_id, enable);
    return rv;
}
Exemplo n.º 26
0
static sw_error_t
_fal_port_default_cvid_get(a_uint32_t dev_id, fal_port_t port_id,
                           a_uint32_t * vid)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->port_default_cvid_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->port_default_cvid_get(dev_id, port_id, vid);
    return rv;
}
Exemplo n.º 27
0
static sw_error_t
_fal_port_igmp_mld_learn_limit_set(a_uint32_t dev_id, fal_port_t port_id,
                                   a_bool_t enable, a_uint32_t cnt)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->port_igmp_mld_learn_limit_set)
        return SW_NOT_SUPPORTED;

    rv = p_api->port_igmp_mld_learn_limit_set(dev_id, port_id, enable, cnt);
    return rv;
}
Exemplo n.º 28
0
static sw_error_t
_fal_port_vlan_propagation_get(a_uint32_t dev_id, fal_port_t port_id,
                               fal_vlan_propagation_mode_t * mode)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->port_vlan_propagation_get)
        return SW_NOT_SUPPORTED;

    rv = p_api->port_vlan_propagation_get(dev_id, port_id, mode);
    return rv;
}
Exemplo n.º 29
0
static sw_error_t
_fal_acl_rule_query(a_uint32_t dev_id, a_uint32_t list_id, a_uint32_t rule_id,
                    fal_acl_rule_t * rule)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->acl_rule_query)
        return SW_NOT_SUPPORTED;

    rv = p_api->acl_rule_query(dev_id, list_id, rule_id, rule);
    return rv;
}
Exemplo n.º 30
0
static sw_error_t
_fal_port_vlan_trans_iterate(a_uint32_t dev_id, fal_port_t port_id,
                             a_uint32_t * iterator, fal_vlan_trans_entry_t *entry)
{
    sw_error_t rv;
    hsl_api_t *p_api;

    SW_RTN_ON_NULL(p_api = hsl_api_ptr_get(dev_id));

    if (NULL == p_api->port_vlan_trans_iterate)
        return SW_NOT_SUPPORTED;

    rv = p_api->port_vlan_trans_iterate(dev_id, port_id, iterator, entry);
    return rv;
}