OpenNSL API Guide and Reference Manual
|
Data Structures | |
struct | opennsl_field_action_width_s |
Holds which action to set width for, and the size of width to set. More... | |
struct | opennsl_field_aset_s |
Used to specify the actions that can be taken by the entries in a group. More... | |
struct | opennsl_field_group_status_s |
Field Group Status structure. More... | |
struct | opennsl_field_presel_set_s |
Bitmap of all possible preselection specification IDs. More... | |
struct | opennsl_field_qset_s |
Field qset defines the set of fields used for lookup. More... | |
Files | |
file | field.h |
file | fieldX.h |
Macros | |
#define | OPENNSL_FIELD_ASET_ADD(aset, q) SHR_BITSET(((aset).w), (q)) |
#define | OPENNSL_FIELD_ASET_INIT(aset) memset(&(aset), 0, sizeof(opennsl_field_aset_t)) |
#define | OPENNSL_FIELD_ASET_REMOVE(aset, q) SHR_BITCLR(((aset).w), (q)) |
#define | OPENNSL_FIELD_ASET_TEST(aset, q) SHR_BITGET(((aset).w), (q)) |
#define | OPENNSL_FIELD_COLOR_BLACK 4 |
#define | OPENNSL_FIELD_COLOR_GREEN 1 |
#define | OPENNSL_FIELD_COLOR_PRESERVE 0 |
#define | OPENNSL_FIELD_COLOR_RED 3 |
#define | OPENNSL_FIELD_COLOR_YELLOW 2 |
#define | OPENNSL_FIELD_EXACT_MATCH_MASK (~0) |
Mask parameter value. | |
#define | OPENNSL_FIELD_GROUP_PRIO_ANY -0x7fffffff |
#define | OPENNSL_FIELD_PKT_RES_CONTROL 0x1 |
Ethernet control (8808). | |
#define | OPENNSL_FIELD_PKT_RES_L2BC 0x3 |
L2 broadcast. | |
#define | OPENNSL_FIELD_PKT_RES_L2UC 0x4 |
L2 unicast. | |
#define | OPENNSL_FIELD_PKT_RES_L3MCKNOWN 0x7 |
Known L3 multicast. | |
#define | OPENNSL_FIELD_PKT_RES_L3MCUNKNOWN 0x6 |
Unknown L3 multicast. | |
#define | OPENNSL_FIELD_PKT_RES_L3UCKNOWN 0xa |
Known L3 unicast. | |
#define | OPENNSL_FIELD_PKT_RES_L3UCUNKNOWN 0xb |
Unknown L3 unicast. | |
#define | OPENNSL_FIELD_PKT_RES_UNKNOWN 0x0 |
No resolution. | |
#define | OPENNSL_FIELD_PRESEL_ADD(presel_set, presel_id) SHR_BITSET(((presel_set).w), (presel_id)) |
#define | OPENNSL_FIELD_PRESEL_INIT(presel_set) memset(&(presel_set), 0, sizeof(opennsl_field_presel_set_t)) |
#define | OPENNSL_FIELD_PRESEL_REMOVE(presel_set, presel_id) SHR_BITCLR(((presel_set).w), (presel_id)) |
#define | OPENNSL_FIELD_PRESEL_SEL_MAX 1024 |
Maximum Preselection entries supported. | |
#define | OPENNSL_FIELD_PRESEL_TEST(presel_set, presel_id) SHR_BITGET(((presel_set).w), (presel_id)) |
#define | OPENNSL_FIELD_QSET_ADD(qset, q) SHR_BITSET(((qset).w), (q)) |
#define | OPENNSL_FIELD_QSET_INIT(qset) memset(&(qset), 0, sizeof(opennsl_field_qset_t)) |
#define | OPENNSL_FIELD_QSET_REMOVE(qset, q) SHR_BITCLR(((qset).w), (q)) |
#define | OPENNSL_FIELD_QSET_TEST(qset, q) SHR_BITGET(((qset).w), (q)) |
#define | OPENNSL_FIELD_QUALIFY_MAX (opennslFieldQualifyCount + OPENNSL_FIELD_USER_NUM_UDFS) |
Must be >= opennslFieldQualifyCount. | |
#define | OPENNSL_FIELD_QUALIFY_PRESEL 0x40000000 |
OR with ID when calling opennsl_field_qualify_* functions to indicate ID is a preselector instead of an entry. | |
#define | OPENNSL_FIELD_RANGE_DSTPORT 0x00000002 |
Check dest port range. | |
#define | OPENNSL_FIELD_RANGE_INNER_VLAN 0x00000080 |
Check inner VLAN ID range. | |
#define | OPENNSL_FIELD_RANGE_INVERT 0x00000010 |
Check for match outside specified port range. | |
#define | OPENNSL_FIELD_RANGE_OUTER_VLAN 0x00000040 |
Check outer VLAN ID range. | |
#define | OPENNSL_FIELD_RANGE_PACKET_LENGTH 0x00000100 |
Check packet length range. | |
#define | OPENNSL_FIELD_RANGE_REPLACE 0x00000800 |
Modify configurations of an existing range checker. | |
#define | OPENNSL_FIELD_RANGE_SRCPORT 0x00000001 |
Check source port range. | |
#define | OPENNSL_FIELD_RANGE_TCP 0x00000004 |
Check TCP port range. | |
#define | OPENNSL_FIELD_RANGE_UDP 0x00000008 |
Check UDP port range. | |
#define | OPENNSL_FIELD_TCPCONTROL_ACK 0x10 |
Ack field valid. | |
#define | OPENNSL_FIELD_TCPCONTROL_FIN 0x01 |
No more data. | |
#define | OPENNSL_FIELD_TCPCONTROL_MASK 0x3f |
All non-reserved bits. | |
#define | OPENNSL_FIELD_TCPCONTROL_PSH 0x08 |
Push. | |
#define | OPENNSL_FIELD_TCPCONTROL_R40 0x40 |
Reserved. | |
#define | OPENNSL_FIELD_TCPCONTROL_R80 0x80 |
Reserved. | |
#define | OPENNSL_FIELD_TCPCONTROL_RST 0x04 |
Reset connection. | |
#define | OPENNSL_FIELD_TCPCONTROL_SYN 0x02 |
Sync seq numbers. | |
#define | OPENNSL_FIELD_TCPCONTROL_URG 0x20 |
Urgent field valid. | |
#define | OPENNSL_FIELD_USER_NUM_UDFS 277 |
Typedefs | |
typedef enum opennsl_field_action_e | opennsl_field_action_t |
opennsl_field_action_e | |
typedef struct opennsl_field_action_width_s | opennsl_field_action_width_t |
Holds which action to set width for, and the size of width to set. | |
typedef struct opennsl_field_aset_s | opennsl_field_aset_t |
Used to specify the actions that can be taken by the entries in a group. | |
typedef int | opennsl_field_entry_t |
Opaque handle to a field entry. | |
typedef enum opennsl_field_group_mode_e | opennsl_field_group_mode_t |
Group Modes (single, double or triple wide). | |
typedef struct opennsl_field_group_status_s | opennsl_field_group_status_t |
Field Group Status structure. | |
typedef int | opennsl_field_group_t |
Opaque handle to a field group. | |
typedef int(* | opennsl_field_group_traverse_cb )(int unit, opennsl_field_group_t group, void *user_data) |
typedef enum opennsl_field_IpFrag_e | opennsl_field_IpFrag_t |
Field Qualifier IpFrag (for opennsl_field_qualify_IpFrag). | |
typedef enum opennsl_field_IpProtocolCommon_e | opennsl_field_IpProtocolCommon_t |
Field Qualifier IpProtocolCommon (for opennsl_field_qualify_IpProtocolCommon). | |
typedef enum opennsl_field_IpType_e | opennsl_field_IpType_t |
Field Qualifier IpType (for opennsl_field_qualify_IpType). | |
typedef struct opennsl_field_presel_set_s | opennsl_field_presel_set_t |
Bitmap of all possible preselection specification IDs. | |
typedef int | opennsl_field_presel_t |
Opaque handle to a field presel. | |
typedef struct opennsl_field_qset_s | opennsl_field_qset_t |
Field qset defines the set of fields used for lookup. | |
typedef enum opennsl_field_qualify_e | opennsl_field_qualify_t |
Field Qualifiers. | |
typedef uint32 | opennsl_field_range_t |
Opaque handle to a field range. | |
typedef enum opennsl_field_stage_e | opennsl_field_stage_t |
Field Stage Type. | |
#define OPENNSL_FIELD_ASET_ADD | ( | aset, | |
q | |||
) | SHR_BITSET(((aset).w), (q)) |
Definition at line 363 of file fieldX.h.
Referenced by example_create_policy(), and example_fp_redirect().
#define OPENNSL_FIELD_ASET_INIT | ( | aset | ) | memset(&(aset), 0, sizeof(opennsl_field_aset_t)) |
Definition at line 361 of file fieldX.h.
Referenced by example_create_policy(), and example_fp_redirect().
#define OPENNSL_FIELD_ASET_REMOVE | ( | aset, | |
q | |||
) | SHR_BITCLR(((aset).w), (q)) |
#define OPENNSL_FIELD_ASET_TEST | ( | aset, | |
q | |||
) | SHR_BITGET(((aset).w), (q)) |
#define OPENNSL_FIELD_EXACT_MATCH_MASK (~0) |
#define OPENNSL_FIELD_GROUP_PRIO_ANY -0x7fffffff |
Definition at line 240 of file fieldX.h.
Referenced by example_create_policer(), example_fp_ip_block(), and example_fp_redirect().
#define OPENNSL_FIELD_PKT_RES_CONTROL 0x1 |
#define OPENNSL_FIELD_PKT_RES_L3MCKNOWN 0x7 |
#define OPENNSL_FIELD_PKT_RES_L3MCUNKNOWN 0x6 |
#define OPENNSL_FIELD_PKT_RES_L3UCKNOWN 0xa |
#define OPENNSL_FIELD_PKT_RES_L3UCUNKNOWN 0xb |
#define OPENNSL_FIELD_PRESEL_ADD | ( | presel_set, | |
presel_id | |||
) | SHR_BITSET(((presel_set).w), (presel_id)) |
#define OPENNSL_FIELD_PRESEL_INIT | ( | presel_set | ) | memset(&(presel_set), 0, sizeof(opennsl_field_presel_set_t)) |
#define OPENNSL_FIELD_PRESEL_REMOVE | ( | presel_set, | |
presel_id | |||
) | SHR_BITCLR(((presel_set).w), (presel_id)) |
#define OPENNSL_FIELD_PRESEL_SEL_MAX 1024 |
#define OPENNSL_FIELD_PRESEL_TEST | ( | presel_set, | |
presel_id | |||
) | SHR_BITGET(((presel_set).w), (presel_id)) |
#define OPENNSL_FIELD_QSET_ADD | ( | qset, | |
q | |||
) | SHR_BITSET(((qset).w), (q)) |
Definition at line 237 of file fieldX.h.
Referenced by example_create_policer(), example_create_policy(), example_fp_ip_block(), and example_fp_redirect().
#define OPENNSL_FIELD_QSET_INIT | ( | qset | ) | memset(&(qset), 0, sizeof(opennsl_field_qset_t)) |
Definition at line 235 of file fieldX.h.
Referenced by example_create_policer(), example_create_policy(), example_fp_ip_block(), and example_fp_redirect().
#define OPENNSL_FIELD_QSET_REMOVE | ( | qset, | |
q | |||
) | SHR_BITCLR(((qset).w), (q)) |
#define OPENNSL_FIELD_QSET_TEST | ( | qset, | |
q | |||
) | SHR_BITGET(((qset).w), (q)) |
#define OPENNSL_FIELD_QUALIFY_MAX (opennslFieldQualifyCount + OPENNSL_FIELD_USER_NUM_UDFS) |
#define OPENNSL_FIELD_QUALIFY_PRESEL 0x40000000 |
#define OPENNSL_FIELD_RANGE_DSTPORT 0x00000002 |
#define OPENNSL_FIELD_RANGE_INNER_VLAN 0x00000080 |
#define OPENNSL_FIELD_RANGE_INVERT 0x00000010 |
#define OPENNSL_FIELD_RANGE_OUTER_VLAN 0x00000040 |
#define OPENNSL_FIELD_RANGE_PACKET_LENGTH 0x00000100 |
#define OPENNSL_FIELD_RANGE_REPLACE 0x00000800 |
#define OPENNSL_FIELD_RANGE_SRCPORT 0x00000001 |
#define OPENNSL_FIELD_RANGE_TCP 0x00000004 |
#define OPENNSL_FIELD_RANGE_UDP 0x00000008 |
#define OPENNSL_FIELD_TCPCONTROL_MASK 0x3f |
#define OPENNSL_FIELD_TCPCONTROL_URG 0x20 |
typedef enum opennsl_field_action_e opennsl_field_action_t |
opennsl_field_action_e
typedef struct opennsl_field_action_width_s opennsl_field_action_width_t |
Holds which action to set width for, and the size of width to set.
typedef struct opennsl_field_aset_s opennsl_field_aset_t |
Used to specify the actions that can be taken by the entries in a group.
typedef int opennsl_field_entry_t |
typedef enum opennsl_field_group_mode_e opennsl_field_group_mode_t |
Group Modes (single, double or triple wide).
typedef struct opennsl_field_group_status_s opennsl_field_group_status_t |
Field Group Status structure.
typedef int opennsl_field_group_t |
typedef int(* opennsl_field_group_traverse_cb)(int unit, opennsl_field_group_t group, void *user_data) |
typedef enum opennsl_field_IpFrag_e opennsl_field_IpFrag_t |
Field Qualifier IpFrag (for opennsl_field_qualify_IpFrag).
Field Qualifier IpProtocolCommon (for opennsl_field_qualify_IpProtocolCommon).
typedef enum opennsl_field_IpType_e opennsl_field_IpType_t |
Field Qualifier IpType (for opennsl_field_qualify_IpType).
typedef struct opennsl_field_presel_set_s opennsl_field_presel_set_t |
Bitmap of all possible preselection specification IDs.
typedef int opennsl_field_presel_t |
typedef struct opennsl_field_qset_s opennsl_field_qset_t |
Field qset defines the set of fields used for lookup.
typedef enum opennsl_field_qualify_e opennsl_field_qualify_t |
Field Qualifiers.
Field qualifiers are collected into qualifier sets (qsets), which are used to allocate field groups.
Note: These are in order of their bit width. Do not change the order or the field select code algorithm for wide-mode will get slower.
typedef uint32 opennsl_field_range_t |
typedef enum opennsl_field_stage_e opennsl_field_stage_t |
Field Stage Type.
Selects which pipeline stage an entry applies to.
opennsl_field_action_e
Field Qualifier IpFrag (for opennsl_field_qualify_IpFrag).
Field Qualifier IpType (for opennsl_field_qualify_IpType).
Field Qualifiers.
Field qualifiers are collected into qualifier sets (qsets), which are used to allocate field groups.
Note: These are in order of their bit width. Do not change the order or the field select code algorithm for wide-mode will get slower.
Field Stage Type.
Selects which pipeline stage an entry applies to.
int opennsl_field_action_add | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_action_t | action, | ||
uint32 | param0, | ||
uint32 | param1 | ||
) |
Add an action to a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
action | [IN] Field action value |
param0 | [IN] Action-dependent value; 0 if not used |
param1 | [IN] Action-dependent value; 0 if not used |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_MEMORY | Memory allocation failure |
OPENNSL_E_RESOURCE | Counter not previously created for entry |
OPENNSL_E_NOT_FOUND | Entry ID not found |
OPENNSL_E_EXISTS | Action already added |
OPENNSL_E_XXX | Other error code |
Referenced by example_create_policer(), example_fp_ip_block(), and example_fp_redirect().
int opennsl_field_action_delete | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_action_t | action, | ||
uint32 | param0, | ||
uint32 | param1 | ||
) |
Delete an action from a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
action | [IN] Field action value |
param0 | [IN] Action parameter 0. |
param1 | [IN] Action parameter 1. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID or Action not found |
OPENNSL_E_PARAM | Invalid Action value |
OPENNSL_E_XXX | Other error code |
int opennsl_field_action_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_action_t | action, | ||
uint32 * | param0, | ||
uint32 * | param1 | ||
) |
Retrieve the parameters for an action previously added to a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
action | [IN] Field action value |
param0 | [OUT] Action-dependent value |
param1 | [OUT] Action-dependent value |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID or Action not found |
OPENNSL_E_PARAM | *paramX points to NULL |
OPENNSL_E_XXX | Other error code |
int opennsl_field_action_mac_add | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_action_t | action, | ||
opennsl_mac_t | mac | ||
) |
Add an action to a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
action | [IN] Field action value |
mac | [IN] MAC address for actions involving src/dst mac. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_MEMORY | Memory allocation failure |
OPENNSL_E_RESOURCE | Counter not previously created for entry |
OPENNSL_E_NOT_FOUND | Entry ID not found |
OPENNSL_E_EXISTS | Action already added |
OPENNSL_E_XXX | Other error code |
int opennsl_field_action_mac_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_action_t | action, | ||
opennsl_mac_t * | mac | ||
) |
Retrieve the parameters for an action previously added to a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
action | [IN] Field action value |
mac | [OUT] MAC address for actions involving src/dst mac. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID or Action not found |
OPENNSL_E_PARAM | *paramX points to NULL |
OPENNSL_E_XXX | Other error code |
int opennsl_field_action_ports_add | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_action_t | action, | ||
opennsl_pbmp_t | pbmp | ||
) |
Add an action to a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
action | [IN] Field action value |
pbmp | [IN] pbmp for actions involving port bitmap |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_MEMORY | Memory allocation failure |
OPENNSL_E_RESOURCE | Counter not previously created for entry |
OPENNSL_E_NOT_FOUND | Entry ID not found |
OPENNSL_E_EXISTS | Action already added |
OPENNSL_E_XXX | Other error code |
int opennsl_field_action_ports_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_action_t | action, | ||
opennsl_pbmp_t * | pbmp | ||
) |
Retrieve the parameters for an action previously added to a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
action | [IN] Field action value |
pbmp | [OUT] pbmp for actions involving port bitmap |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID or Action not found |
OPENNSL_E_PARAM | *paramX points to NULL |
OPENNSL_E_XXX | Other error code |
int opennsl_field_action_remove | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_action_t | action | ||
) |
Remove an action from a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
action | [IN] Field action value |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID or Action not found |
OPENNSL_E_PARAM | Invalid Action value |
OPENNSL_E_XXX | Other error code |
int opennsl_field_action_remove_all | ( | int | unit, |
opennsl_field_entry_t | entry | ||
) |
Remove all actions from a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID not found |
int opennsl_field_detach | ( | int | unit | ) |
De-initialize field software subsystem.
unit | [IN] Unit number. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_XXX | Other errors |
int opennsl_field_entry_copy | ( | int | unit, |
opennsl_field_entry_t | src_entry, | ||
opennsl_field_entry_t * | dst_entry | ||
) |
Create a copy of an existing field entry.
unit | [IN] Unit number. |
src_entry | [IN] Field entry ID to copy from |
dst_entry | [OUT] (for _copy_id) New entry copied from src_entry |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Source entry ID not found |
OPENNSL_E_EXISTS | Requested entry ID already exists |
OPENNSL_E_XXX | Other error code |
int opennsl_field_entry_create | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_entry_t * | entry | ||
) |
Create a blank field entry.
unit | [IN] Unit number. |
group | [IN] Field group ID |
entry | [OUT] (for _create_id) Field entry ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Group ID not found in unit |
OPENNSL_E_EXISTS | Requested entry ID already exists |
OPENNSL_E_BADID | Requested entry ID out-of-range |
OPENNSL_E_PARAM | *entry points to NULL |
OPENNSL_E_MEMORY | Memory allocation failure |
OPENNSL_E_RESOURCE | No unused entries available |
Referenced by example_create_policer(), example_create_policy(), and example_fp_ip_block().
int opennsl_field_entry_create_id | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_entry_t | entry | ||
) |
Create a blank field entry.
unit | [IN] Unit number. |
group | [IN] Field group ID |
entry | [IN] (for _create_id) Field entry ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Group ID not found in unit |
OPENNSL_E_EXISTS | Requested entry ID already exists |
OPENNSL_E_BADID | Requested entry ID out-of-range |
OPENNSL_E_PARAM | *entry points to NULL |
OPENNSL_E_MEMORY | Memory allocation failure |
OPENNSL_E_RESOURCE | No unused entries available |
Referenced by example_fp_redirect().
int opennsl_field_entry_destroy | ( | int | unit, |
opennsl_field_entry_t | entry | ||
) |
Destroy a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID not found in unit |
OPENNSL_E_XXX | Other error code |
Referenced by main().
int opennsl_field_entry_destroy_all | ( | int | unit | ) |
Destroy all field entries.
unit | [IN] Unit number. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_XXX | Other Error code |
int opennsl_field_entry_install | ( | int | unit, |
opennsl_field_entry_t | entry | ||
) |
Install a field entry into the hardware tables.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID not found |
OPENNSL_E_XXX | Other error code |
Referenced by example_create_policer(), and example_fp_ip_block().
int opennsl_field_entry_multi_get | ( | int | unit, |
opennsl_field_group_t | group, | ||
int | entry_size, | ||
opennsl_field_entry_t * | entry_array, | ||
int * | entry_count | ||
) |
Get an array of entry IDs in use in a group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
entry_size | [IN] The maximum number of entry IDs to return. If 0, the number of entries is returned |
entry_array | [OUT] A pointer to a memory buffer to hold the array of IDs |
entry_count | [OUT] A pointer to store the number of entries returned or, if entry_size is 0, the number of entries available |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Group ID not found in unit |
OPENNSL_E_MEMORY | Memory allocation failure |
int opennsl_field_entry_policer_attach | ( | int | unit, |
opennsl_field_entry_t | entry_id, | ||
int | level, | ||
opennsl_policer_t | policer_id | ||
) |
Attach a policer to a field entry.
unit | [IN] Unit number. |
entry_id | [IN] Field entry ID. |
level | [IN] Policer level. |
policer_id | [IN] Policer ID. |
OPENNSL_E_XXX |
Referenced by example_create_policer(), and example_create_policy().
int opennsl_field_entry_policer_detach | ( | int | unit, |
opennsl_field_entry_t | entry_id, | ||
int | level | ||
) |
Detach a policer from a field entry.
When the API is called, the policer is marked as detached but it is not completely detached from the entry. This is because, the policer and meter entries are updated in the hardware during entry re-install. So, this API should always be followed by entry remove or entry re-install to completely detach the policer from the entry.
unit | [IN] Unit number. |
entry_id | [IN] Field entry ID. |
level | [IN] Policer level. |
OPENNSL_E_XXX |
int opennsl_field_entry_policer_get | ( | int | unit, |
opennsl_field_entry_t | entry_id, | ||
int | level, | ||
opennsl_policer_t * | policer_id | ||
) |
Get the policer(s) attached to a field entry.
unit | [IN] Unit number. |
entry_id | [IN] Field entry ID. |
level | [IN] Policer level. |
policer_id | [OUT] Policer ID. |
OPENNSL_E_XXX |
int opennsl_field_entry_prio_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
int * | prio | ||
) |
Get/Set the priority for an entry within a group.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
prio | [OUT] (for _set) Entry priority |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit/Field stage not initialized |
OPENNSL_E_NOT_FOUND | |
\retval | Group ID/Field Entry ID/Field stage not found |
in | unit |
\retval | Policer ID attached to entry not found. |
\retval | Stat ID attached to entry not found. |
\retval | OPENNSL_E_PARAM |
\retval | *entry points to NULL (opennsl_field_entry_prio_get) |
\retval | Preliminary resource check before actual entry |
move | operation detects that no free entry is |
available | in target slice. |
\retval | In device CAP stage that do not support global meter |
pools | and global counter pools, entry move requires |
a | Stat, Policer move in hardware and preliminary |
resource | check before actual entry move operation |
detects | that no free counters, meters are available |
in | target slice. |
\retval | OPENNSL_E_INTERNAL |
\retval | Invalid hardware resource allocation by other |
Field | API's (could be wrong slice id, policer slice |
index),although | this should not happen. |
\retval | Invalid Field entry id. |
\retval | Invalid Policer slice index. |
\retval | Invalid hardware meter/counter index. |
\retval | OPENNSL_E_CONFIG |
\retval | If change in priority of field entry requires |
movement | of the entry and there are no free |
entries | in any of the slices belonging to |
this | group, |
\retval | Invalid Flex Stat mode in Lookup Stage |
\retval | OPENNSL_E_RESOURCE This error code is returned when Stat, Policer |
attached | to an entry must be moved in hardware |
during | entry move operation as device CAP stage |
does | not support global counters and global |
meters | and no meters, counters are available |
in | the target slice while actual entry move |
happens. | |
OPENNSL_E_UNAVAIL | Unknown Field external stage (opennsl_field_entry_prio_set). |
int opennsl_field_entry_prio_set | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
int | prio | ||
) |
Get/Set the priority for an entry within a group.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
prio | [IN] (for _set) Entry priority |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit/Field stage not initialized |
OPENNSL_E_NOT_FOUND | |
\retval | Group ID/Field Entry ID/Field stage not found |
in | unit |
\retval | Policer ID attached to entry not found. |
\retval | Stat ID attached to entry not found. |
\retval | OPENNSL_E_PARAM |
\retval | *entry points to NULL (opennsl_field_entry_prio_get) |
\retval | Preliminary resource check before actual entry |
move | operation detects that no free entry is |
available | in target slice. |
\retval | In device CAP stage that do not support global meter |
pools | and global counter pools, entry move requires |
a | Stat, Policer move in hardware and preliminary |
resource | check before actual entry move operation |
detects | that no free counters, meters are available |
in | target slice. |
\retval | OPENNSL_E_INTERNAL |
\retval | Invalid hardware resource allocation by other |
Field | API's (could be wrong slice id, policer slice |
index),although | this should not happen. |
\retval | Invalid Field entry id. |
\retval | Invalid Policer slice index. |
\retval | Invalid hardware meter/counter index. |
\retval | OPENNSL_E_CONFIG |
\retval | If change in priority of field entry requires |
movement | of the entry and there are no free |
entries | in any of the slices belonging to |
this | group, |
\retval | Invalid Flex Stat mode in Lookup Stage |
\retval | OPENNSL_E_RESOURCE This error code is returned when Stat, Policer |
attached | to an entry must be moved in hardware |
during | entry move operation as device CAP stage |
does | not support global counters and global |
meters | and no meters, counters are available |
in | the target slice while actual entry move |
happens. | |
OPENNSL_E_UNAVAIL | Unknown Field external stage (opennsl_field_entry_prio_set). |
int opennsl_field_entry_reinstall | ( | int | unit, |
opennsl_field_entry_t | entry | ||
) |
Re-install a field entry into the hardware tables.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID not found |
OPENNSL_E_XXX | Other error code |
int opennsl_field_entry_remove | ( | int | unit, |
opennsl_field_entry_t | entry | ||
) |
Remove a field entry from the hardware tables.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Entry ID not found |
OPENNSL_E_XXX | Other error code |
int opennsl_field_entry_stat_attach | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
int | stat_id | ||
) |
Attach statistics entity to Field Processor entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID. |
stat_id | [IN] Statistics entity ID. |
OPENNSL_E_XXX |
Referenced by example_create_policer(), and example_create_policy().
int opennsl_field_entry_stat_detach | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
int | stat_id | ||
) |
Detach statistics entity from Field Processor entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID. |
stat_id | [IN] Statistics entity ID. |
OPENNSL_E_XXX |
Referenced by main().
int opennsl_field_entry_stat_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
int * | stat_id | ||
) |
Get statistics entity attached to Field Processor entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID. |
stat_id | [OUT] Statistics entity ID. |
OPENNSL_E_XXX |
Referenced by main().
int opennsl_field_group_action_get | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_aset_t * | aset | ||
) |
Change or retrieve the actions for a field group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
aset | [OUT] (for _set) Field action set |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_PARAM | qset points to NULL |
int opennsl_field_group_action_set | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_aset_t | aset | ||
) |
Change or retrieve the actions for a field group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
aset | [IN] (for _set) Field action set |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_PARAM | qset points to NULL |
Referenced by example_create_policy(), and example_fp_redirect().
int opennsl_field_group_create | ( | int | unit, |
opennsl_field_qset_t | qset, | ||
int | pri, | ||
opennsl_field_group_t * | group | ||
) |
Create a field group.
unit | [IN] Unit number. |
qset | [IN] Field qualifier set |
pri | [IN] Priority within allowable range or OPENNSL_FIELD_GROUP_PRIO_ANY to automatically assign a priority. Higher numerical value for priority has better priority for conflict resolution when there is a search hit on multiple slices. See =fp_groups for priority value restrictions. |
group | [OUT] (for _create_id and _create_mode_id) Field group ID |
OPENNSL_E_NONE | Successful creation of group |
OPENNSL_E_INIT | Field module not initialized on unit |
OPENNSL_E_RESOURCE | Hardware slice/port unavailable or no select codes can satisfy Qset. |
OPENNSL_E_CONFIG | If device does not support virtual group priority feature, then this error code is returned when specified priority value is already assigned to another group. |
OPENNSL_E_PARAM | Priority out of range |
OPENNSL_E_EXISTS | Requested group ID already exists |
OPENNSL_E_MEMORY | Allocation failure |
OPENNSL_E_XXX | Other error code |
Referenced by example_create_policer(), and example_fp_ip_block().
int opennsl_field_group_create_id | ( | int | unit, |
opennsl_field_qset_t | qset, | ||
int | pri, | ||
opennsl_field_group_t | group | ||
) |
Create a field group.
unit | [IN] Unit number. |
qset | [IN] Field qualifier set |
pri | [IN] Priority within allowable range or OPENNSL_FIELD_GROUP_PRIO_ANY to automatically assign a priority. Higher numerical value for priority has better priority for conflict resolution when there is a search hit on multiple slices. See =fp_groups for priority value restrictions. |
group | [IN] (for _create_id and _create_mode_id) Field group ID |
OPENNSL_E_NONE | Successful creation of group |
OPENNSL_E_INIT | Field module not initialized on unit |
OPENNSL_E_RESOURCE | Hardware slice/port unavailable or no select codes can satisfy Qset. |
OPENNSL_E_CONFIG | If device does not support virtual group priority feature, then this error code is returned when specified priority value is already assigned to another group. |
OPENNSL_E_PARAM | Priority out of range |
OPENNSL_E_EXISTS | Requested group ID already exists |
OPENNSL_E_MEMORY | Allocation failure |
OPENNSL_E_XXX | Other error code |
Referenced by example_fp_redirect().
int opennsl_field_group_create_mode | ( | int | unit, |
opennsl_field_qset_t | qset, | ||
int | pri, | ||
opennsl_field_group_mode_t | mode, | ||
opennsl_field_group_t * | group | ||
) |
Create a field group.
unit | [IN] Unit number. |
qset | [IN] Field qualifier set |
pri | [IN] Priority within allowable range or OPENNSL_FIELD_GROUP_PRIO_ANY to automatically assign a priority. Higher numerical value for priority has better priority for conflict resolution when there is a search hit on multiple slices. See =fp_groups for priority value restrictions. |
mode | [IN] See =fp_group_mode for a list of modes. |
group | [OUT] (for _create_id and _create_mode_id) Field group ID |
OPENNSL_E_NONE | Successful creation of group |
OPENNSL_E_INIT | Field module not initialized on unit |
OPENNSL_E_RESOURCE | Hardware slice/port unavailable or no select codes can satisfy Qset. |
OPENNSL_E_CONFIG | If device does not support virtual group priority feature, then this error code is returned when specified priority value is already assigned to another group. |
OPENNSL_E_PARAM | Priority out of range |
OPENNSL_E_EXISTS | Requested group ID already exists |
OPENNSL_E_MEMORY | Allocation failure |
OPENNSL_E_XXX | Other error code |
int opennsl_field_group_create_mode_id | ( | int | unit, |
opennsl_field_qset_t | qset, | ||
int | pri, | ||
opennsl_field_group_mode_t | mode, | ||
opennsl_field_group_t | group | ||
) |
Create a field group.
unit | [IN] Unit number. |
qset | [IN] Field qualifier set |
pri | [IN] Priority within allowable range or OPENNSL_FIELD_GROUP_PRIO_ANY to automatically assign a priority. Higher numerical value for priority has better priority for conflict resolution when there is a search hit on multiple slices. See =fp_groups for priority value restrictions. |
mode | [IN] See =fp_group_mode for a list of modes. |
group | [IN] (for _create_id and _create_mode_id) Field group ID |
OPENNSL_E_NONE | Successful creation of group |
OPENNSL_E_INIT | Field module not initialized on unit |
OPENNSL_E_RESOURCE | Hardware slice/port unavailable or no select codes can satisfy Qset. |
OPENNSL_E_CONFIG | If device does not support virtual group priority feature, then this error code is returned when specified priority value is already assigned to another group. |
OPENNSL_E_PARAM | Priority out of range |
OPENNSL_E_EXISTS | Requested group ID already exists |
OPENNSL_E_MEMORY | Allocation failure |
OPENNSL_E_XXX | Other error code |
Referenced by example_create_policy().
int opennsl_field_group_destroy | ( | int | unit, |
opennsl_field_group_t | group | ||
) |
Deallocates a field group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Group ID not found in unit |
OPENNSL_E_BUSY | Entries still exist in the group |
Referenced by example_fp_redirect(), and main().
int opennsl_field_group_enable_get | ( | int | unit, |
opennsl_field_group_t | group, | ||
int * | enable | ||
) |
Get or set the group enable state.
unit | [IN] Unit number. |
group | [IN] Field group ID |
enable | [OUT] (for _set) Packet lookup Enable(1) or Disable (0) state of group |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Field not initialized on unit |
OPENNSL_E_NOT_FOUND | Group ID not found for this unit |
OPENNSL_E_UNAVAIL | OPENNSL device does not have enable/disable feature |
int opennsl_field_group_enable_set | ( | int | unit, |
opennsl_field_group_t | group, | ||
int | enable | ||
) |
Get or set the group enable state.
unit | [IN] Unit number. |
group | [IN] Field group ID |
enable | [IN] (for _set) Packet lookup Enable(1) or Disable (0) state of group |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | Field not initialized on unit |
OPENNSL_E_NOT_FOUND | Group ID not found for this unit |
OPENNSL_E_UNAVAIL | OPENNSL device does not have enable/disable feature |
int opennsl_field_group_get | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_qset_t * | qset | ||
) |
Change or retrieve the qualifiers for a field group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
qset | [OUT] (for _set) Field qualifier set |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_PARAM | qset points to NULL |
int opennsl_field_group_install | ( | int | unit, |
opennsl_field_group_t | group | ||
) |
Install all entries of a field group into the hardware tables.
unit | [IN] Unit number. |
group | [IN] Field group ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Group ID is not in use |
OPENNSL_E_XXX | Other error code |
Referenced by example_create_policy(), and example_fp_redirect().
int opennsl_field_group_presel_get | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_presel_set_t * | presel | ||
) |
Get the set of preselectors associated with a Field group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
presel | [OUT] A pointer to a presel_set structure |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Group ID not found in unit |
OPENNSL_E_MEMORY | Memory allocation failure |
int opennsl_field_group_presel_set | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_presel_set_t * | presel | ||
) |
Associate a set of preselectors with a Field group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
presel | [IN] A pointer to a presel_set structure |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Group ID not found in unit |
OPENNSL_E_PARAM | *presel_set points to NULL (opennsl_field_presel_set_t) |
int opennsl_field_group_priority_get | ( | int | unit, |
opennsl_field_group_t | group, | ||
int * | priority | ||
) |
Extract priority for a group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
priority | [OUT] Field group priority |
OPENNSL_E_XXX |
int opennsl_field_group_priority_set | ( | int | unit, |
opennsl_field_group_t | group, | ||
int | priority | ||
) |
Assign relative priority to a group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
priority | [IN] Field group priority |
OPENNSL_E_XXX |
int opennsl_field_group_set | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_qset_t | qset | ||
) |
Change or retrieve the qualifiers for a field group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
qset | [IN] (for _set) Field qualifier set |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_PARAM | qset points to NULL |
int opennsl_field_group_status_get | ( | int | unit, |
opennsl_field_group_t | group, | ||
opennsl_field_group_status_t * | status | ||
) |
Retrieve status of a specified field group.
unit | [IN] Unit number. |
group | [IN] Field group ID |
status | [OUT] Status for field group |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Group ID not found in unit |
OPENNSL_E_PARAM | status points to NULL |
int opennsl_field_group_traverse | ( | int | unit, |
opennsl_field_group_traverse_cb | callback, | ||
void * | user_data | ||
) |
Traverse all the fp groups on the device, calling a specified callback for each valid group.
unit | [IN] Unit number. |
callback | [IN] User provided callback. |
user_data | [IN] User callback cookie. |
OPENNSL_E_XXX |
int opennsl_field_init | ( | int | unit | ) |
Initialize field software subsystem.
unit | [IN] Unit number. |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_UNAVAIL | Feature unavailable on this device |
OPENNSL_E_MEMORY | Memory allocation failure |
OPENNSL_E_XXX | Other errors |
int opennsl_field_presel_create | ( | int | unit, |
opennsl_field_presel_t * | presel_id | ||
) |
Create a preselection specification.
unit | [IN] Unit number. |
presel_id | [OUT] presel ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_PARAM | *entry points to NULL |
OPENNSL_E_MEMORY | Memory allocation failure |
OPENNSL_E_RESOURCE | No unused entries available |
int opennsl_field_presel_create_id | ( | int | unit, |
opennsl_field_presel_t | presel_id | ||
) |
Create a preselection specification using a specific ID.
unit | [IN] Unit number. |
presel_id | [IN] presel ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_EXISTS | Requested presel ID already exists |
OPENNSL_E_PARAM | *entry points to NULL |
OPENNSL_E_MEMORY | Memory allocation failure |
OPENNSL_E_RESOURCE | No unused entries available |
int opennsl_field_presel_destroy | ( | int | unit, |
opennsl_field_presel_t | presel_id | ||
) |
Destroy a preselection specification.
unit | [IN] Unit number. |
presel_id | [IN] |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL unit not initialized |
OPENNSL_E_NOT_FOUND | Presel ID not found in unit |
OPENNSL_E_XXX | Other error code |
int opennsl_field_qualifier_delete | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_qualify_t | qual_id | ||
) |
Remove match criteria from field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
qual_id | [IN] Field qualifier ID |
OPENNSL_E_XXX |
int opennsl_field_qualify_Color | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | color | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
color | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Color_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | color | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
color | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_CpuQueue | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_CpuQueue_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DSCP | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DSCP_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstClassField | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 | data, | ||
uint32 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstClassField_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 * | data, | ||
uint32 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstIp | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_ip_t | data, | ||
opennsl_ip_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstIp6 | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_ip6_t | data, | ||
opennsl_ip6_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstIp6_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_ip6_t * | data, | ||
opennsl_ip6_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstIp_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_ip_t * | data, | ||
opennsl_ip_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstIpLocal | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstIpLocal_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstL3Egress | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_if_t | if_id | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
if_id | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstL3Egress_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_if_t * | if_id | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
if_id | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstMac | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_mac_t | data, | ||
opennsl_mac_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
Referenced by example_create_policy(), and example_fp_redirect().
int opennsl_field_qualify_DstMac_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_mac_t * | data, | ||
opennsl_mac_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstPort | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_module_t | data_modid, | ||
opennsl_module_t | mask_modid, | ||
opennsl_port_t | data_port, | ||
opennsl_port_t | mask_port | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data_modid | [IN] |
mask_modid | [IN] |
data_port | [IN] |
mask_port | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstPort_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_module_t * | data_modid, | ||
opennsl_module_t * | mask_modid, | ||
opennsl_port_t * | data_port, | ||
opennsl_port_t * | mask_port | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data_modid | [OUT] |
mask_modid | [OUT] |
data_port | [OUT] |
mask_port | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstTrunk | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_trunk_t | data, | ||
opennsl_trunk_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_DstTrunk_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_trunk_t * | data, | ||
opennsl_trunk_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_EtherType | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint16 | data, | ||
uint16 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
Referenced by example_fp_ip_block().
int opennsl_field_qualify_EtherType_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint16 * | data, | ||
uint16 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IcmpTypeCode | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint16 | data, | ||
uint16 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IcmpTypeCode_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint16 * | data, | ||
uint16 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IngressClassField | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 | data, | ||
uint32 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IngressClassField_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 * | data, | ||
uint32 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_InnerVlanId | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_vlan_t | data, | ||
opennsl_vlan_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_InPort | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_port_t | data, | ||
opennsl_port_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
Referenced by example_create_policer().
int opennsl_field_qualify_InPort_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_port_t * | data, | ||
opennsl_port_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_InPorts | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_pbmp_t | data, | ||
opennsl_pbmp_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_InPorts_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_pbmp_t * | data, | ||
opennsl_pbmp_t * | mask | ||
) |
Get InPorts qualification match criteria from a field entry.
unit | [IN] Unit number. |
entry | [IN] Field entry ID |
data | [OUT] Reference to retrieve the Data associated |
mask | [OUT] Reference to retrieve the Mask associated |
OPENNSL_E_xxx |
int opennsl_field_qualify_InterfaceClassPort | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 | data, | ||
uint32 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_InterfaceClassPort_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 * | data, | ||
uint32 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_InterfaceClassProcessingPort | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint64 | data, | ||
uint64 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_InterfaceClassProcessingPort_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint64 * | data, | ||
uint64 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Ip6HopLimit | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Ip6HopLimit_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Ip6NextHeader | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Ip6NextHeader_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IpFrag | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_IpFrag_t | frag_info | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
frag_info | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IpFrag_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_IpFrag_t * | frag_info | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
frag_info | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IpProtocol | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IpProtocol_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IpProtocolCommon | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_IpProtocolCommon_t | protocol | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
protocol | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IpProtocolCommon_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_IpProtocolCommon_t * | protocol | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
protocol | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IpType | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_IpType_t | type | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
type | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_IpType_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_IpType_t * | type | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
type | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_L3Ingress | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 | intf_id, | ||
uint32 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
intf_id | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_L3Ingress_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 * | data, | ||
uint32 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_L3Routable | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_L3Routable_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_L4DstPort | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_l4_port_t | data, | ||
opennsl_l4_port_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_L4DstPort_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_l4_port_t * | data, | ||
opennsl_l4_port_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_L4SrcPort | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_l4_port_t | data, | ||
opennsl_l4_port_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_L4SrcPort_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_l4_port_t * | data, | ||
opennsl_l4_port_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_MyStationHit | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_MyStationHit_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_OuterVlan | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_vlan_t | data, | ||
opennsl_vlan_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_OuterVlan_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_vlan_t * | data, | ||
opennsl_vlan_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_OuterVlanId | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_vlan_t | data, | ||
opennsl_vlan_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
Referenced by example_create_policer().
int opennsl_field_qualify_OuterVlanId_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_vlan_t * | data, | ||
opennsl_vlan_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_OutPort | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_port_t | data, | ||
opennsl_port_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_OutPort_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_port_t * | data, | ||
opennsl_port_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_PacketRes | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 | data, | ||
uint32 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_PacketRes_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 * | data, | ||
uint32 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_RangeCheck | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_range_t | range, | ||
int | invert | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
range | [IN] |
invert | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_RangeCheck_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
int | max_count, | ||
opennsl_field_range_t * | range, | ||
int * | invert, | ||
int * | count | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
max_count | [IN] |
range | [OUT] |
invert | [OUT] |
count | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcClassField | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 | data, | ||
uint32 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcClassField_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 * | data, | ||
uint32 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcIp | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_ip_t | data, | ||
opennsl_ip_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
Referenced by example_fp_ip_block().
int opennsl_field_qualify_SrcIp6 | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_ip6_t | data, | ||
opennsl_ip6_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcIp6_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_ip6_t * | data, | ||
opennsl_ip6_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcIp_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_ip_t * | data, | ||
opennsl_ip_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcMac | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_mac_t | data, | ||
opennsl_mac_t | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcMac_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_mac_t * | data, | ||
opennsl_mac_t * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcPort | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_module_t | data_modid, | ||
opennsl_module_t | mask_modid, | ||
opennsl_port_t | data_port, | ||
opennsl_port_t | mask_port | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data_modid | [IN] |
mask_modid | [IN] |
data_port | [IN] |
mask_port | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_SrcPort_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_module_t * | data_modid, | ||
opennsl_module_t * | mask_modid, | ||
opennsl_port_t * | data_port, | ||
opennsl_port_t * | mask_port | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data_modid | [OUT] |
mask_modid | [OUT] |
data_port | [OUT] |
mask_port | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Stage | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_stage_t | data | ||
) |
Set qualification on a particular stage.
This feature is normally used for preselectors.
unit | [IN] Unit number. |
entry | [IN] OPENNSL field entry id. |
data | [IN] Stage on which to qualify |
OPENNSL_E_xxx |
int opennsl_field_qualify_Stage_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
opennsl_field_stage_t * | data | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_TcpControl | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_TcpControl_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Ttl | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 | data, | ||
uint8 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Ttl_get | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint8 * | data, | ||
uint8 * | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [OUT] |
mask | [OUT] |
OPENNSL_E_xxx |
int opennsl_field_qualify_Vrf | ( | int | unit, |
opennsl_field_entry_t | entry, | ||
uint32 | data, | ||
uint32 | mask | ||
) |
unit | [IN] Unit number. |
entry | [IN] |
data | [IN] |
mask | [IN] |
OPENNSL_E_xxx |
int opennsl_field_range_create | ( | int | unit, |
opennsl_field_range_t * | range, | ||
uint32 | flags, | ||
opennsl_l4_port_t | min, | ||
opennsl_l4_port_t | max | ||
) |
Allocate a range checker with specified configuration.
unit | [IN] Unit number. |
range | [OUT] (for _create_id) Range check ID |
flags | [IN] Range control flags =RANGE_CONTROL_FLAGS_table |
min | [IN] Lowest port number to match (inclusive) |
max | [IN] Highest port number to match (inclusive) |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL field module not initialized |
OPENNSL_E_EXISTS | Range check ID already in use |
OPENNSL_E_XXX | Error code |
int opennsl_field_range_destroy | ( | int | unit, |
opennsl_field_range_t | range | ||
) |
Destroy a virtual range checker.
unit | [IN] Unit number. |
range | [IN] Range check ID |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL field module not initialized |
OPENNSL_E_NOT_FOUND | Range check ID not found |
OPENNSL_E_XXX | Error code |
int opennsl_field_range_get | ( | int | unit, |
opennsl_field_range_t | range, | ||
uint32 * | flags, | ||
opennsl_l4_port_t * | min, | ||
opennsl_l4_port_t * | max | ||
) |
Retrieve parameters associated with an existing range checker.
unit | [IN] Unit number. |
range | [IN] Range check ID |
flags | [OUT] Range control flags =RANGE_CONTROL_FLAGS_RANGE_table |
min | [OUT] Lowest port number to match (inclusive) |
max | [OUT] Highest port number to match (inclusive) |
OPENNSL_E_NONE | Operation completed successfully |
OPENNSL_E_INIT | OPENNSL field module not initialized |
OPENNSL_E_NOT_FOUND | Range check ID not found |
OPENNSL_E_XXX | Error code |
int opennsl_field_stat_all_set | ( | int | unit, |
int | stat_id, | ||
uint64 | value | ||
) |
Set 64-bit counter value to all counters.
unit | [IN] Unit number. |
stat_id | [IN] Statistics entity ID. |
value | [IN] New value for statistics type. |
OPENNSL_E_XXX |
int opennsl_field_stat_create | ( | int | unit, |
opennsl_field_group_t | group, | ||
int | nstat, | ||
opennsl_field_stat_t * | stat_arr, | ||
int * | stat_id | ||
) |
Create stat collection entity.
unit | [IN] Unit number. |
group | [IN] Field group statistics entity will be associated with in the future. |
nstat | [IN] Number of elements in stat_arr - counter types array. |
stat_arr | [IN] Array of counters to be collected in statistics entity. |
stat_id | [OUT] Statistics entity ID. |
OPENNSL_E_XXX |
Referenced by example_create_policer().
int opennsl_field_stat_create_id | ( | int | unit, |
opennsl_field_group_t | group, | ||
int | nstat, | ||
opennsl_field_stat_t * | stat_arr, | ||
int | stat_id | ||
) |
Create stat collection entity with specified Statistics entity ID value.
unit | [IN] Unit number. |
group | [IN] Field group statistics entity will be associated with in the future. |
nstat | [IN] Number of elements in stat_arr - counter types array. |
stat_arr | [IN] Array of counters to be collected in statistics entity. |
stat_id | [IN] Statistics entity ID. |
OPENNSL_E_XXX |
Referenced by example_create_policy(), and example_fp_redirect().
int opennsl_field_stat_destroy | ( | int | unit, |
int | stat_id | ||
) |
Destroy stat collection entity.
unit | [IN] Unit number. |
stat_id | [IN] Statistics entity ID. |
OPENNSL_E_XXX |
Referenced by main().
int opennsl_field_stat_detach | ( | int | unit, |
uint32 | stat_id | ||
) |
Detach counters entries to a field group.
unit | [IN] Unit number. |
stat_id | [IN] Statistics entity ID |
OPENNSL_E_xxx |
int opennsl_field_stat_get | ( | int | unit, |
int | stat_id, | ||
opennsl_field_stat_t | stat, | ||
uint64 * | value | ||
) |
Get 64-bit counter value for specific statistic type.
unit | [IN] Unit number. |
stat_id | [IN] Statistics entity ID. |
stat | [IN] Statistics entity ID. |
value | [OUT] Counter value for statistics type. |
OPENNSL_E_XXX |
Referenced by example_check_rates(), and main().
int opennsl_field_stat_id_get | ( | int | unit, |
opennsl_field_group_t | group, | ||
uint32 | stat_id, | ||
uint32 * | stat_counter_id | ||
) |
Get flex stat counter ID associated with given field group and its associated stats ID.
unit | [IN] Unit number. |
group | [IN] Field Group |
stat_id | [IN] Statistics entity ID |
stat_counter_id | [OUT] Flex Stat Counter ID |
OPENNSL_E_xxx |
int opennsl_field_stat_set | ( | int | unit, |
int | stat_id, | ||
opennsl_field_stat_t | stat, | ||
uint64 | value | ||
) |
Set 64-bit counter value for specific statistic type.
unit | [IN] Unit number. |
stat_id | [IN] Statistics entity ID. |
stat | [IN] Statistics entity ID. |
value | [IN] New value for statistics type. |
OPENNSL_E_XXX |
Referenced by example_check_rates().
int opennsl_field_stat_size | ( | int | unit, |
int | stat_id, | ||
int * | stat_size | ||
) |
Get number of counters associated with statistics entity.
unit | [IN] Unit number. |
stat_id | [IN] Statistics entity ID. |
stat_size | [OUT] Number of collected counters. |
OPENNSL_E_XXX |