API Reference Manual  1.45.0
api/spec/classification.h File Reference

ODP classification descriptor. More...

#include <odp/visibility_begin.h>
#include <odp/api/packet_io_types.h>
#include <odp/api/pool_types.h>
#include <odp/api/std_types.h>
#include <odp/api/threshold.h>
#include <odp/visibility_end.h>
Include dependency graph for api/spec/classification.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  odp_cls_pmr_terms_t
 Supported PMR term values. More...
 
struct  odp_pmr_param_t
 Packet Matching Rule parameter structure. More...
 
struct  odp_pmr_create_opt_t
 Packet Matching Rule creation options. More...
 
struct  odp_red_param_t
 Random Early Detection (RED) Random Early Detection is enabled to initiate a drop probability for the incoming packet when the packets in the queue/pool cross the specified threshold values. More...
 
struct  odp_bp_param_t
 Back pressure (BP) When back pressure is enabled for a particular flow, the HW can send back pressure information to the remote peer indicating a network congestion. More...
 
struct  odp_cls_cos_stats_t
 Classifier CoS specific statistics counters. More...
 
struct  odp_cls_queue_stats_t
 Classifier queue specific statistics counters. More...
 
struct  odp_cls_stats_capability_t
 Classifier statistics capabilities. More...
 
struct  odp_cls_capability_t
 Classification capabilities This capability structure defines system level classification capability. More...
 
struct  odp_cls_cos_param
 Class of service parameters Used to communicate class of service creation options. More...
 

Typedefs

typedef union odp_cls_pmr_terms_t odp_cls_pmr_terms_t
 Supported PMR term values. More...
 
typedef struct odp_pmr_param_t odp_pmr_param_t
 Packet Matching Rule parameter structure. More...
 
typedef struct odp_pmr_create_opt_t odp_pmr_create_opt_t
 Packet Matching Rule creation options.
 
typedef struct odp_red_param_t odp_red_param_t
 Random Early Detection (RED) Random Early Detection is enabled to initiate a drop probability for the incoming packet when the packets in the queue/pool cross the specified threshold values. More...
 
typedef struct odp_bp_param_t odp_bp_param_t
 Back pressure (BP) When back pressure is enabled for a particular flow, the HW can send back pressure information to the remote peer indicating a network congestion.
 
typedef struct odp_cls_cos_stats_t odp_cls_cos_stats_t
 Classifier CoS specific statistics counters. More...
 
typedef struct odp_cls_queue_stats_t odp_cls_queue_stats_t
 Classifier queue specific statistics counters. More...
 
typedef struct odp_cls_stats_capability_t odp_cls_stats_capability_t
 Classifier statistics capabilities.
 
typedef struct odp_cls_capability_t odp_cls_capability_t
 Classification capabilities This capability structure defines system level classification capability.
 
typedef struct odp_cls_cos_param odp_cls_cos_param_t
 Class of service parameters Used to communicate class of service creation options.
 

Enumerations

enum  odp_cls_pmr_term_t {
  ODP_PMR_LEN , ODP_PMR_ETHTYPE_0 , ODP_PMR_ETHTYPE_X , ODP_PMR_VLAN_ID_0 ,
  ODP_PMR_VLAN_ID_X , ODP_PMR_VLAN_PCP_0 , ODP_PMR_DMAC , ODP_PMR_IPPROTO ,
  ODP_PMR_IP_DSCP , ODP_PMR_UDP_DPORT , ODP_PMR_TCP_DPORT , ODP_PMR_UDP_SPORT ,
  ODP_PMR_TCP_SPORT , ODP_PMR_SIP_ADDR , ODP_PMR_DIP_ADDR , ODP_PMR_SIP6_ADDR ,
  ODP_PMR_DIP6_ADDR , ODP_PMR_IPSEC_SPI , ODP_PMR_LD_VNI , ODP_PMR_CUSTOM_FRAME ,
  ODP_PMR_CUSTOM_L3 , ODP_PMR_IGMP_GRP_ADDR , ODP_PMR_ICMP_ID , ODP_PMR_ICMP_TYPE ,
  ODP_PMR_ICMP_CODE , ODP_PMR_SCTP_SPORT , ODP_PMR_SCTP_DPORT , ODP_PMR_GTPV1_TEID ,
  ODP_PMR_INNER_HDR_OFF = 32
}
 Packet Matching Rule terms. More...
 
