OpenNSL API Guide and Reference Manual
|
Data Structures | |
struct | opennsl_port_config_s |
Port Configuration structure. More... | |
struct | opennsl_port_info_s |
opennsl_port_info_s More... | |
struct | opennsl_port_priority_group_config_s |
Priority Group attributes. More... | |
Files | |
file | portX.h |
Functions | |
int | opennsl_port_ability_advert_get (int unit, opennsl_port_t port, opennsl_port_ability_t *ability_mask) LIB_DLL_EXPORTED |
Set or retrieve auto-negotiation abilities for a port. | |
int | opennsl_port_ability_advert_set (int unit, opennsl_port_t port, opennsl_port_ability_t *ability_mask) LIB_DLL_EXPORTED |
Set or retrieve auto-negotiation abilities for a port. | |
int | opennsl_port_ability_get (int unit, opennsl_port_t port, opennsl_port_abil_t *local_ability_mask) LIB_DLL_EXPORTED |
int | opennsl_port_ability_local_get (int unit, opennsl_port_t port, opennsl_port_ability_t *local_ability_mask) LIB_DLL_EXPORTED |
Retrieve the valid abilities of a local port. | |
int | opennsl_port_ability_remote_get (int unit, opennsl_port_t port, opennsl_port_ability_t *ability_mask) LIB_DLL_EXPORTED |
Retrieve the valid abilities of a remote port. | |
void | opennsl_port_ability_t_init (opennsl_port_ability_t *ability) LIB_DLL_EXPORTED |
Initialize a Port Ability structure. | |
int | opennsl_port_advert_get (int unit, opennsl_port_t port, opennsl_port_abil_t *ability_mask) LIB_DLL_EXPORTED |
int | opennsl_port_advert_remote_get (int unit, opennsl_port_t port, opennsl_port_abil_t *ability_mask) LIB_DLL_EXPORTED |
int | opennsl_port_advert_set (int unit, opennsl_port_t port, opennsl_port_abil_t ability_mask) LIB_DLL_EXPORTED |
int | opennsl_port_autoneg_get (int unit, opennsl_port_t port, int *autoneg) LIB_DLL_EXPORTED |
Configure or retrieve the current auto-negotiation settings for a port, or restart auto-negotiation if already enabled. | |
int | opennsl_port_autoneg_set (int unit, opennsl_port_t port, int autoneg) LIB_DLL_EXPORTED |
Configure or retrieve the current auto-negotiation settings for a port, or restart auto-negotiation if already enabled. | |
int | opennsl_port_cfi_color_get (int unit, opennsl_port_t port, int cfi, opennsl_color_t *color) LIB_DLL_EXPORTED |
Set or retrieve color assignment for a given port and Canonical Format Indicator (CFI). | |
int | opennsl_port_cfi_color_set (int unit, opennsl_port_t port, int cfi, opennsl_color_t color) LIB_DLL_EXPORTED |
Set or retrieve color assignment for a given port and Canonical Format Indicator (CFI). | |
int | opennsl_port_class_get (int unit, opennsl_port_t port, opennsl_port_class_t pclass, uint32 *class_id) LIB_DLL_EXPORTED |
Set or get port classification ID to aggregate a group of ports for further processing such as VLAN translation and field processing. | |
int | opennsl_port_class_set (int unit, opennsl_port_t port, opennsl_port_class_t pclass, uint32 class_id) LIB_DLL_EXPORTED |
Set or get port classification ID to aggregate a group of ports for further processing such as VLAN translation and field processing. | |
int | opennsl_port_clear (int unit) LIB_DLL_EXPORTED |
Initialize the port subsystem without affecting the current state of stack ports. | |
int | opennsl_port_config_get (int unit, opennsl_port_config_t *config) LIB_DLL_EXPORTED |
Retrieved the port configuration for the specified device. | |
void | opennsl_port_config_t_init (opennsl_port_config_t *pconfig) LIB_DLL_EXPORTED |
Initialize a Port Configuration structure. | |
int | opennsl_port_control_get (int unit, opennsl_port_t port, opennsl_port_control_t type, int *value) LIB_DLL_EXPORTED |
Get or set various features at the port level. | |
int | opennsl_port_control_set (int unit, opennsl_port_t port, opennsl_port_control_t type, int value) LIB_DLL_EXPORTED |
Get or set various features at the port level. | |
int | opennsl_port_detach (int unit, opennsl_pbmp_t pbmp, opennsl_pbmp_t *detached) LIB_DLL_EXPORTED |
Detach ports from the OPENNSL API. | |
int | opennsl_port_dscp_map_get (int unit, opennsl_port_t port, int srccp, int *mapcp, int *prio) LIB_DLL_EXPORTED |
Control mapping of Differentiated Services Code Points (DSCP). | |
int | opennsl_port_dscp_map_mode_get (int unit, opennsl_port_t port, int *mode) LIB_DLL_EXPORTED |
Control mapping of Differentiated Services Code Points (DSCP). | |
int | opennsl_port_dscp_map_mode_set (int unit, opennsl_port_t port, int mode) LIB_DLL_EXPORTED |
Control mapping of Differentiated Services Code Points (DSCP). | |
int | opennsl_port_dscp_map_set (int unit, opennsl_port_t port, int srccp, int mapcp, int prio) LIB_DLL_EXPORTED |
Control mapping of Differentiated Services Code Points (DSCP). | |
int | opennsl_port_dtag_mode_get (int unit, opennsl_port_t port, int *mode) LIB_DLL_EXPORTED |
Set or retrieve the current double tagging mode for a port. | |
int | opennsl_port_dtag_mode_set (int unit, opennsl_port_t port, int mode) LIB_DLL_EXPORTED |
Set or retrieve the current double tagging mode for a port. | |
int | opennsl_port_duplex_get (int unit, opennsl_port_t port, int *duplex) LIB_DLL_EXPORTED |
Get or set the current duplex mode of a port. | |
int | opennsl_port_duplex_set (int unit, opennsl_port_t port, int duplex) LIB_DLL_EXPORTED |
Get or set the current duplex mode of a port. | |
int | opennsl_port_egress_get (int unit, opennsl_port_t port, int modid, opennsl_pbmp_t *pbmp) LIB_DLL_EXPORTED |
Configure ports to block or allow packets from a given ingress port. | |
int | opennsl_port_egress_set (int unit, opennsl_port_t port, int modid, opennsl_pbmp_t pbmp) LIB_DLL_EXPORTED |
Configure ports to block or allow packets from a given ingress port. | |
int | opennsl_port_enable_get (int unit, opennsl_port_t port, int *enable) LIB_DLL_EXPORTED |
Enable or disable a port. | |
int | opennsl_port_enable_set (int unit, opennsl_port_t port, int enable) LIB_DLL_EXPORTED |
Enable or disable a port. | |
int | opennsl_port_flood_block_get (int unit, opennsl_port_t ingress_port, opennsl_port_t egress_port, uint32 *flags) LIB_DLL_EXPORTED |
Selectively block flooding traffic. | |
int | opennsl_port_flood_block_set (int unit, opennsl_port_t ingress_port, opennsl_port_t egress_port, uint32 flags) LIB_DLL_EXPORTED |
Selectively block flooding traffic. | |
int | opennsl_port_frame_max_get (int unit, opennsl_port_t port, int *size) LIB_DLL_EXPORTED |
Set or retrieve the current maximum packet size permitted on a port. | |
int | opennsl_port_frame_max_set (int unit, opennsl_port_t port, int size) LIB_DLL_EXPORTED |
Set or retrieve the current maximum packet size permitted on a port. | |
int | opennsl_port_gport_get (int unit, opennsl_port_t port, opennsl_gport_t *gport) LIB_DLL_EXPORTED |
Get the GPORT ID for the specified local port number. | |
int | opennsl_port_ifilter_set (int unit, opennsl_port_t port, int mode) LIB_DLL_EXPORTED |
Set or retrieve current behavior of tagged packets arriving on a port not a member of the specified VLAN. | |
void | opennsl_port_info_t_init (opennsl_port_info_t *info) LIB_DLL_EXPORTED |
Initializes the opennsl_port_info_t structure. | |
int | opennsl_port_init (int unit) LIB_DLL_EXPORTED |
Initialize the port subsystem. | |
int | opennsl_port_interface_get (int unit, opennsl_port_t port, opennsl_port_if_t *intf) LIB_DLL_EXPORTED |
Configure the physical interface between the MAC and the PHY for the specified port. | |
int | opennsl_port_interface_set (int unit, opennsl_port_t port, opennsl_port_if_t intf) LIB_DLL_EXPORTED |
Configure the physical interface between the MAC and the PHY for the specified port. | |
int | opennsl_port_l3_mtu_get (int unit, opennsl_port_t port, int *size) LIB_DLL_EXPORTED |
Set or retrieve the current maximum L3 packet size permitted on a port. | |
int | opennsl_port_l3_mtu_set (int unit, opennsl_port_t port, int size) LIB_DLL_EXPORTED |
Set or retrieve the current maximum L3 packet size permitted on a port. | |
int | opennsl_port_learn_get (int unit, opennsl_port_t port, uint32 *flags) LIB_DLL_EXPORTED |
Control the hardware and software learning support on a port. | |
int | opennsl_port_learn_set (int unit, opennsl_port_t port, uint32 flags) LIB_DLL_EXPORTED |
Control the hardware and software learning support on a port. | |
int | opennsl_port_link_failed_clear (int unit, opennsl_port_t port) LIB_DLL_EXPORTED |
Clear failed link status from a port which has undergone LAG failover. | |
int | opennsl_port_link_status_get (int unit, opennsl_port_t port, int *status) LIB_DLL_EXPORTED |
Retrieve the current link status of a port. | |
int | opennsl_port_linkscan_get (int unit, opennsl_port_t port, int *linkscan) LIB_DLL_EXPORTED |
Get or set the current linkscan mode for the specified port. | |
int | opennsl_port_linkscan_set (int unit, opennsl_port_t port, int linkscan) LIB_DLL_EXPORTED |
Get or set the current linkscan mode for the specified port. | |
int | opennsl_port_local_get (int unit, opennsl_gport_t gport, opennsl_port_t *local_port) LIB_DLL_EXPORTED |
Get local port number encoded within a GPORT ID. | |
int | opennsl_port_loopback_get (int unit, opennsl_port_t port, int *loopback) LIB_DLL_EXPORTED |
Set or retrieve the current loopback mode of a port. | |
int | opennsl_port_loopback_set (int unit, opennsl_port_t port, int loopback) LIB_DLL_EXPORTED |
Set or retrieve the current loopback mode of a port. | |
char * | opennsl_port_name (int unit, int port) LIB_DLL_EXPORTED |
int | opennsl_port_pause_addr_get (int unit, opennsl_port_t port, opennsl_mac_t mac) LIB_DLL_EXPORTED |
Get or set the source MAC address transmitted in MAC control pause frames. | |
int | opennsl_port_pause_addr_set (int unit, opennsl_port_t port, opennsl_mac_t mac) LIB_DLL_EXPORTED |
Get or set the source MAC address transmitted in MAC control pause frames. | |
int | opennsl_port_pause_get (int unit, opennsl_port_t port, int *pause_tx, int *pause_rx) LIB_DLL_EXPORTED |
Enable or disable transmission of pause frames and honoring received pause frames on a port. | |
int | opennsl_port_pause_set (int unit, opennsl_port_t port, int pause_tx, int pause_rx) LIB_DLL_EXPORTED |
Enable or disable transmission of pause frames and honoring received pause frames on a port. | |
int | opennsl_port_pause_sym_get (int unit, opennsl_port_t port, int *pause) LIB_DLL_EXPORTED |
Configure or retrieve asymmetric pause setting for a port. | |
int | opennsl_port_pause_sym_set (int unit, opennsl_port_t port, int pause) LIB_DLL_EXPORTED |
Configure or retrieve asymmetric pause setting for a port. | |
int | opennsl_port_phy_control_get (int unit, opennsl_port_t port, opennsl_port_phy_control_t type, uint32 *value) LIB_DLL_EXPORTED |
Set/Get PHY specific configurations. | |
int | opennsl_port_phy_control_set (int unit, opennsl_port_t port, opennsl_port_phy_control_t type, uint32 value) LIB_DLL_EXPORTED |
Set/Get PHY specific configurations. | |
int | opennsl_port_phy_modify (int unit, opennsl_port_t port, uint32 flags, uint32 phy_reg_addr, uint32 phy_data, uint32 phy_mask) LIB_DLL_EXPORTED |
Read or write PHY registers associated with a port. | |
int | opennsl_port_priority_color_get (int unit, opennsl_port_t port, int prio, opennsl_color_t *color) LIB_DLL_EXPORTED |
Set or retrieve color assignment for a given port and priority. | |
int | opennsl_port_priority_color_set (int unit, opennsl_port_t port, int prio, opennsl_color_t color) LIB_DLL_EXPORTED |
Set or retrieve color assignment for a given port and priority. | |
int | opennsl_port_priority_group_config_get (int unit, opennsl_gport_t gport, int priority_group, opennsl_port_priority_group_config_t *prigrp_config) LIB_DLL_EXPORTED |
Set/get the port priority group configuration. | |
int | opennsl_port_priority_group_config_set (int unit, opennsl_gport_t gport, int priority_group, opennsl_port_priority_group_config_t *prigrp_config) LIB_DLL_EXPORTED |
Set/get the port priority group configuration. | |
void | opennsl_port_priority_group_config_t_init (opennsl_port_priority_group_config_t *prigrp_config) LIB_DLL_EXPORTED |
Initialize a port priority group configuration struct. | |
int | opennsl_port_priority_group_mapping_get (int unit, opennsl_gport_t gport, int prio, int *priority_group) LIB_DLL_EXPORTED |
Assign/retrieve the Priority Group mapped to the input priority. | |
int | opennsl_port_priority_group_mapping_set (int unit, opennsl_gport_t gport, int prio, int priority_group) LIB_DLL_EXPORTED |
Assign/retrieve the Priority Group mapped to the input priority. | |
int | opennsl_port_probe (int unit, opennsl_pbmp_t pbmp, opennsl_pbmp_t *okay_pbmp) LIB_DLL_EXPORTED |
Probe the port to determine the proper MAC and PHY drivers. | |
int | opennsl_port_queued_count_get (int unit, opennsl_port_t port, uint32 *count) LIB_DLL_EXPORTED |
Get the current count of cells or packets queued on a port for transmission. | |
int | opennsl_port_sample_rate_get (int unit, opennsl_port_t port, int *ingress_rate, int *egress_rate) LIB_DLL_EXPORTED |
Control the sampling of packets ingressing or egressing a port. | |
int | opennsl_port_sample_rate_set (int unit, opennsl_port_t port, int ingress_rate, int egress_rate) LIB_DLL_EXPORTED |
Control the sampling of packets ingressing or egressing a port. | |
int | opennsl_port_selective_get (int unit, opennsl_port_t port, opennsl_port_info_t *info) LIB_DLL_EXPORTED |
Get or set multiple port characteristics. | |
int | opennsl_port_selective_set (int unit, opennsl_port_t port, opennsl_port_info_t *info) LIB_DLL_EXPORTED |
Get or set multiple port characteristics. | |
int | opennsl_port_speed_get (int unit, opennsl_port_t port, int *speed) LIB_DLL_EXPORTED |
Get or set the current operating speed of a port. | |
int | opennsl_port_speed_max (int unit, opennsl_port_t port, int *speed) LIB_DLL_EXPORTED |
Get or set the current operating speed of a port. | |
int | opennsl_port_speed_set (int unit, opennsl_port_t port, int speed) LIB_DLL_EXPORTED |
Get or set the current operating speed of a port. | |
int | opennsl_port_stat_enable_set (int unit, opennsl_gport_t port, int enable) LIB_DLL_EXPORTED |
Enable/disable packet and byte counters for the selected gport. | |
int | opennsl_port_stp_get (int unit, opennsl_port_t port, int *state) LIB_DLL_EXPORTED |
Set the spanning tree state for a port (single instance spanning tree only). | |
int | opennsl_port_stp_set (int unit, opennsl_port_t port, int state) LIB_DLL_EXPORTED |
Set the spanning tree state for a port (single instance spanning tree only). | |
int | opennsl_port_subsidiary_ports_get (int unit, opennsl_port_t port, opennsl_pbmp_t *pbmp) LIB_DLL_EXPORTED |
Get the list of ancillary/flex ports belonging to the same port block as the controlling port. | |
int | opennsl_port_untagged_priority_get (int unit, opennsl_port_t port, int *priority) LIB_DLL_EXPORTED |
Get or set the default priority for packets that ingress untagged. | |
int | opennsl_port_untagged_priority_set (int unit, opennsl_port_t port, int priority) LIB_DLL_EXPORTED |
Get or set the default priority for packets that ingress untagged. | |
int | opennsl_port_untagged_vlan_get (int unit, opennsl_port_t port, opennsl_vlan_t *vid_ptr) LIB_DLL_EXPORTED |
Get or set the default VLAN for packets that ingress untagged. | |
int | opennsl_port_untagged_vlan_set (int unit, opennsl_port_t port, opennsl_vlan_t vid) LIB_DLL_EXPORTED |
Get or set the default VLAN for packets that ingress untagged. | |
int | opennsl_port_vlan_member_get (int unit, opennsl_port_t port, uint32 *flags) LIB_DLL_EXPORTED |
Set or retrieve current behavior of tagged packets arriving/leaving on a port not a member of the specified VLAN. | |
int | opennsl_port_vlan_member_set (int unit, opennsl_port_t port, uint32 flags) LIB_DLL_EXPORTED |
Set or retrieve current behavior of tagged packets arriving/leaving on a port not a member of the specified VLAN. | |
int | opennsl_port_vlan_priority_map_get (int unit, opennsl_port_t port, int pkt_pri, int cfi, int *internal_pri, opennsl_color_t *color) LIB_DLL_EXPORTED |
int | opennsl_port_vlan_priority_map_set (int unit, opennsl_port_t port, int pkt_pri, int cfi, int internal_pri, opennsl_color_t color) LIB_DLL_EXPORTED |
#define OPENNSL_PIPES_MAX _SHR_SWITCH_MAX_PIPES |
#define OPENNSL_PORT_ABIL_1000MB _SHR_PM_1000MB |
#define OPENNSL_PORT_ABIL_1000MB_FD _SHR_PM_1000MB_FD |
#define OPENNSL_PORT_ABIL_1000MB_HD _SHR_PM_1000MB_HD |
#define OPENNSL_PORT_ABIL_100MB _SHR_PM_100MB |
#define OPENNSL_PORT_ABIL_100MB_FD _SHR_PM_100MB_FD |
#define OPENNSL_PORT_ABIL_100MB_HD _SHR_PM_100MB_HD |
#define OPENNSL_PORT_ABIL_10B OPENNSL_PORT_ABIL_TBI |
#define OPENNSL_PORT_ABIL_10GB _SHR_PM_10GB |
#define OPENNSL_PORT_ABIL_10GB_FD _SHR_PM_10GB_FD |
#define OPENNSL_PORT_ABIL_10GB_HD _SHR_PM_10GB_HD |
#define OPENNSL_PORT_ABIL_10MB _SHR_PM_10MB |
#define OPENNSL_PORT_ABIL_10MB_FD _SHR_PM_10MB_FD |
#define OPENNSL_PORT_ABIL_10MB_HD _SHR_PM_10MB_HD |
#define OPENNSL_PORT_ABIL_12GB _SHR_PM_12GB |
#define OPENNSL_PORT_ABIL_12GB_FD _SHR_PM_12GB_FD |
#define OPENNSL_PORT_ABIL_12GB_HD _SHR_PM_12GB_HD |
#define OPENNSL_PORT_ABIL_13GB _SHR_PM_13GB |
#define OPENNSL_PORT_ABIL_13GB_FD _SHR_PM_13GB_FD |
#define OPENNSL_PORT_ABIL_13GB_HD _SHR_PM_13GB_HD |
#define OPENNSL_PORT_ABIL_16GB _SHR_PM_16GB |
#define OPENNSL_PORT_ABIL_16GB_FD _SHR_PM_16GB_FD |
#define OPENNSL_PORT_ABIL_16GB_HD _SHR_PM_16GB_HD |
#define OPENNSL_PORT_ABIL_2500MB _SHR_PM_2500MB |
#define OPENNSL_PORT_ABIL_2500MB_FD _SHR_PM_2500MB_FD |
#define OPENNSL_PORT_ABIL_2500MB_HD _SHR_PM_2500MB_HD |
#define OPENNSL_PORT_ABIL_3000MB _SHR_PM_3000MB |
#define OPENNSL_PORT_ABIL_3000MB_FD _SHR_PM_3000MB_FD |
#define OPENNSL_PORT_ABIL_3000MB_HD _SHR_PM_3000MB_HD |
#define OPENNSL_PORT_ABIL_AN _SHR_PM_AN |
#define OPENNSL_PORT_ABIL_COMBO _SHR_PM_COMBO |
#define OPENNSL_PORT_ABIL_FD _SHR_PM_FD |
#define OPENNSL_PORT_ABIL_GMII _SHR_PM_GMII |
#define OPENNSL_PORT_ABIL_HD _SHR_PM_HD |
#define OPENNSL_PORT_ABIL_LB_MAC _SHR_PM_LB_MAC |
#define OPENNSL_PORT_ABIL_LB_NONE _SHR_PM_LB_NONE |
#define OPENNSL_PORT_ABIL_LB_PHY _SHR_PM_LB_PHY |
#define OPENNSL_PORT_ABIL_MII _SHR_PM_MII |
#define OPENNSL_PORT_ABIL_PAUSE _SHR_PM_PAUSE |
#define OPENNSL_PORT_ABIL_PAUSE_ASYMM _SHR_PM_PAUSE_ASYMM |
#define OPENNSL_PORT_ABIL_PAUSE_RX _SHR_PM_PAUSE_RX |
#define OPENNSL_PORT_ABIL_PAUSE_TX _SHR_PM_PAUSE_TX |
#define OPENNSL_PORT_ABIL_SGMII _SHR_PM_SGMII |
#define OPENNSL_PORT_ABIL_SPD_ANY _SHR_PM_SPEED_ALL |
#define OPENNSL_PORT_ABIL_SPD_MAX | ( | abil | ) | _SHR_PM_SPEED_MAX(abil) |
#define OPENNSL_PORT_ABIL_TBI _SHR_PM_TBI |
#define OPENNSL_PORT_ABIL_XGMII _SHR_PM_XGMII |
#define OPENNSL_PORT_ABILITY_1000MB _SHR_PA_SPEED_1000MB |
#define OPENNSL_PORT_ABILITY_100GB _SHR_PA_SPEED_100GB |
#define OPENNSL_PORT_ABILITY_100MB _SHR_PA_SPEED_100MB |
#define OPENNSL_PORT_ABILITY_106GB _SHR_PA_SPEED_106GB |
#define OPENNSL_PORT_ABILITY_10GB _SHR_PA_SPEED_10GB |
#define OPENNSL_PORT_ABILITY_10MB _SHR_PA_SPEED_10MB |
#define OPENNSL_PORT_ABILITY_11GB _SHR_PA_SPEED_11GB |
#define OPENNSL_PORT_ABILITY_120GB _SHR_PA_SPEED_120GB |
#define OPENNSL_PORT_ABILITY_127GB _SHR_PA_SPEED_127GB |
#define OPENNSL_PORT_ABILITY_12GB _SHR_PA_SPEED_12GB |
#define OPENNSL_PORT_ABILITY_12P5GB _SHR_PA_SPEED_12P5GB |
#define OPENNSL_PORT_ABILITY_13GB _SHR_PA_SPEED_13GB |
#define OPENNSL_PORT_ABILITY_15GB _SHR_PA_SPEED_15GB |
#define OPENNSL_PORT_ABILITY_16GB _SHR_PA_SPEED_16GB |
#define OPENNSL_PORT_ABILITY_20GB _SHR_PA_SPEED_20GB |
#define OPENNSL_PORT_ABILITY_21GB _SHR_PA_SPEED_21GB |
#define OPENNSL_PORT_ABILITY_23GB _SHR_PA_SPEED_23GB |
#define OPENNSL_PORT_ABILITY_24GB _SHR_PA_SPEED_24GB |
#define OPENNSL_PORT_ABILITY_2500MB _SHR_PA_SPEED_2500MB |
#define OPENNSL_PORT_ABILITY_25GB _SHR_PA_SPEED_25GB |
#define OPENNSL_PORT_ABILITY_27GB _SHR_PA_SPEED_27GB |
#define OPENNSL_PORT_ABILITY_3000MB _SHR_PA_SPEED_3000MB |
#define OPENNSL_PORT_ABILITY_30GB _SHR_PA_SPEED_30GB |
#define OPENNSL_PORT_ABILITY_32GB _SHR_PA_SPEED_32GB |
#define OPENNSL_PORT_ABILITY_40GB _SHR_PA_SPEED_40GB |
#define OPENNSL_PORT_ABILITY_42GB _SHR_PA_SPEED_42GB |
#define OPENNSL_PORT_ABILITY_48GB _SHR_PA_SPEED_48GB |
#define OPENNSL_PORT_ABILITY_5000MB _SHR_PA_SPEED_5000MB |
#define OPENNSL_PORT_ABILITY_50GB _SHR_PA_SPEED_50GB |
#define OPENNSL_PORT_ABILITY_53GB _SHR_PA_SPEED_53GB |
#define OPENNSL_PORT_ABILITY_6000MB _SHR_PA_SPEED_6000MB |
#define OPENNSL_PORT_ABILITY_AUTONEG _SHR_PA_AUTONEG |
#define OPENNSL_PORT_ABILITY_CHANNEL_LONG _SHR_PA_CHANNEL_LONG |
#define OPENNSL_PORT_ABILITY_CHANNEL_SHORT _SHR_PA_CHANNEL_SHORT |
#define OPENNSL_PORT_ABILITY_COMBO _SHR_PA_COMBO |
#define OPENNSL_PORT_ABILITY_EEE_100MB_BASETX _SHR_PA_EEE_100MB_BASETX |
#define OPENNSL_PORT_ABILITY_EEE_10GB_BASET _SHR_PA_EEE_10GB_BASET |
#define OPENNSL_PORT_ABILITY_EEE_10GB_KR _SHR_PA_EEE_10GB_KR |
#define OPENNSL_PORT_ABILITY_EEE_10GB_KX _SHR_PA_EEE_10GB_KX |
#define OPENNSL_PORT_ABILITY_EEE_10GB_KX4 _SHR_PA_EEE_10GB_KX4 |
#define OPENNSL_PORT_ABILITY_EEE_1GB_BASET _SHR_PA_EEE_1GB_BASET |
#define OPENNSL_PORT_ABILITY_FEC_CL74 _SHR_PA_FEC_CL74 |
#define OPENNSL_PORT_ABILITY_FEC_CL91 _SHR_PA_FEC_CL91 |
#define OPENNSL_PORT_ABILITY_FEC_NONE _SHR_PA_FEC_NONE |
#define OPENNSL_PORT_ABILITY_INTERFACE_CGMII _SHR_PA_INTF_CGMII |
#define OPENNSL_PORT_ABILITY_INTERFACE_GMII _SHR_PA_INTF_GMII |
#define OPENNSL_PORT_ABILITY_INTERFACE_MII _SHR_PA_INTF_MII |
#define OPENNSL_PORT_ABILITY_INTERFACE_QSGMII _SHR_PA_INTF_QSGMII |
#define OPENNSL_PORT_ABILITY_INTERFACE_SGMII _SHR_PA_INTF_SGMII |
#define OPENNSL_PORT_ABILITY_INTERFACE_TBI _SHR_PA_INTF_TBI |
#define OPENNSL_PORT_ABILITY_INTERFACE_XGMII _SHR_PA_INTF_XGMII |
#define OPENNSL_PORT_ABILITY_LB_LINE _SHR_PA_LB_LINE |
#define OPENNSL_PORT_ABILITY_LB_MAC _SHR_PA_LB_MAC |
#define OPENNSL_PORT_ABILITY_LB_NONE _SHR_PA_LB_NONE |
#define OPENNSL_PORT_ABILITY_LB_PHY _SHR_PA_LB_PHY |
#define OPENNSL_PORT_ABILITY_MEDIUM_BACKPLANE _SHR_PA_MEDIUM_BACKPLANE |
#define OPENNSL_PORT_ABILITY_MEDIUM_COPPER _SHR_PA_MEDIUM_COPPER |
#define OPENNSL_PORT_ABILITY_MEDIUM_FIBER _SHR_PA_MEDIUM_FIBER |
#define OPENNSL_PORT_ABILITY_PAUSE _SHR_PA_PAUSE |
#define OPENNSL_PORT_ABILITY_PAUSE_ASYMM _SHR_PA_PAUSE_ASYMM |
#define OPENNSL_PORT_ABILITY_PAUSE_RX _SHR_PA_PAUSE_RX |
Definition at line 119 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ABILITY_PAUSE_TX _SHR_PA_PAUSE_TX |
Definition at line 118 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ABILITY_SPEED_MAX | ( | abil | ) | _SHR_PA_SPEED_MAX(abil) |
#define OPENNSL_PORT_ATTR_AUTONEG_MASK 0x00000004 |
Definition at line 2340 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ATTR_DUPLEX_MASK 0x00000010 |
Definition at line 2342 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ATTR_ENABLE_MASK 0x00000001 |
Definition at line 2338 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ATTR_LINKSCAN_MASK 0x00000020 |
Definition at line 2343 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ATTR_LINKSTAT_MASK 0x00000002 |
#define OPENNSL_PORT_ATTR_PAUSE_RX_MASK 0x00020000 |
Definition at line 2355 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ATTR_PAUSE_TX_MASK 0x00010000 |
Definition at line 2354 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ATTR_REMOTE_ADVERT_MASK 0x00100000 |
#define OPENNSL_PORT_ATTR_SPEED_MASK 0x00000008 |
Definition at line 2341 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_ATTR_SPEED_MAX_MASK 0x02000000 |
#define OPENNSL_PORT_CONTROL_SAMPLE_DEST_CPU 0x1 |
#define OPENNSL_PORT_CONTROL_SAMPLE_DEST_MIRROR 0x2 |
#define OPENNSL_PORT_DSCP_MAP_DEFAULT 4 |
#define OPENNSL_PORT_DSCP_MAP_NONE 0 |
#define OPENNSL_PORT_DSCP_MAP_UNTAGGED_ONLY 3 |
#define OPENNSL_PORT_DSCP_MAP_ZERO 1 |
#define OPENNSL_PORT_DTAG_MODE_INTERNAL 1 |
#define OPENNSL_PORT_DUPLEX_COUNT _SHR_PORT_DUPLEX_COUNT |
#define OPENNSL_PORT_DUPLEX_FULL _SHR_PORT_DUPLEX_FULL |
Definition at line 1211 of file port.h.
Referenced by example_port_default_config().
#define OPENNSL_PORT_DUPLEX_HALF _SHR_PORT_DUPLEX_HALF |
#define OPENNSL_PORT_IF_10B OPENNSL_PORT_IF_TBI |
#define OPENNSL_PORT_IF_CAUI _SHR_PORT_IF_CAUI |
#define OPENNSL_PORT_IF_CAUI4 _SHR_PORT_IF_CAUI4 |
#define OPENNSL_PORT_IF_CAUI_C2C _SHR_PORT_IF_CAUI_C2C |
#define OPENNSL_PORT_IF_CAUI_C2M _SHR_PORT_IF_CAUI_C2M |
#define OPENNSL_PORT_IF_COUNT _SHR_PORT_IF_COUNT |
#define OPENNSL_PORT_IF_CPU _SHR_PORT_IF_CPU |
#define OPENNSL_PORT_IF_CR _SHR_PORT_IF_CR |
#define OPENNSL_PORT_IF_CR10 _SHR_PORT_IF_CR10 |
#define OPENNSL_PORT_IF_CR2 _SHR_PORT_IF_CR2 |
#define OPENNSL_PORT_IF_CR4 _SHR_PORT_IF_CR4 |
#define OPENNSL_PORT_IF_CX _SHR_PORT_IF_CX |
#define OPENNSL_PORT_IF_CX2 _SHR_PORT_IF_CX2 |
#define OPENNSL_PORT_IF_CX4 _SHR_PORT_IF_CX4 |
#define OPENNSL_PORT_IF_ER _SHR_PORT_IF_ER |
#define OPENNSL_PORT_IF_ER2 _SHR_PORT_IF_ER2 |
#define OPENNSL_PORT_IF_ER4 _SHR_PORT_IF_ER4 |
#define OPENNSL_PORT_IF_ERP _SHR_PORT_IF_ERP |
#define OPENNSL_PORT_IF_EVENTOR _SHR_PORT_IF_EVENTOR |
#define OPENNSL_PORT_IF_FAT_PIPE _SHR_PORT_IF_FAT_PIPE |
#define OPENNSL_PORT_IF_GMII _SHR_PORT_IF_GMII |
#define OPENNSL_PORT_IF_ILKN _SHR_PORT_IF_ILKN |
#define OPENNSL_PORT_IF_KR _SHR_PORT_IF_KR |
#define OPENNSL_PORT_IF_KR10 _SHR_PORT_IF_KR10 |
#define OPENNSL_PORT_IF_KR2 _SHR_PORT_IF_KR2 |
#define OPENNSL_PORT_IF_KR4 _SHR_PORT_IF_KR4 |
#define OPENNSL_PORT_IF_KX _SHR_PORT_IF_KX |
#define OPENNSL_PORT_IF_LBG _SHR_PORT_IF_LBG |
#define OPENNSL_PORT_IF_LR _SHR_PORT_IF_LR |
#define OPENNSL_PORT_IF_LR10 _SHR_PORT_IF_LR10 |
#define OPENNSL_PORT_IF_LR2 _SHR_PORT_IF_LR2 |
#define OPENNSL_PORT_IF_LR4 _SHR_PORT_IF_LR4 |
#define OPENNSL_PORT_IF_LRM _SHR_PORT_IF_LRM |
#define OPENNSL_PORT_IF_MII _SHR_PORT_IF_MII |
#define OPENNSL_PORT_IF_NOCXN _SHR_PORT_IF_NOCXN |
#define OPENNSL_PORT_IF_NULL _SHR_PORT_IF_NULL |
#define OPENNSL_PORT_IF_OAMP _SHR_PORT_IF_OAMP |
#define OPENNSL_PORT_IF_OLP _SHR_PORT_IF_OLP |
#define OPENNSL_PORT_IF_OTL _SHR_PORT_IF_OTL |
#define OPENNSL_PORT_IF_QSGMII _SHR_PORT_IF_QSGMII |
#define OPENNSL_PORT_IF_RCY _SHR_PORT_IF_RCY |
#define OPENNSL_PORT_IF_RCY_MIRROR _SHR_PORT_IF_RCY_MIRROR |
#define OPENNSL_PORT_IF_RGMII _SHR_PORT_IF_RGMII |
#define OPENNSL_PORT_IF_RXAUI _SHR_PORT_IF_RXAUI |
#define OPENNSL_PORT_IF_SAT _SHR_PORT_IF_SAT |
#define OPENNSL_PORT_IF_SFI _SHR_PORT_IF_SFI |
#define OPENNSL_PORT_IF_SGMII _SHR_PORT_IF_SGMII |
#define OPENNSL_PORT_IF_SPAUI _SHR_PORT_IF_SPAUI |
#define OPENNSL_PORT_IF_SR _SHR_PORT_IF_SR |
#define OPENNSL_PORT_IF_SR10 _SHR_PORT_IF_SR10 |
#define OPENNSL_PORT_IF_SR2 _SHR_PORT_IF_SR2 |
#define OPENNSL_PORT_IF_SR4 _SHR_PORT_IF_SR4 |
#define OPENNSL_PORT_IF_TBI _SHR_PORT_IF_TBI |
#define OPENNSL_PORT_IF_VSR _SHR_PORT_IF_VSR |
#define OPENNSL_PORT_IF_XAUI _SHR_PORT_IF_XAUI |
#define OPENNSL_PORT_IF_XFI _SHR_PORT_IF_XFI |
#define OPENNSL_PORT_IF_XGMII _SHR_PORT_IF_XGMII |
#define OPENNSL_PORT_IF_XLAUI _SHR_PORT_IF_XLAUI |
#define OPENNSL_PORT_IF_XLAUI2 _SHR_PORT_IF_XLAUI2 |
#define OPENNSL_PORT_IF_XLPPI _SHR_PORT_IF_XLPPI |
#define OPENNSL_PORT_IF_ZR _SHR_PORT_IF_ZR |
#define OPENNSL_PORT_LEARN_PENDING 0x08 |
#define OPENNSL_PORT_MDIX_AUTO _SHR_PORT_MDIX_AUTO |
#define OPENNSL_PORT_MDIX_COUNT _SHR_PORT_MDIX_COUNT |
#define OPENNSL_PORT_MDIX_FORCE_AUTO _SHR_PORT_MDIX_FORCE_AUTO |
#define OPENNSL_PORT_MDIX_NORMAL _SHR_PORT_MDIX_NORMAL |
#define OPENNSL_PORT_MDIX_STATUS_COUNT _SHR_PORT_MDIX_STATUS_COUNT |
#define OPENNSL_PORT_MDIX_STATUS_NORMAL _SHR_PORT_MDIX_STATUS_NORMAL |
#define OPENNSL_PORT_MDIX_STATUS_XOVER _SHR_PORT_MDIX_STATUS_XOVER |
#define OPENNSL_PORT_MDIX_XOVER _SHR_PORT_MDIX_XOVER |
#define OPENNSL_PORT_MEDIUM_COPPER _SHR_PORT_MEDIUM_COPPER |
#define OPENNSL_PORT_MEDIUM_COUNT _SHR_PORT_MEDIUM_COUNT |
#define OPENNSL_PORT_MEDIUM_FIBER _SHR_PORT_MEDIUM_FIBER |
#define OPENNSL_PORT_MEDIUM_NONE _SHR_PORT_MEDIUM_NONE |
#define OPENNSL_PORT_PHY_CLAUSE45 _SHR_PORT_PHY_CLAUSE45 |
#define OPENNSL_PORT_PHY_CLAUSE45_ADDR | ( | _devad, | |
_regad | |||
) | _SHR_PORT_PHY_CLAUSE45_ADDR(_devad, _regad) |
#define OPENNSL_PORT_PHY_CONTROL_FEC_OFF _SHR_PORT_PHY_CONTROL_FEC_OFF |
#define OPENNSL_PORT_PHY_CONTROL_FEC_ON _SHR_PORT_PHY_CONTROL_FEC_ON |
#define OPENNSL_PORT_PHY_CONTROL_FORWARD_ERROR_CORRECTION _SHR_PORT_PHY_CONTROL_FORWARD_ERROR_CORRECTION |
#define OPENNSL_PORT_PHY_CONTROL_RX_LOS_FIRMWARE _SHR_PORT_PHY_CONTROL_RX_LOS_FIRMWARE |
#define OPENNSL_PORT_PHY_CONTROL_RX_LOS_NONE _SHR_PORT_PHY_CONTROL_RX_LOS_NONE |
#define OPENNSL_PORT_PHY_CONTROL_RX_LOS_SOFTWARE _SHR_PORT_PHY_CONTROL_RX_LOS_SOFTWARE |
#define OPENNSL_PORT_PHY_CONTROL_SOFTWARE_RX_LOS _SHR_PORT_PHY_CONTROL_SOFTWARE_RX_LOS |
#define OPENNSL_PORT_PHY_CONTROL_SOFTWARE_RX_LOS_LINK_WAIT_TIMER_US _SHR_PORT_PHY_CONTROL_SOFTWARE_RX_LOS_LINK_WAIT_TIMER_US |
#define OPENNSL_PORT_PHY_CONTROL_SOFTWARE_RX_LOS_RESTART_TIMER_US _SHR_PORT_PHY_CONTROL_SOFTWARE_RX_LOS_RESTART_TIMER_US |
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X11_X9_1 _SHR_PORT_PRBS_POLYNOMIAL_X11_X9_1 |
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X15_X14_1 _SHR_PORT_PRBS_POLYNOMIAL_X15_X14_1 |
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X23_X18_1 _SHR_PORT_PRBS_POLYNOMIAL_X23_X18_1 |
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X31_X28_1 _SHR_PORT_PRBS_POLYNOMIAL_X31_X28_1 |
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X58_X31_1 _SHR_PORT_PRBS_POLYNOMIAL_X58_X31_1 |
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X7_X6_1 _SHR_PORT_PRBS_POLYNOMIAL_X7_X6_1 |
#define OPENNSL_PORT_PRBS_POLYNOMIAL_X9_X5_1 _SHR_PORT_PRBS_POLYNOMIAL_X9_X5_1 |
typedef _shr_port_mode_t opennsl_port_abil_t |
Port ability mask.
The following flags are used to indicate which set of capabilities are provided by a PHY or MAC when retrieving the ability of a port, setting or getting the local advertisement, getting the remote advertisement, or setting the MAC encapsulation and/or CRC modes.
typedef enum opennsl_port_class_e opennsl_port_class_t |
opennsl_port_class_e
typedef struct opennsl_port_config_s opennsl_port_config_t |
Port Configuration structure.
typedef enum opennsl_port_control_e opennsl_port_control_t |
Features that can be controlled on a per-port basis.
Parameter for opennslPortControlFieldEgressClassSelect.
typedef _shr_port_if_t opennsl_port_if_t |
typedef struct opennsl_port_info_s opennsl_port_info_t |
typedef enum opennsl_port_loopback_e opennsl_port_loopback_t |
Port loopback modes.
typedef _shr_port_mdix_t opennsl_port_mdix_t |
typedef enum opennsl_port_pause_e opennsl_port_pause_t |
Port pause modes (mainly used by the OPENNSLX layer).
Priority Group attributes.
enum opennsl_port_class_e |
opennsl_port_class_e
Features that can be controlled on a per-port basis.
enum opennsl_port_pause_e |
int opennsl_port_ability_advert_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_ability_t * | ability_mask | ||
) |
Set or retrieve auto-negotiation abilities for a port.
unit | [IN] Unit number. |
port | [IN] Physical or logical port to query or set information on. |
ability_mask | [OUT] Extended abilities structure, =EXTENDED_PORT_ABILITY_s . |
OPENNSL_E_NONE | Requested action performed. |
OPENNSL_E_XXX | Operation failed |
int opennsl_port_ability_advert_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_ability_t * | ability_mask | ||
) |
Set or retrieve auto-negotiation abilities for a port.
unit | [IN] Unit number. |
port | [IN] Physical or logical port to query or set information on. |
ability_mask | [IN] Extended abilities structure, =EXTENDED_PORT_ABILITY_s . |
OPENNSL_E_NONE | Requested action performed. |
OPENNSL_E_XXX | Operation failed |
int opennsl_port_ability_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_abil_t * | local_ability_mask | ||
) |
unit | [IN] Unit number. |
port | [IN] |
local_ability_mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_port_ability_local_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_ability_t * | local_ability_mask | ||
) |
Retrieve the valid abilities of a local port.
unit | [IN] Unit number. |
port | [IN] Physical or logical port to query or set information on. |
local_ability_mask | [OUT] Extended ability structure =EXTENDED_PORT_ABILITY_s |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_XXX | Operation failed, the return value local_ability_mask is undefined. |
int opennsl_port_ability_remote_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_ability_t * | ability_mask | ||
) |
Retrieve the valid abilities of a remote port.
unit | [IN] Unit number. |
port | [IN] Physical or logical port to query or set information on. |
ability_mask | [OUT] |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_XXX | Operation failed, the return value local_ability_mask is undefined. |
void opennsl_port_ability_t_init | ( | opennsl_port_ability_t * | ability | ) |
Initialize a Port Ability structure.
ability | [IN,OUT] |
None. |
int opennsl_port_advert_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_abil_t * | ability_mask | ||
) |
unit | [IN] Unit number. |
port | [IN] |
ability_mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_port_advert_remote_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_abil_t * | ability_mask | ||
) |
unit | [IN] Unit number. |
port | [IN] |
ability_mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_port_advert_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_abil_t | ability_mask | ||
) |
unit | [IN] Unit number. |
port | [IN] |
ability_mask | [IN] |
OPENNSL_E_xxx |
int opennsl_port_autoneg_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | autoneg | ||
) |
Configure or retrieve the current auto-negotiation settings for a port, or restart auto-negotiation if already enabled.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
autoneg | [OUT] 0 for disable, 1 for enabled |
OPENNSL_E_NONE | Operation performed. If retrieving current auto-negotiation mode, autoneg is set to the current state. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation fail, if retrieving current operating mode, autoneg is undefined. |
int opennsl_port_autoneg_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | autoneg | ||
) |
Configure or retrieve the current auto-negotiation settings for a port, or restart auto-negotiation if already enabled.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
autoneg | [IN] 0 for disable, 1 for enabled |
OPENNSL_E_NONE | Operation performed. If retrieving current auto-negotiation mode, autoneg is set to the current state. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation fail, if retrieving current operating mode, autoneg is undefined. |
int opennsl_port_cfi_color_get | ( | int | unit, |
opennsl_port_t | port, | ||
int | cfi, | ||
opennsl_color_t * | color | ||
) |
Set or retrieve color assignment for a given port and Canonical Format Indicator (CFI).
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
cfi | [IN] VLAN Canonical Format Indicator (CFI) |
color | [OUT] One of the OPENNSL color selections: opennslColorGreen, opennslColorYellow, opennslColorRed, opennslColorDropFirst, opennslColorPreserve |
OPENNSL_E_UNAVAIL | Not supported. |
OPENNSL_E_XXX |
int opennsl_port_cfi_color_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | cfi, | ||
opennsl_color_t | color | ||
) |
Set or retrieve color assignment for a given port and Canonical Format Indicator (CFI).
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
cfi | [IN] VLAN Canonical Format Indicator (CFI) |
color | [IN] One of the OPENNSL color selections: opennslColorGreen, opennslColorYellow, opennslColorRed, opennslColorDropFirst, opennslColorPreserve |
OPENNSL_E_UNAVAIL | Not supported. |
OPENNSL_E_XXX |
Referenced by qos_pcp_map_create().
int opennsl_port_class_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_class_t | pclass, | ||
uint32 * | class_id | ||
) |
Set or get port classification ID to aggregate a group of ports for further processing such as VLAN translation and field processing.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
pclass | [IN] |
class_id | [OUT] (for _set) Device Class ID. |
OPENNSL_E_NONE | No Error |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_PORT | Invalid Port number specified |
OPENNSL_E_XXX | Error occurred |
int opennsl_port_class_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_class_t | pclass, | ||
uint32 | class_id | ||
) |
Set or get port classification ID to aggregate a group of ports for further processing such as VLAN translation and field processing.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
pclass | [IN] |
class_id | [IN] (for _set) Device Class ID. |
OPENNSL_E_NONE | No Error |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_PORT | Invalid Port number specified |
OPENNSL_E_XXX | Error occurred |
Referenced by initial_qos_service_init().
int opennsl_port_clear | ( | int | unit | ) |
Initialize the port subsystem without affecting the current state of stack ports.
unit | [IN] Unit number. |
OPENNSL_E_NONE | |
OPENNSL_E_XXX |
int opennsl_port_config_get | ( | int | unit, |
opennsl_port_config_t * | config | ||
) |
Retrieved the port configuration for the specified device.
unit | [IN] Unit number. |
config | [OUT] Pointer to port configuration structure populated on successful return. |
OPENNSL_E_NONE | |
OPENNSL_E_XXX |
Referenced by example_max_port_count_get(), example_policer_test(), example_port_default_config(), example_switch_default_vlan_config(), and main().
void opennsl_port_config_t_init | ( | opennsl_port_config_t * | pconfig | ) |
Initialize a Port Configuration structure.
pconfig | [IN,OUT] Pointer to Port Configuration structure to initialize. |
None. |
Referenced by example_port_default_config().
int opennsl_port_control_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_control_t | type, | ||
int * | value | ||
) |
Get or set various features at the port level.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
type | [IN] Port feature enumerator |
value | [OUT] Value of the bit field in port table |
OPENNSL_E_NONE | No Error |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_PORT | Invalid Port number specified |
OPENNSL_E_XXX | Error occurred |
int opennsl_port_control_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_control_t | type, | ||
int | value | ||
) |
Get or set various features at the port level.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
type | [IN] Port feature enumerator |
value | [IN] Value of the bit field in port table |
OPENNSL_E_NONE | No Error |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_PORT | Invalid Port number specified |
OPENNSL_E_XXX | Error occurred |
Referenced by main().
int opennsl_port_detach | ( | int | unit, |
opennsl_pbmp_t | pbmp, | ||
opennsl_pbmp_t * | detached | ||
) |
Detach ports from the OPENNSL API.
unit | [IN] Unit number. |
pbmp | [IN] Port bit map of ports to be detached |
detached | [OUT] Port bit map of ports successfully detached. |
OPENNSL_E_OK | Port successfully detached. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Port detach failed, considered a catastrophic error. |
int opennsl_port_dscp_map_get | ( | int | unit, |
opennsl_port_t | port, | ||
int | srccp, | ||
int * | mapcp, | ||
int * | prio | ||
) |
Control mapping of Differentiated Services Code Points (DSCP).
unit | [IN] Unit number. |
port | [IN] Device or logical port number or -1 to setup global mapping table. |
srccp | [IN] Source code point. -1 indicates operation applies to all code points if being configured or a random code point if being retrieved. |
mapcp | [OUT] The new code point to map srccp to if setting the mapping; the currently configured mapping for the port if retrieving settings. |
prio | [OUT] Priority of packets mapped for the code point, if available. Priority is 0 to 7 and can have the value (OPENNSL_PRIO_RED/OPENNSL_PRIO_YELLOW/OPENNSL_PRIO_GREEN/OPENNSL_PRIO_PRESERVE) ored in. -1 on get means priority mapping is unavailable. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_PARAM | Source or mapped code point values are invalid. |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device, or mapping resources depleted. |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_dscp_map_mode_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | mode | ||
) |
Control mapping of Differentiated Services Code Points (DSCP).
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
mode | [OUT] DSCP map mode. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_PARAM | Invalid mapping mode |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_dscp_map_mode_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | mode | ||
) |
Control mapping of Differentiated Services Code Points (DSCP).
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
mode | [IN] DSCP map mode. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_PARAM | Invalid mapping mode |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device |
OPENNSL_E_XXX | Operation failed. |
Referenced by qos_pcp_map_create().
int opennsl_port_dscp_map_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | srccp, | ||
int | mapcp, | ||
int | prio | ||
) |
Control mapping of Differentiated Services Code Points (DSCP).
unit | [IN] Unit number. |
port | [IN] Device or logical port number or -1 to setup global mapping table. |
srccp | [IN] Source code point. -1 indicates operation applies to all code points if being configured or a random code point if being retrieved. |
mapcp | [IN] The new code point to map srccp to if setting the mapping; the currently configured mapping for the port if retrieving settings. |
prio | [IN] Priority of packets mapped for the code point, if available. Priority is 0 to 7 and can have the value (OPENNSL_PRIO_RED/OPENNSL_PRIO_YELLOW/OPENNSL_PRIO_GREEN/OPENNSL_PRIO_PRESERVE) ored in. -1 on get means priority mapping is unavailable. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_PARAM | Source or mapped code point values are invalid. |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device, or mapping resources depleted. |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_dtag_mode_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | mode | ||
) |
Set or retrieve the current double tagging mode for a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
mode | [OUT] Double tag mode as defined in table =OPENNSL_PORT_DTAG_MODE_table |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Requested double tagging mode is not support on the device. |
OPENNSL_E_XXX | Operation failed, if retrieving the current operating mode, the value of the parameter mode is undefined. |
int opennsl_port_dtag_mode_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | mode | ||
) |
Set or retrieve the current double tagging mode for a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
mode | [IN] Double tag mode as defined in table =OPENNSL_PORT_DTAG_MODE_table |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Requested double tagging mode is not support on the device. |
OPENNSL_E_XXX | Operation failed, if retrieving the current operating mode, the value of the parameter mode is undefined. |
int opennsl_port_duplex_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | duplex | ||
) |
Get or set the current duplex mode of a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
duplex | [OUT] Returned or requested duplex setting, must be one of OPENNSL_PORT_DUPLEX_HALF or OPENNSL_PORT_DUPLEX_FULL. |
OPENNSL_E_NONE | Port duplex retrieved or configured as requested. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_UNAVAIL | The specified port does not support the requested mode. |
OPENNSL_E_XXX | Request failed, if configuring duplex mode the port state is undefined. If retrieving the current operating mode, the returned duplex value is undefined. |
int opennsl_port_duplex_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | duplex | ||
) |
Get or set the current duplex mode of a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
duplex | [IN] Returned or requested duplex setting, must be one of OPENNSL_PORT_DUPLEX_HALF or OPENNSL_PORT_DUPLEX_FULL. |
OPENNSL_E_NONE | Port duplex retrieved or configured as requested. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_UNAVAIL | The specified port does not support the requested mode. |
OPENNSL_E_XXX | Request failed, if configuring duplex mode the port state is undefined. If retrieving the current operating mode, the returned duplex value is undefined. |
int opennsl_port_egress_get | ( | int | unit, |
opennsl_port_t | port, | ||
int | modid, | ||
opennsl_pbmp_t * | pbmp | ||
) |
Configure ports to block or allow packets from a given ingress port.
unit | [IN] Unit number. |
port | [IN] Device or logical source port number. |
modid | [IN] Module ID of the source port. |
pbmp | [OUT] Port bitmap indicating all local ports allowed to egress traffic from specified port/modid. |
OPENNSL_E_NONE | Operation completed successfully. |
OPENNSL_E_UNAVAIL | The specified port does not support the requested block option. |
OPENNSL_E_PARAM | Invalid port, module ID or bitmap. |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_egress_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | modid, | ||
opennsl_pbmp_t | pbmp | ||
) |
Configure ports to block or allow packets from a given ingress port.
unit | [IN] Unit number. |
port | [IN] Device or logical source port number. |
modid | [IN] Module ID of the source port. |
pbmp | [IN] Port bitmap indicating all local ports allowed to egress traffic from specified port/modid. |
OPENNSL_E_NONE | Operation completed successfully. |
OPENNSL_E_UNAVAIL | The specified port does not support the requested block option. |
OPENNSL_E_PARAM | Invalid port, module ID or bitmap. |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_enable_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | enable | ||
) |
Enable or disable a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
enable | [OUT] Boolean value indicating enable (1) or disable (0). |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_XXX | Operation failed, if retrieving the current enabled state, the value of the parameter enable is undefined. |
int opennsl_port_enable_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | enable | ||
) |
Enable or disable a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
enable | [IN] Boolean value indicating enable (1) or disable (0). |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_XXX | Operation failed, if retrieving the current enabled state, the value of the parameter enable is undefined. |
int opennsl_port_flood_block_get | ( | int | unit, |
opennsl_port_t | ingress_port, | ||
opennsl_port_t | egress_port, | ||
uint32 * | flags | ||
) |
Selectively block flooding traffic.
unit | [IN] Unit number. |
ingress_port | [IN] Device or logical port number of the ingress port |
egress_port | [IN] Device or logical port number of the egress port |
flags | [OUT] |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Operation not supported on specified device |
OPENNSL_E_PARAM | ingress_port and egress_port are not on the same device |
OPENNSL_E_PORT | Operation not supported on the specified ingress_port, or egress_port is invalid |
OPENNSL_E_XXX | Operation failed |
int opennsl_port_flood_block_set | ( | int | unit, |
opennsl_port_t | ingress_port, | ||
opennsl_port_t | egress_port, | ||
uint32 | flags | ||
) |
Selectively block flooding traffic.
unit | [IN] Unit number. |
ingress_port | [IN] Device or logical port number of the ingress port |
egress_port | [IN] Device or logical port number of the egress port |
flags | [IN] |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Operation not supported on specified device |
OPENNSL_E_PARAM | ingress_port and egress_port are not on the same device |
OPENNSL_E_PORT | Operation not supported on the specified ingress_port, or egress_port is invalid |
OPENNSL_E_XXX | Operation failed |
int opennsl_port_frame_max_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | size | ||
) |
Set or retrieve the current maximum packet size permitted on a port.
unit | [IN] Unit number. |
port | [IN] Port to set or retrieve maximum frame size on |
size | [OUT] The frame size to set (or current frame size returned) in bytes. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, current frame size for port is undefined. |
int opennsl_port_frame_max_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | size | ||
) |
Set or retrieve the current maximum packet size permitted on a port.
unit | [IN] Unit number. |
port | [IN] Port to set or retrieve maximum frame size on |
size | [IN] The frame size to set (or current frame size returned) in bytes. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, current frame size for port is undefined. |
int opennsl_port_gport_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_gport_t * | gport | ||
) |
Get the GPORT ID for the specified local port number.
unit | [IN] Unit number. |
port | [IN] Port number |
gport | [OUT] GPORT ID |
OPENNSL_E_NONE | No Error |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_PORT | Invalid Port number |
OPENNSL_E_PARAM | Invalid Parameter |
OPENNSL_E_XXX | Error occurred |
Referenced by main().
int opennsl_port_ifilter_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | mode | ||
) |
Set or retrieve current behavior of tagged packets arriving on a port not a member of the specified VLAN.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
mode | [IN] Port filtering mode |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device |
OPENNSL_E_XXX | Operation failed, if retrieving current ingress filtering mode, the parameter mode is undefined. |
void opennsl_port_info_t_init | ( | opennsl_port_info_t * | info | ) |
Initializes the opennsl_port_info_t structure.
info | [IN,OUT] Pointer to port information structure (see =PORT_INFORMATION_CONTROL). |
Referenced by example_port_default_config().
int opennsl_port_init | ( | int | unit | ) |
Initialize the port subsystem.
unit | [IN] Unit number. |
OPENNSL_E_xxx |
int opennsl_port_interface_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_if_t * | intf | ||
) |
Configure the physical interface between the MAC and the PHY for the specified port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
intf | [OUT] Interface to configure or retrieved interface setting. |
OPENNSL_E_NONE | Operation performed successfully |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_UNAVAIL | Requested interface is not available on the specified port. |
OPENNSL_E_XXX | Operation failed, if retrieving current operating mode result value in intf is undefined. |
int opennsl_port_interface_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_if_t | intf | ||
) |
Configure the physical interface between the MAC and the PHY for the specified port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
intf | [IN] Interface to configure or retrieved interface setting. |
OPENNSL_E_NONE | Operation performed successfully |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_UNAVAIL | Requested interface is not available on the specified port. |
OPENNSL_E_XXX | Operation failed, if retrieving current operating mode result value in intf is undefined. |
int opennsl_port_l3_mtu_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | size | ||
) |
Set or retrieve the current maximum L3 packet size permitted on a port.
unit | [IN] Unit number. |
port | [IN] Port to set or retrieve maximum L3 frame size on |
size | [OUT] the frame size to set (or current frame size returned) in bytes. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, current egress L3 frame size for port is undefined. |
int opennsl_port_l3_mtu_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | size | ||
) |
Set or retrieve the current maximum L3 packet size permitted on a port.
unit | [IN] Unit number. |
port | [IN] Port to set or retrieve maximum L3 frame size on |
size | [IN] the frame size to set (or current frame size returned) in bytes. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, current egress L3 frame size for port is undefined. |
int opennsl_port_learn_get | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 * | flags | ||
) |
Control the hardware and software learning support on a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port |
flags | [OUT] Learning flags as defined in table =OPENNSL_PORT_LEARN_table |
OPENNSL_E_NONE | Operation completed successfully. |
OPENNSL_E_UNAVAIL | Requested learning configuration not supported on device, the learning mode of the port is unchanged. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, port state undefined on set or modify, returned flags value undefined if retrieving status. |
int opennsl_port_learn_set | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags | ||
) |
Control the hardware and software learning support on a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port |
flags | [IN] Learning flags as defined in table =OPENNSL_PORT_LEARN_table |
OPENNSL_E_NONE | Operation completed successfully. |
OPENNSL_E_UNAVAIL | Requested learning configuration not supported on device, the learning mode of the port is unchanged. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, port state undefined on set or modify, returned flags value undefined if retrieving status. |
int opennsl_port_link_failed_clear | ( | int | unit, |
opennsl_port_t | port | ||
) |
Clear failed link status from a port which has undergone LAG failover.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
OPENNSL_E_NONE | The failed state of the port is cleared. |
OPENNSL_E_INIT | Linkscan module not initialized |
OPENNSL_E_PORT | The port is not valid, not in failed state, or still in the trunk. |
int opennsl_port_link_status_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | status | ||
) |
Retrieve the current link status of a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number. |
status | [OUT] One of OPENNSL_PORT_LINK_STATUS_*. |
OPENNSL_E_NONE | Current link state is returned in status |
OPENNSL_E_INIT | Port module not initialized |
OPENNSL_E_XXX | Error condition reported from lower layers of software. In the event of an error code other than OPENNSL_E_NONE, the up parameter is undefined on return. |
int opennsl_port_linkscan_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | linkscan | ||
) |
Get or set the current linkscan mode for the specified port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
linkscan | [OUT] Linkscan mode, see table =OPENNSL_LINKSCAN_MODE_e |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_PARAM | Invalid linkscan mode specified |
OPENNSL_E_UNAVAIL | Requested operating mode is not supported. |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_linkscan_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | linkscan | ||
) |
Get or set the current linkscan mode for the specified port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
linkscan | [IN] Linkscan mode, see table =OPENNSL_LINKSCAN_MODE_e |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_PARAM | Invalid linkscan mode specified |
OPENNSL_E_UNAVAIL | Requested operating mode is not supported. |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_local_get | ( | int | unit, |
opennsl_gport_t | gport, | ||
opennsl_port_t * | local_port | ||
) |
Get local port number encoded within a GPORT ID.
unit | [IN] Unit number. |
gport | [IN] GPORT ID |
local_port | [OUT] Local port number |
OPENNSL_E_NONE | Success |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_XXX | Error occurred |
Referenced by main().
int opennsl_port_loopback_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | loopback | ||
) |
Set or retrieve the current loopback mode of a port.
unit | [IN] Unit number. |
port | [IN] Port for which the loopback mode is being set or retrieved |
loopback | [OUT] Specifies the loopback mode; see table =OPENNSL_PORT_LB_m for values |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Port module not initialized |
OPENNSL_E_XXX | Operation failed, if retrieving current loopback states the contents of the parameter loopback are undefined. |
int opennsl_port_loopback_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | loopback | ||
) |
Set or retrieve the current loopback mode of a port.
unit | [IN] Unit number. |
port | [IN] Port for which the loopback mode is being set or retrieved |
loopback | [IN] Specifies the loopback mode; see table =OPENNSL_PORT_LB_m for values |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Port module not initialized |
OPENNSL_E_XXX | Operation failed, if retrieving current loopback states the contents of the parameter loopback are undefined. |
Referenced by example_policer_test().
char* opennsl_port_name | ( | int | unit, |
int | port | ||
) |
unit | [IN] Unit number. |
port | [IN] |
OPENNSL_E_xxx |
int opennsl_port_pause_addr_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_mac_t | mac | ||
) |
Get or set the source MAC address transmitted in MAC control pause frames.
unit | [IN] Unit number. |
port | [IN] Device or logical port number. |
mac | [OUT] MAC address to transmit as the source address in MAC control pause frames. |
OPENNSL_E_NONE | Operation completed successfully. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, if retrieving the previously set values the returned MAC address is undefined. |
int opennsl_port_pause_addr_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_mac_t | mac | ||
) |
Get or set the source MAC address transmitted in MAC control pause frames.
unit | [IN] Unit number. |
port | [IN] Device or logical port number. |
mac | [IN] MAC address to transmit as the source address in MAC control pause frames. |
OPENNSL_E_NONE | Operation completed successfully. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, if retrieving the previously set values the returned MAC address is undefined. |
int opennsl_port_pause_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | pause_tx, | ||
int * | pause_rx | ||
) |
Enable or disable transmission of pause frames and honoring received pause frames on a port.
unit | [IN] Unit number. |
port | [IN] Device port or logical port number |
pause_tx | [OUT] 0 to disable transmission of pauseframes, 1 to enable. |
pause_rx | [OUT] 0 to ignore received pause frames, 1 to honor received pause frames. |
OPENNSL_E_NONE | Operation performed successfully. |
OPENNSL_E_INIT | Port module not initialized ( must be called). |
OPENNSL_E_XXX | Operation failed, if retrieving current pause settings, pause_tx and pause_rx are undefined. |
int opennsl_port_pause_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | pause_tx, | ||
int | pause_rx | ||
) |
Enable or disable transmission of pause frames and honoring received pause frames on a port.
unit | [IN] Unit number. |
port | [IN] Device port or logical port number |
pause_tx | [IN] 0 to disable transmission of pauseframes, 1 to enable. |
pause_rx | [IN] 0 to ignore received pause frames, 1 to honor received pause frames. |
OPENNSL_E_NONE | Operation performed successfully. |
OPENNSL_E_INIT | Port module not initialized ( must be called). |
OPENNSL_E_XXX | Operation failed, if retrieving current pause settings, pause_tx and pause_rx are undefined. |
int opennsl_port_pause_sym_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | pause | ||
) |
Configure or retrieve asymmetric pause setting for a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
pause | [OUT] Requested or current pause settings, one of OPENNSL_PORT_PAUSE_SYM for symmetric pause, OPENNSL_PORT_PAUSE_ASYM_RX for asymmetric pause to honor received MAC control pause frames but not transmit, OPENNSL_PORT_PAUSE_ASYM_TX to ignore received pause frames but transmit, and OPENNSL_PORT_PAUSE_NONE to neither honor or transmit pause frames. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, if retrieving current mode the returned pause value is undefined. |
int opennsl_port_pause_sym_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | pause | ||
) |
Configure or retrieve asymmetric pause setting for a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
pause | [IN] Requested or current pause settings, one of OPENNSL_PORT_PAUSE_SYM for symmetric pause, OPENNSL_PORT_PAUSE_ASYM_RX for asymmetric pause to honor received MAC control pause frames but not transmit, OPENNSL_PORT_PAUSE_ASYM_TX to ignore received pause frames but transmit, and OPENNSL_PORT_PAUSE_NONE to neither honor or transmit pause frames. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_XXX | Operation failed, if retrieving current mode the returned pause value is undefined. |
int opennsl_port_phy_control_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_phy_control_t | type, | ||
uint32 * | value | ||
) |
Set/Get PHY specific configurations.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
type | [IN] Type of configuration to update |
value | [OUT] (for _set) Value of the configuration |
OPENNSL_E_NONE | No Error |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_PORT | Invalid Port number specified |
OPENNSL_E_XXX | Error occurred |
int opennsl_port_phy_control_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_phy_control_t | type, | ||
uint32 | value | ||
) |
Set/Get PHY specific configurations.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
type | [IN] Type of configuration to update |
value | [IN] (for _set) Value of the configuration |
OPENNSL_E_NONE | No Error |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_PORT | Invalid Port number specified |
OPENNSL_E_XXX | Error occurred |
int opennsl_port_phy_modify | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags, | ||
uint32 | phy_reg_addr, | ||
uint32 | phy_data, | ||
uint32 | phy_mask | ||
) |
Read or write PHY registers associated with a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
flags | [IN] Flags indicating how to access the PHY, and which PHY if the port has an internal serdes. See =OPENNSL_PORT_PHY_flags for details. |
phy_reg_addr | [IN] Register address in the PHY |
phy_data | [IN] Data to be written or data read |
phy_mask | [IN] Mask write data when modifying register |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Requested operation not supported |
OPENNSL_E_XXX | Operation failed |
int opennsl_port_priority_color_get | ( | int | unit, |
opennsl_port_t | port, | ||
int | prio, | ||
opennsl_color_t * | color | ||
) |
Set or retrieve color assignment for a given port and priority.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
prio | [IN] VLAN priority (aka 802.1p CoS) |
color | [OUT] One of the OPENNSL color selections: opennslColorGreen, opennslColorYellow, opennslColorRed, opennslColorDropFirst, opennslColorPreserve |
OPENNSL_E_UNAVAIL | Not supported. |
OPENNSL_E_XXX |
int opennsl_port_priority_color_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | prio, | ||
opennsl_color_t | color | ||
) |
Set or retrieve color assignment for a given port and priority.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
prio | [IN] VLAN priority (aka 802.1p CoS) |
color | [IN] One of the OPENNSL color selections: opennslColorGreen, opennslColorYellow, opennslColorRed, opennslColorDropFirst, opennslColorPreserve |
OPENNSL_E_UNAVAIL | Not supported. |
OPENNSL_E_XXX |
Referenced by qos_pcp_map_create().
int opennsl_port_priority_group_config_get | ( | int | unit, |
opennsl_gport_t | gport, | ||
int | priority_group, | ||
opennsl_port_priority_group_config_t * | prigrp_config | ||
) |
Set/get the port priority group configuration.
unit | [IN] Unit number. |
gport | [IN] generic port |
priority_group | [IN] priority group id |
prigrp_config | [OUT] structure describes port priority group configuration |
OPENNSL_E_NONE | Success |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_XXX | Error occurred |
int opennsl_port_priority_group_config_set | ( | int | unit, |
opennsl_gport_t | gport, | ||
int | priority_group, | ||
opennsl_port_priority_group_config_t * | prigrp_config | ||
) |
Set/get the port priority group configuration.
unit | [IN] Unit number. |
gport | [IN] generic port |
priority_group | [IN] priority group id |
prigrp_config | [IN] structure describes port priority group configuration |
OPENNSL_E_NONE | Success |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_XXX | Error occurred |
void opennsl_port_priority_group_config_t_init | ( | opennsl_port_priority_group_config_t * | prigrp_config | ) |
Initialize a port priority group configuration struct.
prigrp_config | [IN,OUT] Pointer to the priority group configuration object struct. |
None. |
int opennsl_port_priority_group_mapping_get | ( | int | unit, |
opennsl_gport_t | gport, | ||
int | prio, | ||
int * | priority_group | ||
) |
Assign/retrieve the Priority Group mapped to the input priority.
unit | [IN] Unit number. |
gport | [IN] generic port |
prio | [IN] input priority |
priority_group | [OUT] priority group ID that the input priority mapped to |
OPENNSL_E_NONE | Success |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_XXX | Error occurred |
int opennsl_port_priority_group_mapping_set | ( | int | unit, |
opennsl_gport_t | gport, | ||
int | prio, | ||
int | priority_group | ||
) |
Assign/retrieve the Priority Group mapped to the input priority.
unit | [IN] Unit number. |
gport | [IN] generic port |
prio | [IN] input priority |
priority_group | [IN] priority group ID that the input priority mapped to |
OPENNSL_E_NONE | Success |
OPENNSL_E_UNAVAIL | Feature unavailable |
OPENNSL_E_XXX | Error occurred |
int opennsl_port_probe | ( | int | unit, |
opennsl_pbmp_t | pbmp, | ||
opennsl_pbmp_t * | okay_pbmp | ||
) |
Probe the port to determine the proper MAC and PHY drivers.
unit | [IN] Unit number. |
pbmp | [IN] Port bit map indicating the ports to probe |
okay_pbmp | [OUT] Return value indicating the ports successfully probed |
OPENNSL_E_NONE | All ports successfully probed. The value okay_pbmp contains a map of ports that may be enabled. |
OPENNSL_E_INIT | The Port module not initialized. See . |
OPENNSL_E_XXX | Failed to probe ports, the contents of okay_pbmp are undefined. |
int opennsl_port_queued_count_get | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 * | count | ||
) |
Get the current count of cells or packets queued on a port for transmission.
unit | [IN] Unit number. |
port | [IN] Device or logical port number. |
count | [OUT] Returned count of cells or packets queued for egress on the specified port. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_BADID | Invalid port number specified |
OPENNSL_E_UNAVIL | Operation not supported on the specified port. |
int opennsl_port_sample_rate_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | ingress_rate, | ||
int * | egress_rate | ||
) |
Control the sampling of packets ingressing or egressing a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
ingress_rate | [OUT] Every 1/ingress_rate ingressing packets will be sampled; 0 indicates no sampling while 1 indicates sampling all packets |
egress_rate | [OUT] Every 1/egress_rate egressing packets will be sampled; 0 indicates no sampling while 1 indicates sampling all packets |
OPENNSL_E_UNAVAIL | Feature not supported by hardware |
OPENNSL_E_XXX | Other error |
Referenced by main().
int opennsl_port_sample_rate_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | ingress_rate, | ||
int | egress_rate | ||
) |
Control the sampling of packets ingressing or egressing a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
ingress_rate | [IN] Every 1/ingress_rate ingressing packets will be sampled; 0 indicates no sampling while 1 indicates sampling all packets |
egress_rate | [IN] Every 1/egress_rate egressing packets will be sampled; 0 indicates no sampling while 1 indicates sampling all packets |
OPENNSL_E_UNAVAIL | Feature not supported by hardware |
OPENNSL_E_XXX | Other error |
Referenced by main().
int opennsl_port_selective_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_info_t * | info | ||
) |
Get or set multiple port characteristics.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
info | [IN,OUT] Pointer to port information structure (see =PORT_INFORMATION_CONTROL). |
OPENNSL_E_NONE | Operation completed successfully. |
OPENNSL_E_XXX | Operation failed, if retrieving information the contents of info are undefined. If setting configuration, the state of the port is undefined. |
int opennsl_port_selective_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_port_info_t * | info | ||
) |
Get or set multiple port characteristics.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
info | [IN] Pointer to port information structure (see =PORT_INFORMATION_CONTROL). |
OPENNSL_E_NONE | Operation completed successfully. |
OPENNSL_E_XXX | Operation failed, if retrieving information the contents of info are undefined. If setting configuration, the state of the port is undefined. |
Referenced by example_port_default_config().
int opennsl_port_speed_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | speed | ||
) |
Get or set the current operating speed of a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
speed | [OUT] Speed specified in Mbps. |
OPENNSL_E_NONE | Speed set or retrieved as requested. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_CONFIG | The requested port speed is not supported. In some configurations the actual speed of the MAC is derived from the PHY directly and can not be forced to a specific value. |
OPENNSL_E_XXX | Error occurred, if retrieving port speed, the returned speed is undefined. If setting speed, the operational state of the port is undefined. |
int opennsl_port_speed_max | ( | int | unit, |
opennsl_port_t | port, | ||
int * | speed | ||
) |
Get or set the current operating speed of a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
speed | [OUT] Speed specified in Mbps. |
OPENNSL_E_NONE | Speed set or retrieved as requested. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_CONFIG | The requested port speed is not supported. In some configurations the actual speed of the MAC is derived from the PHY directly and can not be forced to a specific value. |
OPENNSL_E_XXX | Error occurred, if retrieving port speed, the returned speed is undefined. If setting speed, the operational state of the port is undefined. |
int opennsl_port_speed_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | speed | ||
) |
Get or set the current operating speed of a port.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
speed | [IN] Speed specified in Mbps. |
OPENNSL_E_NONE | Speed set or retrieved as requested. |
OPENNSL_E_INIT | Port module not initialized, see . |
OPENNSL_E_CONFIG | The requested port speed is not supported. In some configurations the actual speed of the MAC is derived from the PHY directly and can not be forced to a specific value. |
OPENNSL_E_XXX | Error occurred, if retrieving port speed, the returned speed is undefined. If setting speed, the operational state of the port is undefined. |
int opennsl_port_stat_enable_set | ( | int | unit, |
opennsl_gport_t | port, | ||
int | enable | ||
) |
Enable/disable packet and byte counters for the selected gport.
unit | [IN] Unit number. |
port | [IN] GPORT ID |
enable | [IN] Non-zero to enable counter collection, zero to disable. |
OPENNSL_E_XXX |
int opennsl_port_stp_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | state | ||
) |
Set the spanning tree state for a port (single instance spanning tree only).
unit | [IN] Unit number. |
port | [IN] Device or logical port |
state | [OUT] Spanning tree state, for valid values see =OPENNSL_STG_STP_e . |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device. This occurs on fabric devices. |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_stp_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | state | ||
) |
Set the spanning tree state for a port (single instance spanning tree only).
unit | [IN] Unit number. |
port | [IN] Device or logical port |
state | [IN] Spanning tree state, for valid values see =OPENNSL_STG_STP_e . |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device. This occurs on fabric devices. |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_subsidiary_ports_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_pbmp_t * | pbmp | ||
) |
Get the list of ancillary/flex ports belonging to the same port block as the controlling port.
unit | [IN] Unit number. |
port | [IN] Controlling port |
pbmp | [OUT] List of subsidiary ports in the same block as the controlling port |
OPENNSL_E_XXX |
int opennsl_port_untagged_priority_get | ( | int | unit, |
opennsl_port_t | port, | ||
int * | priority | ||
) |
Get or set the default priority for packets that ingress untagged.
unit | [IN] Unit number. |
port | [IN] Device port number or logical device |
priority | [OUT] Priority to assign to packets that ingress the port untagged. A negative value here has special meaning to certain SoC devices. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | The specified port cannot have an untagged priority. |
OPENNSL_E_PARAM | Invalid port or priority. |
OPENNSL_E_XXX | Operation failed |
int opennsl_port_untagged_priority_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | priority | ||
) |
Get or set the default priority for packets that ingress untagged.
unit | [IN] Unit number. |
port | [IN] Device port number or logical device |
priority | [IN] Priority to assign to packets that ingress the port untagged. A negative value here has special meaning to certain SoC devices. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | The specified port cannot have an untagged priority. |
OPENNSL_E_PARAM | Invalid port or priority. |
OPENNSL_E_XXX | Operation failed |
int opennsl_port_untagged_vlan_get | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_vlan_t * | vid_ptr | ||
) |
Get or set the default VLAN for packets that ingress untagged.
unit | [IN] Unit number. |
port | [IN] Device port number or logical device |
vid_ptr | [OUT] Pointer to location to store current default VLAN ID. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | The specified port cannot have an untagged VLAN. |
OPENNSL_E_PARAM | Invalid port or VLAN ID. |
OPENNSL_E_XXX | Operation failed |
int opennsl_port_untagged_vlan_set | ( | int | unit, |
opennsl_port_t | port, | ||
opennsl_vlan_t | vid | ||
) |
Get or set the default VLAN for packets that ingress untagged.
unit | [IN] Unit number. |
port | [IN] Device port number or logical device |
vid | [IN] VLAN ID used for packets that ingress the port untagged. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | The specified port cannot have an untagged VLAN. |
OPENNSL_E_PARAM | Invalid port or VLAN ID. |
OPENNSL_E_XXX | Operation failed |
Referenced by example_switch_default_vlan_config().
int opennsl_port_vlan_member_get | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 * | flags | ||
) |
Set or retrieve current behavior of tagged packets arriving/leaving on a port not a member of the specified VLAN.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
flags | [OUT] Flags to indicate port filtering mode |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_vlan_member_set | ( | int | unit, |
opennsl_port_t | port, | ||
uint32 | flags | ||
) |
Set or retrieve current behavior of tagged packets arriving/leaving on a port not a member of the specified VLAN.
unit | [IN] Unit number. |
port | [IN] Device or logical port number |
flags | [IN] Flags to indicate port filtering mode |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Operation not supported on underlying device |
OPENNSL_E_XXX | Operation failed. |
int opennsl_port_vlan_priority_map_get | ( | int | unit, |
opennsl_port_t | port, | ||
int | pkt_pri, | ||
int | cfi, | ||
int * | internal_pri, | ||
opennsl_color_t * | color | ||
) |
unit | [IN] Unit number. |
port | [IN] |
pkt_pri | [IN] |
cfi | [IN] |
internal_pri | [OUT] |
color | [OUT] |
OPENNSL_E_xxx |
int opennsl_port_vlan_priority_map_set | ( | int | unit, |
opennsl_port_t | port, | ||
int | pkt_pri, | ||
int | cfi, | ||
int | internal_pri, | ||
opennsl_color_t | color | ||
) |
unit | [IN] Unit number. |
port | [IN] |
pkt_pri | [IN] |
cfi | [IN] |
internal_pri | [IN] |
color | [IN] |
OPENNSL_E_xxx |
Referenced by example_create_policy(), and qos_pcp_map_create().