* RT_ERR_SMI - SMI access error
* RT_ERR_NULL_POINTER - Pointer pFilter_field or pFilter_cfg point to NULL.
* Note:
- * This function enable and intialize ACL function
+ * This function enable and initialize ACL function
*/
rtk_api_ret_t rtk_filter_igrAcl_init(void)
{
* This function add a comparison rule (*pFilter_field) to an ACL configuration (*pFilter_cfg).
* Pointer pFilter_cfg points to an ACL configuration structure, this structure keeps multiple ACL
* comparison rules by means of linked list. Pointer pFilter_field will be added to linked
- * list keeped by structure that pFilter_cfg points to.
+ * list kept by structure that pFilter_cfg points to.
*/
rtk_api_ret_t rtk_filter_igrAcl_field_add(rtk_filter_cfg_t* pFilter_cfg, rtk_filter_field_t* pFilter_field)
{
}
else
{
- /*default acl template for ipv6 address supports MSB 32-bits and LSB 32-bits only*/
+ /*default ACL template for ipv6 address supports MSB 32-bits and LSB 32-bits only*/
aclRule[tempIdx].data_bits.field[fieldIdx] = ((ip6addr[3] & (0xFFFF << ((i&1) * 16))) >> ((i&1) * 16));
aclRule[tempIdx].care_bits.field[fieldIdx] = ((ip6mask[3] & (0xFFFF << ((i&1) * 16))) >> ((i&1) * 16));
}
* pFilter_cfg - The ACL configuration that this function will add comparison rule
* pFilter_action - Action(s) of ACL configuration.
* Output:
- * ruleNum - number of rules written in acl table
+ * ruleNum - number of rules written in ACL table
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
/* Function Name:
* rtk_filter_igrAcl_cfg_get
* Description:
- * Get one ingress acl configuration from ASIC.
+ * Get one ingress ACL configuration from ASIC.
* Input:
* filter_id - Start index of ACL configuration.
* Output:
- * pFilter_cfg - buffer pointer of ingress acl data
- * pFilter_action - buffer pointer of ingress acl action
+ * pFilter_cfg - buffer pointer of ingress ACL data
+ * pFilter_action - buffer pointer of ingress ACL action
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_PORT_ID - Invalid port id.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This function sets action of packets when no ACL configruation matches.
+ * This function sets action of packets when no ACL configuration matches.
*/
rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_set(rtk_port_t port, rtk_filter_unmatch_action_t action)
{
* RT_ERR_PORT_ID - Invalid port id.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This function gets action of packets when no ACL configruation matches.
+ * This function gets action of packets when no ACL configuration matches.
*/
rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_state_t state)
{
* RT_ERR_PORT_ID - Invalid port id.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This function gets action of packets when no ACL configruation matches.
+ * This function gets action of packets when no ACL configuration matches.
*/
rtk_api_ret_t rtk_filter_igrAcl_state_get(rtk_port_t port, rtk_filter_state_t* pState)
{
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
- * System support 16 user defined field selctors.
+ * System support 16 user defined field selectors.
* Each selector can be enabled or disable.
* User can defined retrieving 16-bits in many predefiend
* standard l2/l3/l4 payload.
* Set Port Range check
* Input:
* index - index of Port Range 0-15
- * type - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port
+ * type - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port
* upperPort - The upper bound of Port range
* lowerPort - The lower Bound of Port range
* Output:
* Input:
* index - index of Port Range 0-15
* Output:
- * pType - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port
+ * pType - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port
* pUpperPort - The upper bound of Port range
* pLowerPort - The lower Bound of Port range
* Return:
/* Function Name:
* rtk_filter_igrAclPolarity_set
* Description:
- * Set ACL Goip control palarity
+ * Set ACL Goip control polarity
* Input:
* polarity - 1: High, 0: Low
* Output:
/* Function Name:
* rtk_filter_igrAclPolarity_get
* Description:
- * Get ACL Goip control palarity
+ * Get ACL Goip control polarity
* Input:
* pPolarity - 1: High, 0: Low
* Output:
* Note:
* The API can set CPU port and inserting proprietary CPU tag mode (Length/Type 0x8899)
* to the frame that transmitting to CPU port.
- * The inset cpu tag mode is as following:
+ * The insert CPU tag mode is as following:
* - CPU_INSERT_TO_ALL
* - CPU_INSERT_TO_TRAPPING
* - CPU_INSERT_TO_NONE
* RT_ERR_L2_NO_CPU_PORT - CPU port is not exist
* Note:
* The API can get configured CPU port and its setting.
- * The inset cpu tag mode is as following:
+ * The insert CPU tag mode is as following:
* - CPU_INSERT_TO_ALL
* - CPU_INSERT_TO_TRAPPING
* - CPU_INSERT_TO_NONE
* Input:
* port - Port ID
* protocol - IGMP/MLD protocol
- * action - Per-port and per-protocol IGMP action seeting
+ * action - Per-port and per-protocol IGMP action setting
* Output:
* None.
* Return:
* Input:
* port - Port ID
* protocol - IGMP/MLD protocol
- * action - Per-port and per-protocol IGMP action seeting
+ * action - Per-port and per-protocol IGMP action setting
* Output:
* None.
* Return:
* Description:
* Get IGMP/MLD Group database
* Input:
- * indes - Index (0~255)
+ * index - Index (0~255)
* Output:
* pGroup - Group database information.
* Return:
/* Function Name:
* rtk_igmp_dropLeaveZeroEnable_set
* Description:
- * Set the function of droppping Leave packet with group IP = 0.0.0.0
+ * Set the function of dropping Leave packet with group IP = 0.0.0.0
* Input:
* enabled - Action 1: drop, 0:pass
* Output:
/* Function Name:
* rtk_igmp_dropLeaveZeroEnable_get
* Description:
- * Get the function of droppping Leave packet with group IP = 0.0.0.0
+ * Get the function of dropping Leave packet with group IP = 0.0.0.0
* Input:
* None
* Output:
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes ACL module high-layer API defination
+ * Feature : The file includes ACL module high-layer API definition
*
*/
* RT_ERR_SMI - SMI access error
* RT_ERR_NULL_POINTER - Pointer pFilter_field or pFilter_cfg point to NULL.
* Note:
- * This function enable and intialize ACL function
+ * This function enable and initialize ACL function
*/
extern rtk_api_ret_t rtk_filter_igrAcl_init(void);
* This function add a comparison rule (*pFilter_field) to an ACL configuration (*pFilter_cfg).
* Pointer pFilter_cfg points to an ACL configuration structure, this structure keeps multiple ACL
* comparison rules by means of linked list. Pointer pFilter_field will be added to linked
- * list keeped by structure that pFilter_cfg points to.
+ * list kept by structure that pFilter_cfg points to.
*/
extern rtk_api_ret_t rtk_filter_igrAcl_field_add(rtk_filter_cfg_t *pFilter_cfg, rtk_filter_field_t *pFilter_field);
* pFilter_cfg - The ACL configuration that this function will add comparison rule
* pFilter_action - Action(s) of ACL configuration.
* Output:
- * ruleNum - number of rules written in acl table
+ * ruleNum - number of rules written in ACL table
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
/* Function Name:
* rtk_filter_igrAcl_cfg_get
* Description:
- * Get one ingress acl configuration from ASIC.
+ * Get one ingress ACL configuration from ASIC.
* Input:
* filter_id - Start index of ACL configuration.
* Output:
- * pFilter_cfg - buffer pointer of ingress acl data
- * pFilter_action - buffer pointer of ingress acl action
+ * pFilter_cfg - buffer pointer of ingress ACL data
+ * pFilter_action - buffer pointer of ingress ACL action
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_PORT_ID - Invalid port id.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This function sets action of packets when no ACL configruation matches.
+ * This function sets action of packets when no ACL configuration matches.
*/
extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_set(rtk_port_t port, rtk_filter_unmatch_action_t action);
* RT_ERR_PORT_ID - Invalid port id.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This function gets action of packets when no ACL configruation matches.
+ * This function gets action of packets when no ACL configuration matches.
*/
extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_get(rtk_port_t port, rtk_filter_unmatch_action_t* action);
* RT_ERR_PORT_ID - Invalid port id.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This function gets action of packets when no ACL configruation matches.
+ * This function gets action of packets when no ACL configuration matches.
*/
extern rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_state_t state);
* RT_ERR_PORT_ID - Invalid port id.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This function gets action of packets when no ACL configruation matches.
+ * This function gets action of packets when no ACL configuration matches.
*/
extern rtk_api_ret_t rtk_filter_igrAcl_state_get(rtk_port_t port, rtk_filter_state_t* state);
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
- * System support 16 user defined field selctors.
+ * System support 16 user defined field selectors.
* Each selector can be enabled or disable.
* User can defined retrieving 16-bits in many predefiend
* standard l2/l3/l4 payload.
* Set Port Range check
* Input:
* index - index of Port Range 0-15
- * type - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port
+ * type - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port
* upperPort - The upper bound of Port range
* lowerPort - The lower Bound of Port range
* Output:
* Input:
* index - index of Port Range 0-15
* Output:
- * pType - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port
+ * pType - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port
* pUpperPort - The upper bound of Port range
* pLowerPort - The lower Bound of Port range
* Return:
/* Function Name:
* rtk_filter_igrAclPolarity_set
* Description:
- * Set ACL Goip control palarity
+ * Set ACL Goip control polarity
* Input:
* polarity - 1: High, 0: Low
* Output:
/* Function Name:
* rtk_filter_igrAclPolarity_get
* Description:
- * Get ACL Goip control palarity
+ * Get ACL Goip control polarity
* Input:
* pPolarity - 1: High, 0: Low
* Output:
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes CPU module high-layer API defination
+ * Feature : The file includes CPU module high-layer API definition
*
*/
* Note:
* The API can set CPU port and inserting proprietary CPU tag mode (Length/Type 0x8899)
* to the frame that transmitting to CPU port.
- * The inset cpu tag mode is as following:
+ * The insert CPU tag mode is as following:
* - CPU_INSERT_TO_ALL
* - CPU_INSERT_TO_TRAPPING
* - CPU_INSERT_TO_NONE
* RT_ERR_L2_NO_CPU_PORT - CPU port is not exist
* Note:
* The API can get configured CPU port and its setting.
- * The inset cpu tag mode is as following:
+ * The insert CPU tag mode is as following:
* - CPU_INSERT_TO_ALL
* - CPU_INSERT_TO_TRAPPING
* - CPU_INSERT_TO_NONE
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes 1X module high-layer API defination
+ * Feature : The file includes 1X module high-layer API definition
*
*/
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes EEE module high-layer API defination
+ * Feature : The file includes EEE module high-layer API definition
*
*/
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes I2C module high-layer API defination
+ * Feature : The file includes I2C module high-layer API definition
*
*/
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes IGMP module high-layer API defination
+ * Feature : The file includes IGMP module high-layer API definition
*
*/
* Input:
* port - Port ID
* protocol - IGMP/MLD protocol
- * action - Per-port and per-protocol IGMP action seeting
+ * action - Per-port and per-protocol IGMP action setting
* Output:
* None.
* Return:
* Input:
* port - Port ID
* protocol - IGMP/MLD protocol
- * action - Per-port and per-protocol IGMP action seeting
+ * action - Per-port and per-protocol IGMP action setting
* Output:
* None.
* Return:
* Description:
* Get IGMP/MLD Group database
* Input:
- * indes - Index (0~255)
+ * index - Index (0~255)
* Output:
* pGroup - Group database information.
* Return:
/* Function Name:
* rtk_igmp_dropLeaveZeroEnable_set
* Description:
- * Set the function of droppping Leave packet with group IP = 0.0.0.0
+ * Set the function of dropping Leave packet with group IP = 0.0.0.0
* Input:
* enabled - Action 1: drop, 0:pass
* Output:
/* Function Name:
* rtk_igmp_dropLeaveZeroEnable_get
* Description:
- * Get the function of droppping Leave packet with group IP = 0.0.0.0
+ * Get the function of dropping Leave packet with group IP = 0.0.0.0
* Input:
* None
* Output:
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes Interrupt module high-layer API defination
+ * Feature : The file includes Interrupt module high-layer API definition
*
*/
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes L2 module high-layer API defination
+ * Feature : The file includes L2 module high-layer API definition
*
*/
* RT_ERR_L2_INDEXTBL_FULL - hashed index is full of entries.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * If the unicast mac address already existed in LUT, it will udpate the status of the entry.
+ * If the unicast mac address already existed in LUT, it will update the status of the entry.
* Otherwise, it will find an empty or asic auto learned entry to write. If all the entries
* with the same hash value can't be replaced, ASIC will return a RT_ERR_L2_INDEXTBL_FULL error.
*/
* RT_ERR_PORT_MASK - Invalid portmask.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * If the multicast mac address already existed in the LUT, it will udpate the
+ * If the multicast mac address already existed in the LUT, it will update the
* port mask of the entry. Otherwise, it will find an empty or asic auto learned
* entry to write. If all the entries with the same hash value can't be replaced,
* ASIC will return a RT_ERR_L2_INDEXTBL_FULL error.
/* Function Name:
* rtk_l2_ipMcastAddr_add
* Description:
- * Add Lut IP multicast entry
+ * Add LUT IP multicast entry
* Input:
* pIpMcastAddr - IP Multicast entry
* Output:
* RT_ERR_L2_ENTRY_NOTFOUND - No such LUT entry.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * The API can get Lut table of IP multicast entry.
+ * The API can get LUT table of IP multicast entry.
*/
extern rtk_api_ret_t rtk_l2_ipMcastAddr_get(rtk_l2_ipMcastAddr_t *pIpMcastAddr);
/* Function Name:
* rtk_l2_ipVidMcastAddr_add
* Description:
- * Add Lut IP multicast+VID entry
+ * Add LUT IP multicast+VID entry
* Input:
* pIpVidMcastAddr - IP & VID multicast Entry
* Output:
* Set flooding portmask
* Input:
* type - flooding type.
- * pFlood_portmask - flooding porkmask
+ * pFlood_portmask - flooding portmask
* Output:
* None
* Return:
* Input:
* type - flooding type.
* Output:
- * pFlood_portmask - flooding porkmask
+ * pFlood_portmask - flooding portmask
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
/* Function Name:
* rtk_l2_localPktPermit_set
* Description:
- * Set permittion of frames if source port and destination port are the same.
+ * Set permission of frames if source port and destination port are the same.
* Input:
* port - Port id.
- * permit - permittion status
+ * permit - permission status
* Output:
* None
* Return:
* RT_ERR_PORT_ID - Invalid port number.
* RT_ERR_ENABLE - Invalid permit value.
* Note:
- * This API is setted to permit frame if its source port is equal to destination port.
+ * This API is set to permit frame if its source port is equal to destination port.
*/
extern rtk_api_ret_t rtk_l2_localPktPermit_set(rtk_port_t port, rtk_enable_t permit);
/* Function Name:
* rtk_l2_localPktPermit_get
* Description:
- * Get permittion of frames if source port and destination port are the same.
+ * Get permission of frames if source port and destination port are the same.
* Input:
* port - Port id.
* Output:
- * pPermit - permittion status
+ * pPermit - permission status
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number.
* Note:
- * This API is to get permittion status for frames if its source port is equal to destination port.
+ * This API is to get permission status for frames if its source port is equal to destination port.
*/
extern rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit);
/* Function Name:
* rtk_l2_aging_set
* Description:
- * Set LUT agging out speed
+ * Set LUT ageing out speed
* Input:
- * aging_time - Agging out time.
+ * aging_time - Ageing out time.
* Output:
* None
* Return:
* RT_ERR_SMI - SMI access error
* RT_ERR_OUT_OF_RANGE - input out of range.
* Note:
- * The API can set LUT agging out period for each entry and the range is from 14s to 800s.
+ * The API can set LUT ageing out period for each entry and the range is from 14s to 800s.
*/
extern rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time);
/* Function Name:
* rtk_l2_aging_get
* Description:
- * Get LUT agging out time
+ * Get LUT ageing out time
* Input:
* None
* Output:
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number.
* Note:
- * The API can get LUT agging out period for each entry.
+ * The API can get LUT ageing out period for each entry.
*/
extern rtk_api_ret_t rtk_l2_aging_get(rtk_l2_age_time_t *pAging_time);
/* Function Name:
* rtk_l2_ipMcastAddrLookup_set
* Description:
- * Set Lut IP multicast lookup function
+ * Set LUT IP multicast lookup function
* Input:
* type - Lookup type for IPMC packet.
* Output:
/* Function Name:
* rtk_l2_ipMcastAddrLookup_get
* Description:
- * Get Lut IP multicast lookup function
+ * Get LUT IP multicast lookup function
* Input:
* None.
* Output:
/* Function Name:
* rtk_l2_ipMcastForwardRouterPort_set
* Description:
- * Set IPMC packet forward to rounter port also or not
+ * Set IPMC packet forward to router port also or not
* Input:
- * enabled - 1: Inlcude router port, 0, exclude router port
+ * enabled - 1: Include router port, 0, exclude router port
* Output:
* None.
* Return:
/* Function Name:
* rtk_l2_ipMcastForwardRouterPort_get
* Description:
- * Get IPMC packet forward to rounter port also or not
+ * Get IPMC packet forward to router port also or not
* Input:
* None.
* Output:
- * pEnabled - 1: Inlcude router port, 0, exclude router port
+ * pEnabled - 1: Include router port, 0, exclude router port
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes Leaky module high-layer API defination
+ * Feature : The file includes Leaky module high-layer API definition
*
*/
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes LED module high-layer API defination
+ * Feature : The file includes LED module high-layer API definition
*
*/
/* Function Name:
* rtk_led_enable_set
* Description:
- * Set Led enable congiuration
+ * Set Led enable configuration
* Input:
* group - LED group id.
* pPortmask - LED enable port mask.
/* Function Name:
* rtk_led_enable_get
* Description:
- * Get Led enable congiuration
+ * Get Led enable configuration
* Input:
* group - LED group id.
* Output:
/* Function Name:
* rtk_led_modeForce_set
* Description:
- * Set Led group to congiuration force mode
+ * Set Led group to configuration force mode
* Input:
* port - port ID
* group - Support LED group id.
/* Function Name:
* rtk_led_modeForce_get
* Description:
- * Get Led group to congiuration force mode
+ * Get Led group to configuration force mode
* Input:
* port - port ID
* group - Support LED group id.
/* Function Name:
* rtk_led_groupConfig_set
* Description:
- * Set per group Led to congiuration mode
+ * Set per group Led to configuration mode
* Input:
* group - LED group.
* config - LED configuration
/* Function Name:
* rtk_led_groupConfig_get
* Description:
- * Get Led group congiuration mode
+ * Get Led group configuration mode
* Input:
* group - LED group.
* Output:
/* Function Name:
* rtk_led_serialMode_set
* Description:
- * Set Led serial mode active congiuration
+ * Set Led serial mode active configuration
* Input:
* active - LED group.
* Output:
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * The API can set LED serial mode active congiuration.
+ * The API can set LED serial mode active configuration.
*/
extern rtk_api_ret_t rtk_led_serialMode_set(rtk_led_active_t active);
/* Function Name:
* rtk_led_serialMode_get
* Description:
- * Get Led group congiuration mode
+ * Get Led group configuration mode
* Input:
* group - LED group.
* Output:
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes Mirror module high-layer API defination
+ * Feature : The file includes Mirror module high-layer API definition
*
*/
* RT_ERR_SMI - SMI access error
* RT_ERR_ENABLE - Invalid enable input
* Note:
- * The API is to set mirror isolation function that prevent normal forwarding packets to miror port.
+ * The API is to set mirror isolation function that prevent normal forwarding packets to mirror port.
*/
extern rtk_api_ret_t rtk_mirror_portIso_set(rtk_enable_t enable);
* RT_ERR_SMI - SMI access error
* RT_ERR_ENABLE - Invalid enable input
* Note:
- * The API is to set mirror VLAN leaky function forwarding packets to miror port.
+ * The API is to set mirror VLAN leaky function forwarding packets to mirror port.
*/
extern rtk_api_ret_t rtk_mirror_vlanLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable);
* RT_ERR_SMI - SMI access error
* RT_ERR_ENABLE - Invalid enable input
* Note:
- * The API is to set mirror VLAN leaky function forwarding packets to miror port.
+ * The API is to set mirror VLAN leaky function forwarding packets to mirror port.
*/
extern rtk_api_ret_t rtk_mirror_isolationLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable);
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes port module high-layer API defination
+ * Feature : The file includes port module high-layer API definition
*
*/
/* Function Name:
* rtk_port_phyAutoNegoAbility_set
* Description:
- * Set ethernet PHY auto-negotiation desired ability.
+ * Set Ethernet PHY auto-negotiation desired ability.
* Input:
* port - port id.
* pAbility - Ability structure
* RT_ERR_INPUT - Invalid input parameters.
* RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
* Note:
- * Get the capablity of specified PHY.
+ * Get the capability of specified PHY.
*/
extern rtk_api_ret_t rtk_port_phyAutoNegoAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility);
* RT_ERR_INPUT - Invalid input parameters.
* RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
* Note:
- * Get the capablity of specified PHY.
+ * Get the capability of specified PHY.
*/
extern rtk_api_ret_t rtk_port_phyForceModeAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility);
/* Function Name:
* rtk_port_phyStatus_get
* Description:
- * Get ethernet PHY linking status
+ * Get Ethernet PHY linking status
* Input:
* port - Port id.
* Output:
* For UTP port, This API will also enable the digital
* loopback bit in PHY register for sync of speed between
* PHY and MAC. For EXT port, users need to force the
- * link state by themself.
+ * link state by themselves.
*/
extern rtk_api_ret_t rtk_port_macLocalLoopbackEnable_set(rtk_port_t port, rtk_enable_t enable);
/* Function Name:
* rtk_port_backpressureEnable_set
* Description:
- * Set the half duplex backpressure enable status of the specific port.
+ * Set the half duplex back-pressure enable status of the specific port.
* Input:
* port - port id.
* enable - Back pressure status.
* RT_ERR_PORT_ID - Invalid port number.
* RT_ERR_ENABLE - Invalid enable input.
* Note:
- * This API can set the half duplex backpressure enable status of the specific port.
- * The half duplex backpressure enable status of the port is as following:
+ * This API can set the half duplex back-pressure enable status of the specific port.
+ * The half duplex back-pressure enable status of the port is as following:
* - DISABLE
* - ENABLE
*/
/* Function Name:
* rtk_port_backpressureEnable_get
* Description:
- * Get the half duplex backpressure enable status of the specific port.
+ * Get the half duplex back-pressure enable status of the specific port.
* Input:
* port - Port id.
* Output:
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number.
* Note:
- * This API can get the half duplex backpressure enable status of the specific port.
- * The half duplex backpressure enable status of the port is as following:
+ * This API can get the half duplex back-pressure enable status of the specific port.
+ * The half duplex back-pressure enable status of the port is as following:
* - DISABLE
* - ENABLE
*/
/* Function Name:
* rtk_port_adminEnable_get
* Description:
- * Get port admin configurationof the specific port.
+ * Get port admin configuration of the specific port.
* Input:
* port - Port id.
* Output:
* RT_ERR_PORT_ID - Invalid port number.
* RT_ERR_PORT_MASK - Invalid portmask.
* Note:
- * This API set the port mask that a port can trasmit packet to of each port
+ * This API set the port mask that a port can transmit packet to of each port
* A port can only transmit packet to ports included in permitted portmask
*/
extern rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPortmask);
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number.
* Note:
- * This API get the port mask that a port can trasmit packet to of each port
+ * This API get the port mask that a port can transmit packet to of each port
* A port can only transmit packet to ports included in permitted portmask
*/
extern rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPortmask);
* Note:
* This API can set external interface 2 RGMII delay.
* In TX delay, there are 2 selection: no-delay and 2ns delay.
- * In RX dekay, there are 8 steps for delay tunning. 0 for no-delay, and 7 for maximum delay.
+ * In RX delay, there are 8 steps for delay tuning. 0 for no-delay, and 7 for maximum delay.
*/
extern rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay);
* Note:
* This API can set external interface 2 RGMII delay.
* In TX delay, there are 2 selection: no-delay and 2ns delay.
- * In RX dekay, there are 8 steps for delay tunning. 0 for n0-delay, and 7 for maximum delay.
+ * In RX delay, there are 8 steps for delay tuning. 0 for n0-delay, and 7 for maximum delay.
*/
extern rtk_api_ret_t rtk_port_rgmiiDelayExt_get(rtk_port_t port, rtk_data_t *pTxDelay, rtk_data_t *pRxDelay);
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes time module high-layer API defination
+ * Feature : The file includes time module high-layer API definition
*
*/
/* Function Name:
* rtk_ptp_portTimestamp_get
* Description:
- * Get PTP timstamp according to the PTP identifier on the dedicated port from the specified device.
+ * Get PTP timestamp according to the PTP identifier on the dedicated port from the specified device.
* Input:
* unit - unit id
* port - port id
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes QoS module high-layer API defination
+ * Feature : The file includes QoS module high-layer API definition
*
*/
/* Function Name:
* rtk_qos_init
* Description:
- * Configure Qos default settings with queue number assigment to each port.
+ * Configure QoS default settings with queue number assignment to each port.
* Input:
* queueNum - Queue number of each port.
* Output:
* RT_ERR_QUEUE_NUM - Invalid queue number.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This API will initialize related Qos setting with queue number assigment.
+ * This API will initialize related QoS setting with queue number assignment.
* The queue number is from 1 to 8.
*/
extern rtk_api_ret_t rtk_qos_init(rtk_queue_num_t queueNum);
* RT_ERR_VLAN_PRIORITY - Invalid priority.
* RT_ERR_QOS_INT_PRIORITY - Invalid priority.
* Note:
- * Priority of 802.1Q assigment for internal asic priority, and it is uesed for queue usage and packet scheduling.
+ * Priority of 802.1Q assignment for internal asic priority, and it is used for queue usage and packet scheduling.
*/
extern rtk_api_ret_t rtk_qos_1pPriRemap_get(rtk_pri_t dot1p_pri, rtk_pri_t *pInt_pri);
*
* Purpose : RTL8367/RTL8367C switch high-level API
*
- * Feature : The file includes rate module high-layer API defination
+ * Feature : The file includes rate module high-layer API definition
*
*/
RT_ERR_NULL_POINTER, /* 0x00000007, input parameter is null pointer */
RT_ERR_QUEUE_ID, /* 0x00000008, invalid queue id */
RT_ERR_QUEUE_NUM, /* 0x00000009, invalid queue number */
- RT_ERR_BUSYWAIT_TIMEOUT, /* 0x0000000a, busy watting time out */
+ RT_ERR_BUSYWAIT_TIMEOUT, /* 0x0000000a, busy waiting time out */
RT_ERR_MAC, /* 0x0000000b, invalid mac address */
RT_ERR_OUT_OF_RANGE, /* 0x0000000c, input parameter out of range */
RT_ERR_CHIP_NOT_SUPPORTED, /* 0x0000000d, functions not supported by this chip model */
/* 0x0001xxxx for vlan */
RT_ERR_VLAN_VID = 0x00010000, /* 0x00010000, invalid vid */
RT_ERR_VLAN_PRIORITY, /* 0x00010001, invalid 1p priority */
- RT_ERR_VLAN_EMPTY_ENTRY, /* 0x00010002, emtpy entry of vlan table */
+ RT_ERR_VLAN_EMPTY_ENTRY, /* 0x00010002, empty entry of vlan table */
RT_ERR_VLAN_ACCEPT_FRAME_TYPE, /* 0x00010003, invalid accept frame type */
RT_ERR_VLAN_EXIST, /* 0x00010004, vlan is exist */
RT_ERR_VLAN_ENTRY_NOT_FOUND, /* 0x00010005, specified vlan entry not found */
RT_ERR_INBW_TOKEN_AMOUNT, /* 0x000c0001, invalid amount of token for input bandwidth control */
RT_ERR_INBW_FCON_VALUE, /* 0x000c0002, invalid flow control ON threshold value for input bandwidth control */
RT_ERR_INBW_FCOFF_VALUE, /* 0x000c0003, invalid flow control OFF threshold value for input bandwidth control */
- RT_ERR_INBW_FC_ALLOWANCE, /* 0x000c0004, invalid allowance of incomming packet for input bandwidth control */
+ RT_ERR_INBW_FC_ALLOWANCE, /* 0x000c0004, invalid allowance of incoming packet for input bandwidth control */
RT_ERR_INBW_RATE, /* 0x000c0005, invalid input bandwidth */
/* 0x000dxxxx for QoS */
RT_ERR_DOT1X_PROC, /* 0x00110006, unauthorized behavior error */
RT_ERR_DOT1X_GVLANIDX, /* 0x00110007, guest vlan index error */
RT_ERR_DOT1X_GVLANTALK, /* 0x00110008, guest vlan OPDIR error */
- RT_ERR_DOT1X_MAC_PORT_MISMATCH, /* 0x00110009, Auth MAC and port mismatch eror */
+ RT_ERR_DOT1X_MAC_PORT_MISMATCH, /* 0x00110009, Auth MAC and port mismatch error */
RT_ERR_END /* The symbol is the latest symbol */
} rt_error_code_t;
#define RTK_SCAN_ALL_LOG_PORT(__port__) for(__port__ = 0; __port__ < RTK_SWITCH_PORT_NUM; __port__++) if( rtk_switch_logicalPortCheck(__port__) == RT_ERR_OK)
#define RTK_SCAN_ALL_LOG_PORTMASK(__portmask__) for((__portmask__).bits[0] = 0; (__portmask__).bits[0] < 0x7FFFF; (__portmask__).bits[0]++) if( rtk_switch_isPortMaskValid(&__portmask__) == RT_ERR_OK)
-/* Port mask defination */
+/* Port mask definition */
#define RTK_PHY_PORTMASK_ALL (rtk_switch_phyPortMask_get())
-/* Port defination*/
+/* Port definition*/
#define RTK_MAX_LOGICAL_PORT_ID (rtk_switch_maxLogicalPort_get())
/* Function Name:
/* Function Name:
* rtk_switch_portmask_L2P_get
* Description:
- * Get physicl portmask from logical portmask
+ * Get physical portmask from logical portmask
* Input:
* pLogicalPmask - logical port mask
* Output:
/* Function Name:
* rtk_switch_init
* Description:
- * Set chip to default configuration enviroment
+ * Set chip to default configuration environment
* Input:
* None
* Output:
#define ETHER_ADDR_LEN 6
#endif
-/* ethernet address type */
+/* Ethernet address type */
typedef struct rtk_mac_s
{
rtk_uint8 octet[ETHER_ADDR_LEN];
} rtk_mac_t;
-typedef rtk_uint32 rtk_pri_t; /* priority vlaue */
+typedef rtk_uint32 rtk_pri_t; /* priority value */
typedef rtk_uint32 rtk_qid_t; /* queue id type */
typedef rtk_uint32 rtk_data_t;
typedef rtk_uint32 rtk_dscp_t; /* dscp vlaue */
* $Date: 2017-03-08 15:13:58 +0800 (¶g¤T, 08 ¤T¤ë 2017) $
*
* Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Green ethernet related functions
+ * Feature : Green Ethernet related functions
*
*/
* $Date: 2017-03-08 15:13:58 +0800 (¶g¤T, 08 ¤T¤ë 2017) $
*
* Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Qos related functions
+ * Feature : QoS related functions
*
*/
* $Date: 2017-03-08 15:13:58 +0800 (¶g¤T, 08 ¤T¤ë 2017) $
*
* Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Unkown multicast related functions
+ * Feature : Unknown multicast related functions
*
*/
* $Date: 2017-03-08 15:13:58 +0800 (¶g¤T, 08 ¤T¤ë 2017) $
*
* Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Regsiter MACRO related definition
+ * Feature : Register MACRO related definition
*
*/
* RT_ERR_L2_INDEXTBL_FULL - hashed index is full of entries.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * If the unicast mac address already existed in LUT, it will udpate the status of the entry.
+ * If the unicast mac address already existed in LUT, it will update the status of the entry.
* Otherwise, it will find an empty or asic auto learned entry to write. If all the entries
* with the same hash value can't be replaced, ASIC will return a RT_ERR_L2_INDEXTBL_FULL error.
*/
* RT_ERR_PORT_MASK - Invalid portmask.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * If the multicast mac address already existed in the LUT, it will udpate the
+ * If the multicast mac address already existed in the LUT, it will update the
* port mask of the entry. Otherwise, it will find an empty or asic auto learned
* entry to write. If all the entries with the same hash value can't be replaced,
* ASIC will return a RT_ERR_L2_INDEXTBL_FULL error.
/* Function Name:
* rtk_l2_ipMcastAddr_add
* Description:
- * Add Lut IP multicast entry
+ * Add LUT IP multicast entry
* Input:
* pIpMcastAddr - IP Multicast entry
* Output:
* RT_ERR_L2_ENTRY_NOTFOUND - No such LUT entry.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * The API can get Lut table of IP multicast entry.
+ * The API can get LUT table of IP multicast entry.
*/
rtk_api_ret_t rtk_l2_ipMcastAddr_get(rtk_l2_ipMcastAddr_t *pIpMcastAddr)
{
/* Function Name:
* rtk_l2_ipVidMcastAddr_add
* Description:
- * Add Lut IP multicast+VID entry
+ * Add LUT IP multicast+VID entry
* Input:
* pIpVidMcastAddr - IP & VID multicast Entry
* Output:
* Set flooding portmask
* Input:
* type - flooding type.
- * pFlood_portmask - flooding porkmask
+ * pFlood_portmask - flooding portmask
* Output:
* None
* Return:
* Input:
* type - flooding type.
* Output:
- * pFlood_portmask - flooding porkmask
+ * pFlood_portmask - flooding portmask
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
/* Function Name:
* rtk_l2_localPktPermit_set
* Description:
- * Set permittion of frames if source port and destination port are the same.
+ * Set permission of frames if source port and destination port are the same.
* Input:
* port - Port id.
- * permit - permittion status
+ * permit - permission status
* Output:
* None
* Return:
* RT_ERR_PORT_ID - Invalid port number.
* RT_ERR_ENABLE - Invalid permit value.
* Note:
- * This API is setted to permit frame if its source port is equal to destination port.
+ * This API is set to permit frame if its source port is equal to destination port.
*/
rtk_api_ret_t rtk_l2_localPktPermit_set(rtk_port_t port, rtk_enable_t permit)
{
/* Function Name:
* rtk_l2_localPktPermit_get
* Description:
- * Get permittion of frames if source port and destination port are the same.
+ * Get permission of frames if source port and destination port are the same.
* Input:
* port - Port id.
* Output:
- * pPermit - permittion status
+ * pPermit - permission status
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number.
* Note:
- * This API is to get permittion status for frames if its source port is equal to destination port.
+ * This API is to get permission status for frames if its source port is equal to destination port.
*/
rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit)
{
/* Function Name:
* rtk_l2_aging_set
* Description:
- * Set LUT agging out speed
+ * Set LUT ageing out speed
* Input:
- * aging_time - Agging out time.
+ * aging_time - Ageing out time.
* Output:
* None
* Return:
* RT_ERR_SMI - SMI access error
* RT_ERR_OUT_OF_RANGE - input out of range.
* Note:
- * The API can set LUT agging out period for each entry and the range is from 45s to 458s.
+ * The API can set LUT ageing out period for each entry and the range is from 45s to 458s.
*/
rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time)
{
/* Function Name:
* rtk_l2_aging_get
* Description:
- * Get LUT agging out time
+ * Get LUT ageing out time
* Input:
* None
* Output:
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number.
* Note:
- * The API can get LUT agging out period for each entry.
+ * The API can get LUT ageing out period for each entry.
*/
rtk_api_ret_t rtk_l2_aging_get(rtk_l2_age_time_t *pAging_time)
{
/* Function Name:
* rtk_l2_ipMcastAddrLookup_set
* Description:
- * Set Lut IP multicast lookup function
+ * Set LUT IP multicast lookup function
* Input:
* type - Lookup type for IPMC packet.
* Output:
/* Function Name:
* rtk_l2_ipMcastAddrLookup_get
* Description:
- * Get Lut IP multicast lookup function
+ * Get LUT IP multicast lookup function
* Input:
* None.
* Output:
/* Function Name:
* rtk_l2_ipMcastForwardRouterPort_set
* Description:
- * Set IPMC packet forward to rounter port also or not
+ * Set IPMC packet forward to router port also or not
* Input:
- * enabled - 1: Inlcude router port, 0, exclude router port
+ * enabled - 1: Include router port, 0, exclude router port
* Output:
* None.
* Return:
/* Function Name:
* rtk_l2_ipMcastForwardRouterPort_get
* Description:
- * Get IPMC packet forward to rounter port also or not
+ * Get IPMC packet forward to router port also or not
* Input:
* None.
* Output:
- * pEnabled - 1: Inlcude router port, 0, exclude router port
+ * pEnabled - 1: Include router port, 0, exclude router port
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
/* Function Name:
* rtk_led_enable_set
* Description:
- * Set Led enable congiuration
+ * Set Led enable configuration
* Input:
* group - LED group id.
* pPortmask - LED enable port mask.
/* Function Name:
* rtk_led_enable_get
* Description:
- * Get Led enable congiuration
+ * Get Led enable configuration
* Input:
* group - LED group id.
* Output:
/* Function Name:
* rtk_led_modeForce_set
* Description:
- * Set Led group to congiuration force mode
+ * Set Led group to configuration force mode
* Input:
* port - port ID
* group - Support LED group id.
/* Function Name:
* rtk_led_modeForce_get
* Description:
- * Get Led group to congiuration force mode
+ * Get Led group to configuration force mode
* Input:
* port - port ID
* group - Support LED group id.
/* Function Name:
* rtk_led_groupConfig_set
* Description:
- * Set per group Led to congiuration mode
+ * Set per group Led to configuration mode
* Input:
* group - LED group.
* config - LED configuration
/* Function Name:
* rtk_led_groupConfig_get
* Description:
- * Get Led group congiuration mode
+ * Get Led group configuration mode
* Input:
* group - LED group.
* Output:
/* Function Name:
* rtk_led_serialMode_set
* Description:
- * Set Led serial mode active congiuration
+ * Set Led serial mode active configuration
* Input:
* active - LED group.
* Output:
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * The API can set LED serial mode active congiuration.
+ * The API can set LED serial mode active configuration.
*/
rtk_api_ret_t rtk_led_serialMode_set(rtk_led_active_t active)
{
RTK_CHK_PORTMASK_VALID(pMirrored_tx_portmask);
- /*Mirror Sorce Port Mask Check*/
+ /*Mirror Source Port Mask Check*/
if (pMirrored_tx_portmask->bits[0]!=pMirrored_rx_portmask->bits[0]&&pMirrored_tx_portmask->bits[0]!=0&&pMirrored_rx_portmask->bits[0]!=0)
return RT_ERR_PORT_MASK;
* RT_ERR_SMI - SMI access error
* RT_ERR_ENABLE - Invalid enable input
* Note:
- * The API is to set mirror VLAN leaky function forwarding packets to miror port.
+ * The API is to set mirror VLAN leaky function forwarding packets to mirror port.
*/
rtk_api_ret_t rtk_mirror_isolationLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable)
{
/* Function Name:
* rtk_port_phyAutoNegoAbility_set
* Description:
- * Set ethernet PHY auto-negotiation desired ability.
+ * Set Ethernet PHY auto-negotiation desired ability.
* Input:
* port - port id.
* pAbility - Ability structure
* RT_ERR_INPUT - Invalid input parameters.
* RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
* Note:
- * Get the capablity of specified PHY.
+ * Get the capability of specified PHY.
*/
rtk_api_ret_t rtk_port_phyAutoNegoAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility)
{
if (1 == pAbility->AsyFC)
{
- /*Asymetric flow control in reg 4.11*/
+ /*Asymmetric flow control in reg 4.11*/
phyEnMsk4 = phyEnMsk4 | (1 << 11);
}
if (1 == pAbility->FC)
* RT_ERR_INPUT - Invalid input parameters.
* RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
* Note:
- * Get the capablity of specified PHY.
+ * Get the capability of specified PHY.
*/
rtk_api_ret_t rtk_port_phyForceModeAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility)
{
/* Function Name:
* rtk_port_phyStatus_get
* Description:
- * Get ethernet PHY linking status
+ * Get Ethernet PHY linking status
* Input:
* port - Port id.
* Output:
* For UTP port, This API will also enable the digital
* loopback bit in PHY register for sync of speed between
* PHY and MAC. For EXT port, users need to force the
- * link state by themself.
+ * link state by themselves.
*/
rtk_api_ret_t rtk_port_macLocalLoopbackEnable_set(rtk_port_t port, rtk_enable_t enable)
{
/* Function Name:
* rtk_port_backpressureEnable_set
* Description:
- * Set the half duplex backpressure enable status of the specific port.
+ * Set the half duplex back-pressure enable status of the specific port.
* Input:
* port - port id.
* enable - Back pressure status.
* RT_ERR_PORT_ID - Invalid port number.
* RT_ERR_ENABLE - Invalid enable input.
* Note:
- * This API can set the half duplex backpressure enable status of the specific port.
- * The half duplex backpressure enable status of the port is as following:
+ * This API can set the half duplex back-pressure enable status of the specific port.
+ * The half duplex back-pressure enable status of the port is as following:
* - DISABLE(Defer)
- * - ENABLE (Backpressure)
+ * - ENABLE (Back-pressure)
*/
rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable_t enable)
{
/* Function Name:
* rtk_port_backpressureEnable_get
* Description:
- * Get the half duplex backpressure enable status of the specific port.
+ * Get the half duplex back-pressure enable status of the specific port.
* Input:
* port - Port id.
* Output:
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number.
* Note:
- * This API can get the half duplex backpressure enable status of the specific port.
- * The half duplex backpressure enable status of the port is as following:
+ * This API can get the half duplex back-pressure enable status of the specific port.
+ * The half duplex back-pressure enable status of the port is as following:
* - DISABLE(Defer)
- * - ENABLE (Backpressure)
+ * - ENABLE (Back-pressure)
*/
rtk_api_ret_t rtk_port_backpressureEnable_get(rtk_port_t port, rtk_enable_t *pEnable)
{
/* Function Name:
* rtk_port_adminEnable_get
* Description:
- * Get port admin configurationof the specific port.
+ * Get port admin configuration of the specific port.
* Input:
* port - Port id.
* Output:
* RT_ERR_PORT_ID - Invalid port number.
* RT_ERR_PORT_MASK - Invalid portmask.
* Note:
- * This API set the port mask that a port can trasmit packet to of each port
+ * This API set the port mask that a port can transmit packet to of each port
* A port can only transmit packet to ports included in permitted portmask
*/
rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPortmask)
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number.
* Note:
- * This API get the port mask that a port can trasmit packet to of each port
+ * This API get the port mask that a port can transmit packet to of each port
* A port can only transmit packet to ports included in permitted portmask
*/
rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPortmask)
* Note:
* This API can set external interface 2 RGMII delay.
* In TX delay, there are 2 selection: no-delay and 2ns delay.
- * In RX dekay, there are 8 steps for delay tunning. 0 for no-delay, and 7 for maximum delay.
+ * In RX delay, there are 8 steps for delay tuning. 0 for no-delay, and 7 for maximum delay.
*/
rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay)
{
* Note:
* This API can set external interface 2 RGMII delay.
* In TX delay, there are 2 selection: no-delay and 2ns delay.
- * In RX dekay, there are 8 steps for delay tunning. 0 for n0-delay, and 7 for maximum delay.
+ * In RX delay, there are 8 steps for delay tuning. 0 for n0-delay, and 7 for maximum delay.
*/
rtk_api_ret_t rtk_port_rgmiiDelayExt_get(rtk_port_t port, rtk_data_t *pTxDelay, rtk_data_t *pRxDelay)
{
/* Function Name:
* rtk_ptp_portTimestamp_get
* Description:
- * Get PTP timstamp according to the PTP identifier on the dedicated port from the specified device.
+ * Get PTP timestamp according to the PTP identifier on the dedicated port from the specified device.
* Input:
* unit - unit id
* port - port id
/* Function Name:
* rtk_qos_init
* Description:
- * Configure Qos default settings with queue number assigment to each port.
+ * Configure QoS default settings with queue number assignment to each port.
* Input:
* queueNum - Queue number of each port.
* Output:
* RT_ERR_QUEUE_NUM - Invalid queue number.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This API will initialize related Qos setting with queue number assigment.
+ * This API will initialize related QoS setting with queue number assignment.
* The queue number is from 1 to 8.
*/
rtk_api_ret_t rtk_qos_init(rtk_queue_num_t queueNum)
return retVal;
}
- /* Finetune B/T value */
+ /* Fine-tune B/T value */
if((retVal = rtl8367c_setAsicReg(0x1722, 0x1158)) != RT_ERR_OK)
return retVal;
* RT_ERR_VLAN_PRIORITY - Invalid priority.
* RT_ERR_QOS_INT_PRIORITY - Invalid priority.
* Note:
- * Priority of 802.1Q assigment for internal asic priority, and it is uesed for queue usage and packet scheduling.
+ * Priority of 802.1Q assignment for internal asic priority, and it is used for queue usage and packet scheduling.
*/
rtk_api_ret_t rtk_qos_1pPriRemap_get(rtk_pri_t dot1p_pri, rtk_pri_t *pInt_pri)
{
* RT_ERR_NULL_POINTER
* Note:
* Clear operation effect loop_enter and loop_leave only, other field in
- * the structure are don't care. Loop status cab't be clean.
+ * the structure are don't care. Loop status can't be clean.
*/
rtk_api_ret_t rtk_rldp_portStatus_set(rtk_port_t port, rtk_rldp_portStatus_t *pPortStatus)
{
/* Minimum physical port number */
0,
- /* Maxmum physical port number */
+ /* Maximum physical port number */
10,
/* Physical port mask */
/* Minimum physical port number */
0,
- /* Maxmum physical port number */
+ /* Maximum physical port number */
7,
/* Physical port mask */
/* Minimum physical port number */
0,
- /* Maxmum physical port number */
+ /* Maximum physical port number */
7,
/* Physical port mask */
/* Function Name:
* rtk_switch_portmask_L2P_get
* Description:
- * Get physicl portmask from logical portmask
+ * Get physical portmask from logical portmask
* Input:
* pLogicalPmask - logical port mask
* Output:
/* Function Name:
* rtk_switch_init
* Description:
- * Set chip to default configuration enviroment
+ * Set chip to default configuration environment
* Input:
* None
* Output:
/* Function Name:
* rtl8367c_setAsicAcl
* Description:
- * Set port acl function enable/disable
+ * Set port ACL function enable/disable
* Input:
* port - Physical port number (0~10)
* enabled - 1: enabled, 0: disabled
/* Function Name:
* rtl8367c_getAsicAcl
* Description:
- * Get port acl function enable/disable
+ * Get port ACL function enable/disable
* Input:
* port - Physical port number (0~10)
* enabled - 1: enabled, 0: disabled
/* Function Name:
* rtl8367c_setAsicAclUnmatchedPermit
* Description:
- * Set port acl function unmatched permit action
+ * Set port ACL function unmatched permit action
* Input:
* port - Physical port number (0~10)
* enabled - 1: enabled, 0: disabled
/* Function Name:
* rtl8367c_getAsicAclUnmatchedPermit
* Description:
- * Get port acl function unmatched permit action
+ * Get port ACL function unmatched permit action
* Input:
* port - Physical port number (0~10)
* enabled - 1: enabled, 0: disabled
/* Function Name:
* rtl8367c_setAsicAclRule
* Description:
- * Set acl rule content
+ * Set ACL rule content
* Input:
* index - ACL rule index (0-95) of 96 ACL rules
- * pAclRule - ACL rule stucture for setting
+ * pAclRule - ACL rule structure for setting
* Output:
* None
* Return:
* RT_ERR_OUT_OF_RANGE - Invalid ACL rule index (0-95)
* Note:
* System supported 95 shared 289-bit ACL ingress rule. Index was available at range 0-95 only.
- * If software want to modify ACL rule, the ACL function should be disable at first or unspecify
- * acl action will be executed.
+ * If software want to modify ACL rule, the ACL function should be disabled at first or unspecified
+ * ACL action will be executed.
* One ACL rule structure has three parts setting:
* Bit 0-147 Data Bits of this Rule
* Bit 148 Valid Bit
/* Function Name:
* rtl8367c_getAsicAclRule
* Description:
- * Get acl rule content
+ * Get ACL rule content
* Input:
* index - ACL rule index (0-63) of 64 ACL rules
- * pAclRule - ACL rule stucture for setting
+ * pAclRule - ACL rule structure for setting
* Output:
* None
* Return:
* Set fields of a ACL Template
* Input:
* index - ACL template index(0~4)
- * pAclType - ACL type stucture for setting
+ * pAclType - ACL type structure for setting
* Output:
* None
* Return:
* Note:
* The API can set type field of the 5 ACL rule templates.
* Each type has 8 fields. One field means what data in one field of a ACL rule means
- * 8 fields of ACL rule 0~95 is descripted by one type in ACL group
+ * 8 fields of ACL rule 0~95 is described by one type in ACL group
*/
ret_t rtl8367c_setAsicAclTemplate(rtk_uint32 index, rtl8367c_acltemplate_t* pAclType)
{
* Get fields of a ACL Template
* Input:
* index - ACL template index(0~4)
- * pAclType - ACL type stucture for setting
+ * pAclType - ACL type structure for setting
* Output:
* None
* Return:
* Set ACL rule matched Action
* Input:
* index - ACL rule index (0-95) of 96 ACL rules
- * pAclAct - ACL action stucture for setting
+ * pAclAct - ACL action structure for setting
* Output:
* None
* Return:
* Get ACL rule matched Action
* Input:
* index - ACL rule index (0-95) of 96 ACL rules
- * pAclAct - ACL action stucture for setting
+ * pAclAct - ACL action structure for setting
* Output:
* None
* Return:
/* Function Name:
* rtl8367c_setAsicAclGpioPolarity
* Description:
- * Set ACL Goip control palarity
+ * Set ACL Goip control polarity
* Input:
* polarity - 1: High, 0: Low
* Output:
/* Function Name:
* rtl8367c_getAsicAclGpioPolarity
* Description:
- * Get ACL Goip control palarity
+ * Get ACL Goip control polarity
* Input:
* pPolarity - 1: High, 0: Low
* Output:
/* Function Name:
* rtl8367c_setAsicCputagEnable
* Description:
- * Set cpu tag function enable/disable
+ * Set CPU tag function enable/disable
* Input:
* enabled - 1: enabled, 0: disabled
* Output:
/* Function Name:
* rtl8367c_getAsicCputagEnable
* Description:
- * Get cpu tag function enable/disable
+ * Get CPU tag function enable/disable
* Input:
* pEnabled - 1: enabled, 0: disabled
* Output:
/* Function Name:
* rtl8367c_setAsicCputagTrapPort
* Description:
- * Set cpu tag trap port
+ * Set CPU tag trap port
* Input:
* port - port number
* Output:
/* Function Name:
* rtl8367c_getAsicCputagTrapPort
* Description:
- * Get cpu tag trap port
+ * Get CPU tag trap port
* Input:
* pPort - port number
* Output:
/* Function Name:
* rtl8367c_setAsicCputagPosition
* Description:
- * Set cpu tag insert position
+ * Set CPU tag insert position
* Input:
- * postion - 1: After entire packet(before CRC field), 0: After MAC_SA (Default)
+ * position - 1: After entire packet(before CRC field), 0: After MAC_SA (Default)
* Output:
* None
* Return:
/* Function Name:
* rtl8367c_getAsicCputagPosition
* Description:
- * Get cpu tag insert position
+ * Get CPU tag insert position
* Input:
* pPostion - 1: After entire packet(before CRC field), 0: After MAC_SA (Default)
* Output:
/* Function Name:
* rtl8367c_setAsicCputagMode
* Description:
- * Set cpu tag mode
+ * Set CPU tag mode
* Input:
* mode - 1: 4bytes mode, 0: 8bytes mode
* Output:
/* Function Name:
* rtl8367c_getAsicCputagMode
* Description:
- * Get cpu tag mode
+ * Get CPU tag mode
* Input:
* pMode - 1: 4bytes mode, 0: 8bytes mode
* Output:
/* Function Name:
* rtl8367c_setAsicCputagRxMinLength
* Description:
- * Set cpu tag mode
+ * Set CPU tag mode
* Input:
* mode - 1: 64bytes, 0: 72bytes
* Output:
/* Function Name:
* rtl8367c_getAsicCputagRxMinLength
* Description:
- * Get cpu tag mode
+ * Get CPU tag mode
* Input:
* pMode - 1: 64bytes, 0: 72bytes
* Output:
* Description:
* Set PTP parser tag TPID.
* Input:
- * outerTag - outter tag TPID
+ * outerTag - outer tag TPID
* innerTag - inner tag TPID
* Output:
* None
* Input:
* None
* Output:
- * pOuterTag - outter tag TPID
+ * pOuterTag - outer tag TPID
* pInnerTag - inner tag TPID
* Return:
* RT_ERR_OK - Success
* RT_ERR_OK - Success
* RT_ERR_SMI - SMI access error
* Note:
- * The time granuality is 8 nano seconds.
+ * The time granularity is 8 nano seconds.
*/
ret_t rtl8367c_setAsicEavSysTime(rtk_uint32 second, rtk_uint32 nanoSecond)
{
* RT_ERR_OK - Success
* RT_ERR_SMI - SMI access error
* Note:
- * The time granuality is 8 nano seconds.
+ * The time granularity is 8 nano seconds.
*/
ret_t rtl8367c_getAsicEavSysTime(rtk_uint32* pSecond, rtk_uint32* pNanoSecond)
{
* Description:
* Set PTP system time adjust
* Input:
- * type - incresae or decrease
+ * type - increase or decrease
* second - seconds
* nanoSecond - nano seconds
* Output:
* RT_ERR_OK - Success
* RT_ERR_SMI - SMI access error
* Note:
- * This API can be used to clear ASIC interrupt status and register will be cleared by writting 1.
+ * This API can be used to clear ASIC interrupt status and register will be cleared by writing 1.
* [0]:TX_SYNC,
* [1]:TX_DELAY,
* [2]:TX_PDELAY_REQ,
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number
* Note:
- * If EAV function is enabled, PTP event messgae packet will be attached PTP timestamp for trapping
+ * If EAV function is enabled, PTP event message packet will be attached PTP timestamp for trapping
*/
ret_t rtl8367c_setAsicEavPortEnable(rtk_uint32 port, rtk_uint32 enabled)
{
* RT_ERR_OK - Success
* RT_ERR_SMI - SMI access error
* Note:
- * The time granuality is 8 nano seconds.
+ * The time granularity is 8 nano seconds.
*/
ret_t rtl8367c_getAsicEavPortTimeStamp(rtk_uint32 port, rtk_uint32 type, rtl8367c_ptp_time_stamp_t* timeStamp)
{
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number
* Note:
- * If EAV function is enabled, PTP event messgae packet will be attached PTP timestamp for trapping
+ * If EAV function is enabled, PTP event message packet will be attached PTP timestamp for trapping
*/
ret_t rtl8367c_setAsicEavEnable(rtk_uint32 port, rtk_uint32 enabled)
{
/* Function Name:
* rtl8367c_setAsicFlowControlJumboMode
* Description:
- * Set Jumbo threhsold for flow control
+ * Set Jumbo threshold for flow control
* Input:
* enabled - Jumbo mode flow control 1: Enable 0:Disable
* Output:
/* Function Name:
* rtl8367c_getAsicFlowControlJumboMode
* Description:
- * Get Jumbo threhsold for flow control
+ * Get Jumbo threshold for flow control
* Input:
* pEnabled - Jumbo mode flow control 1: Enable 0:Disable
* Output:
* $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $
*
* Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Green ethernet related functions
+ * Feature : Green Ethernet related functions
*
*/
#include <rtl8367c_asicdrv_green.h>
* Get per-Port ingress page usage per second
* Input:
* port - Physical port number (0~7)
- * pPage - page number of ingress packet occuping per second
+ * pPage - page number of ingress packet occurring per second
* Output:
* None
* Return:
* RT_ERR_SMI - SMI access error
* RT_ERR_PORT_ID - Invalid port number
* Note:
- * Ingress traffic occuping page number per second for high layer green feature usage
+ * Ingress traffic occurring page number per second for high layer green feature usage
*/
ret_t rtl8367c_getAsicGreenPortPage(rtk_uint32 port, rtk_uint32* pPage)
{
* Get indicator which ASIC had received high priority traffic or not
* Input:
* port - Physical port number (0~7)
- * pIndicator - Have received high priority traffic indicator. If 1 means ASCI had received high priority in 1second checking priod
+ * pIndicator - Have received high priority traffic indicator. If 1 means ASCI had received high priority in 1second checking period
* Output:
* None
* Return:
}
/*
-@func rtk_int32 | rtl8367c_setAsicGreenEthernet | Set green ethernet function.
+@func rtk_int32 | rtl8367c_setAsicGreenEthernet | Set green Ethernet function.
@parm rtk_uint32 | green | Green feature function usage 1:enable 0:disable.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@comm
The API can set Green Ethernet function to reduce power consumption. While green feature is enabled, ASIC will automatic
detect the cable length and then select different power mode for best performance with minimums power consumption. Link down
- ports will enter power savining mode in 10 seconds after the cable disconnected if power saving function is enabled.
+ ports will enter power saving mode in 10 seconds after the cable disconnected if power saving function is enabled.
*/
ret_t rtl8367c_setAsicGreenEthernet(rtk_uint32 port, rtk_uint32 green)
{
}
/*
-@func rtk_int32 | rtl8367c_getAsicGreenEthernet | Get green ethernet function.
+@func rtk_int32 | rtl8367c_getAsicGreenEthernet | Get green Ethernet function.
@parm rtk_uint32 | *green | Green feature function usage 1:enable 0:disable.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@comm
The API can set Green Ethernet function to reduce power consumption. While green feature is enabled, ASIC will automatic
detect the cable length and then select different power mode for best performance with minimums power consumption. Link down
- ports will enter power savining mode in 10 seconds after the cable disconnected if power saving function is enabled.
+ ports will enter power saving mode in 10 seconds after the cable disconnected if power saving function is enabled.
*/
ret_t rtl8367c_getAsicGreenEthernet(rtk_uint32 port, rtk_uint32* green)
{
* RT_ERR_SMI - SMI access error
* RT_ERR_OUT_OF_RANGE - input parameter out of range
* Note:
- * System support 16 user defined field selctors.
+ * System support 16 user defined field selectors.
* Each selector can be enabled or disable. User can defined retrieving 16-bits in many predefiend
* standard l2/l3/l4 payload.
*/
if(rob_var > RTL8367C_MAX_ROB_VAR)
return RT_ERR_OUT_OF_RANGE;
- /* Bourstness variable */
retVal = rtl8367c_setAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, rob_var);
+ /* Robustness variable */
if(retVal != RT_ERR_OK)
return retVal;
ret_t retVal;
rtk_uint32 value;
- /* Bourstness variable */
retVal = rtl8367c_getAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, &value);
+ /* Robustness variable */
if(retVal != RT_ERR_OK)
return retVal;
/* Function Name:
* rtl8367c_setAsicIGMPDropLeaveZero
* Description:
- * Set the function of droppping Leave packet with group IP = 0.0.0.0
+ * Set the function of dropping Leave packet with group IP = 0.0.0.0
* Input:
* drop - 1: Drop, 0:Bypass
* Output:
/* Function Name:
* rtl8367c_getAsicIGMPDropLeaveZero
* Description:
- * Get the function of droppping Leave packet with group IP = 0.0.0.0
+ * Get the function of dropping Leave packet with group IP = 0.0.0.0
* Input:
* None
* Output:
/* Function Name:
* rtl8367c_setAsicIGMPBypassStormCTRL
* Description:
- * Set the function of bypass strom control for IGMP/MLD packet
+ * Set the function of bypass storm control for IGMP/MLD packet
* Input:
* bypass - 1: Bypass, 0:not bypass
* Output:
/* Function Name:
* rtl8367c_getAsicIGMPBypassStormCTRL
* Description:
- * Set the function of bypass strom control for IGMP/MLD packet
+ * Set the function of bypass storm control for IGMP/MLD packet
* Input:
* None
* Output:
* Description:
* Get Port Isolation leaky for IGMP/MLD packet
* Input:
- * Noen
+ * None
* Output:
* pLeaky - 1: Leaky, 0:not leaky
* Return:
* Description:
* Get VLAN leaky for IGMP/MLD packet
* Input:
- * Noen
+ * None
* Output:
* pLeaky - 1: Leaky, 0:not leaky
* Return:
/* Function Name:
* rtl8367c_setAsicPortIngressBandwidthBypass
* Description:
- * Set ingress bandwidth control bypasss 8899, RMA 01-80-C2-00-00-xx and IGMP
+ * Set ingress bandwidth control bypass 8899, RMA 01-80-C2-00-00-xx and IGMP
* Input:
* enabled - 1: enabled, 0: disabled
* Output:
/* Function Name:
* rtl8367c_getAsicPortIngressBandwidthBypass
* Description:
- * Set ingress bandwidth control bypasss 8899, RMA 01-80-C2-00-00-xx and IGMP
+ * Set ingress bandwidth control bypass 8899, RMA 01-80-C2-00-00-xx and IGMP
* Input:
* pEnabled - 1: enabled, 0: disabled
* Output:
* RT_ERR_OK - Success
* RT_ERR_SMI - SMI access error
* Note:
- * This API can be used to clear ASIC interrupt status and register will be cleared by writting 1.
+ * This API can be used to clear ASIC interrupt status and register will be cleared by writing 1.
* [0]:Link change,
* [1]:Share meter exceed,
- * [2]:Learn number overed,
+ * [2]:Learn number over,
* [3]:Speed Change,
* [4]:Tx special congestion
* [5]:1 second green feature
/*
@func ret_t | rtl8367c_setAsicLedOutputEnable | Set LED output enable
-@parm rtk_uint32 | enabled | enable or disalbe.
+@parm rtk_uint32 | enabled | enable or disable.
@rvalue RT_ERR_OK | Success.
@rvalue RT_ERR_SMI | SMI access error.
@rvalue RT_ERR_INPUT | Invalid input value.
/* Function Name:
* rtl8367c_setAsicLutIpMulticastLookup
* Description:
- * Set Lut IP multicast lookup function
+ * Set LUT IP multicast lookup function
* Input:
* enabled - 1: enabled, 0: disabled
* Output:
/* Function Name:
* rtl8367c_getAsicLutIpMulticastLookup
* Description:
- * Get Lut IP multicast lookup function
+ * Get LUT IP multicast lookup function
* Input:
* pEnabled - 1: enabled, 0: disabled
* Output:
/* Function Name:
* rtl8367c_setAsicLutIpMulticastLookup
* Description:
- * Set Lut IP multicast + VID lookup function
+ * Set LUT IP multicast + VID lookup function
* Input:
* enabled - 1: enabled, 0: disabled
* Output:
/* Function Name:
* rtl8367c_getAsicLutIpMulticastVidLookup
* Description:
- * Get Lut IP multicast lookup function
+ * Get LUT IP multicast lookup function
* Input:
* pEnabled - 1: enabled, 0: disabled
* Output:
/* Function Name:
* rtl8367c_setAsicLutIpLookupMethod
* Description:
- * Set Lut IP lookup hash with DIP or {DIP,SIP} pair
+ * Set LUT IP lookup hash with DIP or {DIP,SIP} pair
* Input:
* type - 1: When DIP can be found in IPMC_GROUP_TABLE, use DIP+SIP Hash, otherwise, use DIP+(SIP=0.0.0.0) Hash.
* 0: When DIP can be found in IPMC_GROUP_TABLE, use DIP+(SIP=0.0.0.0) Hash, otherwise use DIP+SIP Hash.
/* Function Name:
* rtl8367c_getAsicLutIpLookupMethod
* Description:
- * Get Lut IP lookup hash with DIP or {DIP,SIP} pair
+ * Get LUT IP lookup hash with DIP or {DIP,SIP} pair
* Input:
* pType - 1: When DIP can be found in IPMC_GROUP_TABLE, use DIP+SIP Hash, otherwise, use DIP+(SIP=0.0.0.0) Hash.
* 0: When DIP can be found in IPMC_GROUP_TABLE, use DIP+(SIP=0.0.0.0) Hash, otherwise use DIP+SIP Hash.
/* Function Name:
* rtl8367c_setAsicLutAgeTimerSpeed
* Description:
- * Set LUT agging out speed
+ * Set LUT ageing out speed
* Input:
- * timer - Agging out timer 0:Has been aged out
- * speed - Agging out speed 0-fastest 3-slowest
+ * timer - Ageing out timer 0:Has been aged out
+ * speed - Ageing out speed 0-fastest 3-slowest
* Output:
* None
* Return:
/* Function Name:
* rtl8367c_getAsicLutAgeTimerSpeed
* Description:
- * Get LUT agging out speed
+ * Get LUT ageing out speed
* Input:
- * pTimer - Agging out timer 0:Has been aged out
- * pSpeed - Agging out speed 0-fastest 3-slowest
+ * pTimer - Ageing out timer 0:Has been aged out
+ * pSpeed - Ageing out speed 0-fastest 3-slowest
* Output:
* None
* Return:
/* Function Name:
* rtl8367c_setAsicLutCamTbUsage
* Description:
- * Configure Lut CAM table usage
+ * Configure LUT CAM table usage
* Input:
* enabled - L2 CAM table usage 1: enabled, 0: disabled
* Output:
/* Function Name:
* rtl8367c_getAsicLutCamTbUsage
* Description:
- * Get Lut CAM table usage
+ * Get LUT CAM table usage
* Input:
* pEnabled - L2 CAM table usage 1: enabled, 0: disabled
* Output:
* Description:
* Get L2 LUT flush type
* Input:
- * type - 0: dynamice unicast; 1: both dynamic and static unicast entry
+ * type - 0: dynamic unicast; 1: both dynamic and static unicast entry
* Output:
* None
* Return:
* Description:
* Set L2 LUT flush type
* Input:
- * pType - 0: dynamice unicast; 1: both dynamic and static unicast entry
+ * pType - 0: dynamic unicast; 1: both dynamic and static unicast entry
* Output:
* None
* Return:
/* Function Name:
* rtl8367c_setAsicLutIpmcFwdRouterPort
* Description:
- * Set IPMC packet forward to rounter port also or not
+ * Set IPMC packet forward to router port also or not
* Input:
- * enable - 1: Inlcude router port, 0, exclude router port
+ * enable - 1: Include router port, 0, exclude router port
* Output:
* None
* Return:
/* Function Name:
* rtl8367c_getAsicLutIpmcFwdRouterPort
* Description:
- * Get IPMC packet forward to rounter port also or not
+ * Get IPMC packet forward to router port also or not
* Input:
* None
* Output:
- * pEnable - 1: Inlcude router port, 0, exclude router port
+ * pEnable - 1: Include router port, 0, exclude router port
* Return:
* RT_ERR_OK - Success
* RT_ERR_SMI - SMI access error
* Reset global/queue manage or per-port MIB counter
* Input:
* greset - Global reset
- * qmreset - Queue maganement reset
+ * qmreset - Queue management reset
* portmask - Port reset mask
* Output:
* None
* Input:
* port - Physical port number (0~7)
* mibIdx - MIB counter index
- * pCounter - MIB retrived counter
+ * pCounter - MIB retrieved counter
* Output:
* None
* Return:
* RT_ERR_BUSYWAIT_TIMEOUT - MIB is busy at retrieving
* RT_ERR_STAT_CNTR_FAIL - MIB is resetting
* Note:
- * Before MIBs counter retrieving, writting accessing address to ASIC at first and check the MIB
+ * Before MIBs counter retrieving, writing accessing address to ASIC at first and check the MIB
* control register status. If busy bit of MIB control is set, that means MIB counter have been
- * waiting for preparing, then software must wait atfer this busy flag reset by ASIC. This driver
+ * waiting for preparing, then software must wait after this busy flag reset by ASIC. This driver
* did not recycle reading user desired counter. Software must use driver again to get MIB counter
* if return value is not RT_ERR_OK.
*/
/*writing access counter address first*/
/*This address is SRAM address, and SRAM address = MIB register address >> 2*/
- /*then ASIC will prepare 64bits counter wait for being retrived*/
+ /*then ASIC will prepare 64bits counter wait for being retrieved*/
/*Write Mib related address to access control register*/
retVal = rtl8367c_setAsicReg(RTL8367C_REG_MIB_ADDRESS, (mibAddr >> 2));
if(retVal != RT_ERR_OK)
/* Function Name:
* rtl8367c_getAsicMIBsLogCounter
* Description:
- * Get MIBs Loggin counter
+ * Get MIBs Logging counter
* Input:
* index - The index of 32 logging counter (0 ~ 31)
* Output:
* RT_ERR_OK - Success
* RT_ERR_SMI - SMI access error
* Note:
- * Software need to check this control register atfer doing port resetting or global resetting
+ * Software need to check this control register after doing port resetting or global resetting
*/
ret_t rtl8367c_getAsicMIBsControl(rtk_uint32* pMask)
{
/* Function Name:
* rtl8367c_setAsicMIBsLength
* Description:
- * Set MIB length couting mode
+ * Set MIB length counting mode
* Input:
* txLengthMode - 0: tag length doesn't be counted. 1: tag length is counted.
* rxLengthMode - 0: tag length doesn't be counted. 1: tag length is counted.
/* Function Name:
* rtl8367c_setAsicMIBsLength
* Description:
- * Set MIB length couting mode
+ * Set MIB length counting mode
* Input:
* None.
* Output:
* $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $
*
* Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Qos related functions
+ * Feature : QoS related functions
*
*/
/* Function Name:
* rtl8367c_setAsicLeakyBucketParameter
* Description:
- * Set Leaky Bucket Paramters
+ * Set Leaky Bucket Parameters
* Input:
* tick - Tick is used for time slot size unit
* token - Token is used for adding budget in each time slot
/* Function Name:
* rtl8367c_getAsicLeakyBucketParameter
* Description:
- * Get Leaky Bucket Paramters
+ * Get Leaky Bucket Parameters
* Input:
* tick - Tick is used for time slot size unit
* token - Token is used for adding budget in each time slot
* Set per-port APR enable
* Input:
* port - Physical port number (0~7)
- * aprEnable - APR enable seting 1:enable 0:disable
+ * aprEnable - APR enable setting 1:enable 0:disable
* Output:
* None
* Return:
* Get per-port APR enable
* Input:
* port - Physical port number (0~7)
- * aprEnable - APR enable seting 1:enable 0:disable
+ * aprEnable - APR enable setting 1:enable 0:disable
* Output:
* None
* Return:
* RT_ERR_SMI - SMI access error
* Note:
* Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200
- * for Q-in-Q SLAN design. User can set mathced ether type as service provider supported protocol
+ * for Q-in-Q SLAN design. User can set matched ether type as service provider supported protocol
*/
ret_t rtl8367c_setAsicSvlanTpid(rtk_uint32 protocolType)
{
/* Function Name:
* rtl8367c_setAsicSvlanIngressUntag
* Description:
- * Set action received un-Stag frame from unplink port
+ * Set action received un-Stag frame from uplink port
* Input:
* mode - 0:Drop 1:Trap 2:Assign SVLAN
* Output:
/* Function Name:
* rtl8367c_getAsicSvlanIngressUntag
* Description:
- * Get action received un-Stag frame from unplink port
+ * Get action received un-Stag frame from uplink port
* Input:
* pMode - 0:Drop 1:Trap 2:Assign SVLAN
* Output:
/* Function Name:
* rtl8367c_setAsicSvlanIngressUnmatch
* Description:
- * Set action received unmatched Stag frame from unplink port
+ * Set action received unmatched Stag frame from uplink port
* Input:
* mode - 0:Drop 1:Trap 2:Assign SVLAN
* Output:
/* Function Name:
* rtl8367c_getAsicSvlanIngressUnmatch
* Description:
- * Get action received unmatched Stag frame from unplink port
+ * Get action received unmatched Stag frame from uplink port
* Input:
* pMode - 0:Drop 1:Trap 2:Assign SVLAN
* Output:
/* Function Name:
* rtl8367c_setAsicSvlanEgressUnassign
* Description:
- * Set unplink stream without egress SVID action
+ * Set uplink stream without egress SVID action
* Input:
* enabled - 1:Trap egress unassigned frames to CPU, 0: Use SVLAN setup in VS_CPSVIDX as egress SVID
* Output:
/* Function Name:
* rtl8367c_getAsicSvlanEgressUnassign
* Description:
- * Get unplink stream without egress SVID action
+ * Get uplink stream without egress SVID action
* Input:
* pEnabled - 1:Trap egress unassigned frames to CPU, 0: Use SVLAN setup in VS_CPSVIDX as egress SVID
* Output:
* RT_ERR_SMI - SMI access error
* RT_ERR_ENTRY_INDEX - Invalid entry index
* Note:
- * ASIC will check upstream's VID and assign related SVID to mathed packet
+ * ASIC will check upstream's VID and assign related SVID to matched packet
*/
ret_t rtl8367c_setAsicSvlanC2SConf(rtk_uint32 index, rtk_uint32 evid, rtk_uint32 portmask, rtk_uint32 svidx)
{
* $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $
*
* Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Unkown multicast related functions
+ * Feature : Unknown multicast related functions
*
*/
con = 0;
do {
con++;
- _smi_readBit(1, &ACK); /* ACK for writting data [7:0] */
+ _smi_readBit(1, &ACK); /* ACK for writing data [7:0] */
} while ((ACK != 0) && (con < ack_timer));
if (ACK != 0) ret = RT_ERR_FAILED;
con = 0;
do {
con++;
- _smi_readBit(1, &ACK); /* ACK for writting data [15:8] */
+ _smi_readBit(1, &ACK); /* ACK for writing data [15:8] */
} while ((ACK != 0) && (con < ack_timer));
if (ACK != 0) ret = RT_ERR_FAILED;
* port - port id.
* cntr_idx - port counter index.
* Output:
- * pCntr - MIB retrived counter.
+ * pCntr - MIB retrieved counter.
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
/* Function Name:
* rtk_stat_lengthMode_get
* Description:
- * Get Legnth mode.
+ * Get Length mode.
* Input:
* None.
* Output:
* RT_ERR_ENABLE - Invalid IFG parameter
* Note:
*
- * This API can set per-port bypass stomr filter control frame type including RMA and igmp.
+ * This API can set per-port bypass storm filter control frame type including RMA and IGMP.
* The bypass frame type is as following:
* - BYPASS_BRG_GROUP,
* - BYPASS_FD_PAUSE,
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * This API can get per-port bypass stomr filter control frame type including RMA and igmp.
+ * This API can get per-port bypass storm filter control frame type including RMA and IGMP.
* The bypass frame type is as following:
* - BYPASS_BRG_GROUP,
* - BYPASS_FD_PAUSE,
/* Function Name:
* rtk_rate_stormControlExtPortmask_set
* Description:
- * Set externsion storm control port mask
+ * Set extension storm control port mask
* Input:
* pPortmask - port mask
* Output:
/* Function Name:
* rtk_rate_stormControlExtPortmask_get
* Description:
- * Set externsion storm control port mask
+ * Set extension storm control port mask
* Input:
* None
* Output:
/* Function Name:
* rtk_rate_stormControlExtEnable_set
* Description:
- * Set externsion storm control state
+ * Set extension storm control state
* Input:
* stormType - storm group type
- * enable - externsion storm control state
+ * enable - extension storm control state
* Output:
* None
* Return:
/* Function Name:
* rtk_rate_stormControlExtEnable_get
* Description:
- * Get externsion storm control state
+ * Get extension storm control state
* Input:
* stormType - storm group type
* Output:
- * pEnable - externsion storm control state
+ * pEnable - extension storm control state
* Return:
* RT_ERR_OK
* RT_ERR_FAILED
/* Function Name:
* rtk_rate_stormControlExtMeterIdx_set
* Description:
- * Set externsion storm control meter index
+ * Set extension storm control meter index
* Input:
* stormType - storm group type
- * index - externsion storm control state
+ * index - extension storm control state
* Output:
* None
* Return:
/* Function Name:
* rtk_rate_stormControlExtMeterIdx_get
* Description:
- * Get externsion storm control meter index
+ * Get extension storm control meter index
* Input:
* stormType - storm group type
- * pIndex - externsion storm control state
+ * pIndex - extension storm control state
* Output:
* None
* Return:
* RT_ERR_SMI - SMI access error
* Note:
* Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200 for Q-in-Q SLAN design.
- * User can set mathced ether type as service provider supported protocol.
+ * User can set matched ether type as service provider supported protocol.
*/
rtk_api_ret_t rtk_svlan_init(void)
{
* RT_ERR_INPUT - Invalid input parameter.
* Note:
* Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200 for Q-in-Q SLAN design.
- * User can set mathced ether type as service provider supported protocol.
+ * User can set matched ether type as service provider supported protocol.
*/
rtk_api_ret_t rtk_svlan_tpidEntry_set(rtk_svlan_tpid_t svlan_tag_id)
{
* RT_ERR_PORT_MASK - Invalid portmask.
* RT_ERR_SVLAN_TABLE_FULL - SVLAN configuration is full.
* Note:
- * The API can set system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted
- * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped by default setup.
+ * The API can set system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted
+ * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped by default setup.
* - rtk_svlan_memberCfg_t->svid is SVID of SVLAN member configuration.
* - rtk_svlan_memberCfg_t->memberport is member port mask of SVLAN member configuration.
* - rtk_svlan_memberCfg_t->fid is filtering database of SVLAN member configuration.
* RT_ERR_SVLAN_ENTRY_NOT_FOUND - specified svlan entry not found.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted
- * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped.
+ * The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted
+ * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped.
*/
rtk_api_ret_t rtk_svlan_memberPortEntry_get(rtk_vlan_t svid, rtk_svlan_memberCfg_t *pSvlan_cfg)
{
* RT_ERR_SVLAN_ENTRY_NOT_FOUND - specified svlan entry not found.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted
- * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped.
+ * The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted
+ * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped.
*/
rtk_api_ret_t rtk_svlan_memberPortEntry_adv_get(rtk_uint32 idx, rtk_svlan_memberCfg_t *pSvlan_cfg)
{
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* The API can set system C2S configuration. ASIC will check upstream's VID and assign related
- * SVID to mathed packet. There are 128 SVLAN C2S configurations.
+ * SVID to matched packet. There are 128 SVLAN C2S configurations.
*/
rtk_api_ret_t rtk_svlan_c2s_add(rtk_vlan_t vid, rtk_port_t src_port, rtk_vlan_t svid)
{
}
else
{
- /* New svidx, remove src_port and find a new slot to add a new enrty */
+ /* New svidx, remove src_port and find a new slot to add a new entry */
pmsk = pmsk & ~(1 << phyPort);
if(pmsk == 0)
c2s_svidx = 0;
* Note:
* The API can Get action of downstream Un-Stag packet. A SVID assigned
* to the un-stag is also retrieved by this API. The parameter pSvid is
- * only refernced when the action is UNTAG_ASSIGN
+ * only referenced when the action is UNTAG_ASSIGN
*/
rtk_api_ret_t rtk_svlan_untag_action_get(rtk_svlan_untag_action_t *pAction, rtk_vlan_t *pSvid)
{
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* The API can configure action of downstream Un-match packet. A SVID assigned
- * to the un-match is also supported by this API. The parameter od svid is
- * only refernced when the action is set to UNMATCH_ASSIGN
+ * to the un-match is also supported by this API. The parameter of svid is
+ * only referenced when the action is set to UNMATCH_ASSIGN
*/
rtk_api_ret_t rtk_svlan_unmatch_action_set(rtk_svlan_unmatch_action_t action, rtk_vlan_t svid)
{
* Note:
* The API can Get action of downstream Un-match packet. A SVID assigned
* to the un-match is also retrieved by this API. The parameter pSvid is
- * only refernced when the action is UNMATCH_ASSIGN
+ * only referenced when the action is UNMATCH_ASSIGN
*/
rtk_api_ret_t rtk_svlan_unmatch_action_get(rtk_svlan_unmatch_action_t *pAction, rtk_vlan_t *pSvid)
{
* RT_ERR_OUT_OF_RANGE - input out of range.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * The API can set IP mutlicast to SVID configuration. If upstream packet is IPv4 multicast
+ * The API can set IP multicast to SVID configuration. If upstream packet is IPv4 multicast
* packet and DIP is matched MC2S configuration, ASIC will assign egress SVID to the packet.
* There are 32 SVLAN multicast configurations for IP and L2 multicast.
*/
* RT_ERR_SVLAN_VID - Invalid SVLAN VID parameter.
* RT_ERR_OUT_OF_RANGE - input out of range.
* Note:
- * The API can delete IP mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
+ * The API can delete IP multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
*/
rtk_api_ret_t rtk_svlan_ipmc2s_del(ipaddr_t ipmc, ipaddr_t ipmcMsk)
{
* RT_ERR_INPUT - Invalid input parameters.
* RT_ERR_OUT_OF_RANGE - input out of range.
* Note:
- * The API can get IP mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
+ * The API can get IP multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
*/
rtk_api_ret_t rtk_svlan_ipmc2s_get(ipaddr_t ipmc, ipaddr_t ipmcMsk, rtk_vlan_t *pSvid)
{
* RT_ERR_OUT_OF_RANGE - input out of range.
* RT_ERR_INPUT - Invalid input parameters.
* Note:
- * The API can set L2 Mutlicast to SVID configuration. If upstream packet is L2 multicast
+ * The API can set L2 Multicast to SVID configuration. If upstream packet is L2 multicast
* packet and DMAC is matched, ASIC will assign egress SVID to the packet. There are 32
* SVLAN multicast configurations for IP and L2 multicast.
*/
* RT_ERR_SVLAN_VID - Invalid SVLAN VID parameter.
* RT_ERR_OUT_OF_RANGE - input out of range.
* Note:
- * The API can delete Mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
+ * The API can delete Multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
*/
rtk_api_ret_t rtk_svlan_l2mc2s_del(rtk_mac_t mac, rtk_mac_t macMsk)
{
* RT_ERR_INPUT - Invalid input parameters.
* RT_ERR_OUT_OF_RANGE - input out of range.
* Note:
- * The API can get L2 mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
+ * The API can get L2 multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
*/
rtk_api_ret_t rtk_svlan_l2mc2s_get(rtk_mac_t mac, rtk_mac_t macMsk, rtk_vlan_t *pSvid)
{
return retVal;
}
- /* Updata Databse */
+ /* Update Database */
vlan_mbrCfgUsage[0] = MBRCFG_USED_BY_VLAN;
vlan_mbrCfgVid[0] = 1;
* Set port-based filtering database
* Input:
* port - Port id.
- * enable - ebable port-based FID
+ * enable - enable port-based FID
* fid - Specified filtering database.
* Output:
* None
* Input:
* port - Port id.
* Output:
- * pEnable - ebable port-based FID
+ * pEnable - enable port-based FID
* pFid - Specified filtering database.
* Return:
* RT_ERR_OK - OK
set_rtl8367s_rgmii();
}
-// bleow are platform driver
+// below are platform driver
static const struct of_device_id rtk_gsw_match[] = {
{ .compatible = "mediatek,rtk-gsw" },
{},
init_gsw();
- //init default vlan or init swocnfig
+ //init default vlan or init swconfig
if(!of_property_read_string(pdev->dev.of_node,
"mediatek,port_map", &pm)) {