enum  odp_cos_action_t { ODP_COS_ACTION_ENQUEUE , ODP_COS_ACTION_DROP }
 Enumeration of actions for CoS. More...
 

Functions

void odp_cls_cos_param_init (odp_cls_cos_param_t *param)
 Initialize class of service parameters. More...
 
int odp_cls_capability (odp_cls_capability_t *capability)
 Query classification capabilities. More...
 
odp_cos_t odp_cls_cos_create (const char *name, const odp_cls_cos_param_t *param)
 Create a class-of-service. More...
 
int odp_cls_cos_create_multi (const char *name[], const odp_cls_cos_param_t param[], odp_cos_t cos[], int num)
 Create multiple class-of-services. More...
 
odp_queue_t odp_cls_hash_result (odp_cos_t cos, odp_packet_t packet)
 Queue hash result Returns the queue within a CoS in which a particular packet will be enqueued based on the packet parameters and hash protocol field configured with the class of service. More...
 
int odp_cos_destroy (odp_cos_t cos)
 Discard a class-of-service along with all its associated resources. More...
 
int odp_cos_destroy_multi (odp_cos_t cos[], int num)
 Destroy multiple class-of-services. More...
 
int odp_cos_queue_set (odp_cos_t cos, odp_queue_t queue)
 Assign a queue for a class-of-service. More...
 
odp_queue_t odp_cos_queue (odp_cos_t cos)
 Get the queue associated with the specific class-of-service. More...
 
uint32_t odp_cls_cos_num_queue (odp_cos_t cos)
 Get the number of queues linked with the specific class-of-service. More...
 
uint32_t odp_cls_cos_queues (odp_cos_t cos, odp_queue_t queue[], uint32_t num)
 Get the list of queue associated with the specific class-of-service. More...
 
int odp_cls_cos_stats (odp_cos_t cos, odp_cls_cos_stats_t *stats)
 Get statistics for a CoS. More...
 
int odp_cls_queue_stats (odp_cos_t cos, odp_queue_t queue, odp_cls_queue_stats_t *stats)
 Get statistics for a queue assigned to a CoS. More...
 
void odp_cls_pmr_param_init (odp_pmr_param_t *param)
 Initialize packet matching rule parameters. More...
 
void odp_cls_pmr_create_opt_init (odp_pmr_create_opt_t *opt)
 Initialize packet matching rule creation option. More...
 
odp_pmr_t odp_cls_pmr_create (const odp_pmr_param_t *terms, int num_terms, odp_cos_t src_cos, odp_cos_t dst_cos)
 Create Packet Matching Rule (PMR) More...
 
odp_pmr_t odp_cls_pmr_create_opt (const odp_pmr_create_opt_t *opt, odp_cos_t src_cos, odp_cos_t dst_cos)
 Create a packet matching rule with options. More...
 
int odp_cls_pmr_create_multi (const odp_pmr_create_opt_t opt[], odp_cos_t src_cos[], odp_cos_t dst_cos[], odp_pmr_t pmr[], int num)
 Create multiple packet matching rules. More...
 
int odp_cls_pmr_destroy (odp_pmr_t pmr)
 Function to destroy a packet match rule. More...
 
int odp_cls_pmr_destroy_multi (odp_pmr_t pmr[], int num)
 Destroy multiple packet matching rules. More...
 
int odp_cls_cos_pool_set (odp_cos_t cos, odp_pool_t pool_id)
 Assigns a packet pool for a specific class of service. More...
 
odp_pool_t odp_cls_cos_pool (odp_cos_t cos)
 Get the pool associated with the given class of service. More...
 
uint64_t odp_cos_to_u64 (odp_cos_t cos)
 Get printable value for an odp_cos_t. More...
 
uint64_t odp_pmr_to_u64 (odp_pmr_t pmr)
 Get printable value for an odp_pmr_t. More...
 
void odp_cls_print_all (void)
 Print classifier info. More...
 

Detailed Description

ODP classification descriptor.

Definition in file api/spec/classification.h.