![]() |
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Include dependency graph for avf_fdir_lib.c:Go to the source code of this file.
Macros | |
| #define | AVF_FDIR_IPV6_TC_OFFSET 20 |
| #define | AVF_IPV6_TC_MASK (0xFF << AVF_FDIR_IPV6_TC_OFFSET) |
| #define | AVF_FDIR_MAX_QREGION_SIZE 128 |
Functions | |
| static int | fls_u32 (u32 x) |
| static int | ether_addr_is_zero (const struct avf_ether_addr *ea) |
| int | avf_fdir_rcfg_create (struct avf_fdir_conf **rcfg, int tunnel_level, u16 vsi, u16 nrxq) |
| Create a rule cfg object. More... | |
| int | avf_fdir_rcfg_destroy (struct avf_fdir_conf *rcfg) |
| Destroy a rule cfg object. More... | |
| int | avf_fdir_rcfg_set_hdr (struct avf_fdir_conf *rcfg, int layer, enum virtchnl_proto_hdr_type hdr) |
| Set match potocol header on specific layer, it will overwrite is already be set. More... | |
| int | avf_fdir_rcfg_set_field (struct avf_fdir_conf *rcfg, int layer, struct avf_flow_item *item, struct avf_flow_error *error) |
| Set a match field on specific protocol layer, if any match field already be set on this layer, it will be overwritten. More... | |
| int | avf_fdir_rcfg_act_queue (struct avf_fdir_conf *rcfg, int queue, int size, int act_idx) |
| Set action as to queue(group), conflict with drop action. More... | |
| int | avf_fdir_parse_action_qregion (struct avf_fdir_conf *rcfg, const struct avf_flow_action *act, int act_idx, struct avf_flow_error *error) |
| Set action as to queue group, conflict with drop action. More... | |
| int | avf_fdir_rcfg_act_drop (struct avf_fdir_conf *rcfg, int act_idx) |
| Set action as as drop, conflict with to queue(gropu) action. More... | |
| int | avf_fdir_rcfg_act_mark (struct avf_fdir_conf *rcfg, const u32 mark, int act_idx) |
| Set action as mark, it can co-exist with to queue(group) or drop action. More... | |
| int | avf_fdir_rcfg_validate (struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg) |
| Validate a flow rule cfg, check with PF driver if the rule cfg is supportted or not. More... | |
| int | avf_fdir_rule_create (struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg) |
| Create a flow rule, a FDIR rule is expected to be programmed into hardware if return success. More... | |
| int | avf_fdir_rule_destroy (struct avf_fdir_vc_ctx *ctx, struct avf_fdir_conf *rcfg) |
| Destroy a flow rule. More... | |
| int | avf_fdir_parse_action (const struct avf_flow_action actions[], struct avf_fdir_conf *rcfg, struct avf_flow_error *error) |
| int | avf_fdir_parse_pattern (struct avf_fdir_conf *rcfg, struct avf_flow_item avf_items[], struct avf_flow_error *error) |
| int | avf_flow_error_set (struct avf_flow_error *error, int code, enum avf_flow_error_type type, const void *cause, const char *message) |
| Initialize flow error structure. More... | |
| char * | avf_fdir_prgm_error_decode (int err_no) |
| #define AVF_FDIR_IPV6_TC_OFFSET 20 |
Definition at line 21 of file avf_fdir_lib.c.
| #define AVF_FDIR_MAX_QREGION_SIZE 128 |
Definition at line 23 of file avf_fdir_lib.c.
| #define AVF_IPV6_TC_MASK (0xFF << AVF_FDIR_IPV6_TC_OFFSET) |
Definition at line 22 of file avf_fdir_lib.c.
| int avf_fdir_parse_action | ( | const struct avf_flow_action | actions[], |
| struct avf_fdir_conf * | rcfg, | ||
| struct avf_flow_error * | error | ||
| ) |
Definition at line 672 of file avf_fdir_lib.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int avf_fdir_parse_action_qregion | ( | struct avf_fdir_conf * | rcfg, |
| const struct avf_flow_action * | act, | ||
| int | act_idx, | ||
| struct avf_flow_error * | error | ||
| ) |
Set action as to queue group, conflict with drop action.
| rcfg | the rule cfg object |
| act | flow actions |
| act_idx | action index @error save error cause |
Definition at line 507 of file avf_fdir_lib.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int avf_fdir_parse_pattern | ( | struct avf_fdir_conf * | rcfg, |
| struct avf_flow_item | avf_items[], | ||
| struct avf_flow_error * | error | ||
| ) |
Definition at line 789 of file avf_fdir_lib.c.
Here is the call graph for this function:
Here is the caller graph for this function:| char* avf_fdir_prgm_error_decode | ( | int | err_no | ) |
| int avf_fdir_rcfg_act_drop | ( | struct avf_fdir_conf * | rcfg, |
| int | act_idx | ||
| ) |
Set action as as drop, conflict with to queue(gropu) action.
| rcfg | the rule cfg object |
| act_idx | action index |
Definition at line 564 of file avf_fdir_lib.c.
Here is the caller graph for this function:| int avf_fdir_rcfg_act_mark | ( | struct avf_fdir_conf * | rcfg, |
| const u32 | mark, | ||
| int | act_idx | ||
| ) |
Set action as mark, it can co-exist with to queue(group) or drop action.
| rcfg | the rule cfg object |
| mark | a 32 bit flow mark |
| act_idx | action index |
Definition at line 578 of file avf_fdir_lib.c.
Here is the caller graph for this function:| int avf_fdir_rcfg_act_queue | ( | struct avf_fdir_conf * | rcfg, |
| int | queue, | ||
| int | size, | ||
| int | act_idx | ||
| ) |
Set action as to queue(group), conflict with drop action.
| rcfg | rule cfg object |
| queue | queue id. |
| size | queue group size, must be 2^n. 1 means only to single queue. |
| act_idx | action index |
Definition at line 486 of file avf_fdir_lib.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int avf_fdir_rcfg_create | ( | struct avf_fdir_conf ** | rcfg, |
| int | tunnel_level, | ||
| u16 | vsi, | ||
| u16 | nrxq | ||
| ) |
Create a rule cfg object.
| rcfg | created rule cfg object. |
| tunnel | tunnel level where protocol header start from 0 from moster outer layer. 1 from first inner layer. 2 form second inner layer. ... |
| vsi | avf vsi id |
| nrxq | the rx queue number of the avf |
Definition at line 43 of file avf_fdir_lib.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int avf_fdir_rcfg_destroy | ( | struct avf_fdir_conf * | rcfg | ) |
Destroy a rule cfg object.
| rcfg | the cfg object to destroy. |
Definition at line 62 of file avf_fdir_lib.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int avf_fdir_rcfg_set_field | ( | struct avf_fdir_conf * | rcfg, |
| int | layer, | ||
| struct avf_flow_item * | item, | ||
| struct avf_flow_error * | error | ||
| ) |
Set a match field on specific protocol layer, if any match field already be set on this layer, it will be overwritten.
| rcfg | the rule cfg object |
| layer | layer of the protocol header. |
| item | flow item |
| error | save error cause |
Definition at line 85 of file avf_fdir_lib.c.
Here is the call graph for this function:
Here is the caller graph for this function:| int avf_fdir_rcfg_set_hdr | ( | struct avf_fdir_conf * | rcfg, |
| int | layer, | ||
| enum virtchnl_proto_hdr_type | hdr | ||
| ) |
Set match potocol header on specific layer, it will overwrite is already be set.
| rcfg | the rule cfg object |
| layer | layer of the protocol header. |
| hdr | protocol header type. |
Definition at line 70 of file avf_fdir_lib.c.
| int avf_fdir_rcfg_validate | ( | struct avf_fdir_vc_ctx * | ctx, |
| struct avf_fdir_conf * | rcfg | ||
| ) |
Validate a flow rule cfg, check with PF driver if the rule cfg is supportted or not.
| ctx | virtual channel context |
| rcfg | the rule cfg object. |
Definition at line 594 of file avf_fdir_lib.c.
| int avf_fdir_rule_create | ( | struct avf_fdir_vc_ctx * | ctx, |
| struct avf_fdir_conf * | rcfg | ||
| ) |
Create a flow rule, a FDIR rule is expected to be programmed into hardware if return success.
| ctx | virtual channel context |
| rcfg | rule cfg object. |
Definition at line 620 of file avf_fdir_lib.c.
Here is the caller graph for this function:| int avf_fdir_rule_destroy | ( | struct avf_fdir_vc_ctx * | ctx, |
| struct avf_fdir_conf * | rcfg | ||
| ) |
Destroy a flow rule.
| ctx | virtual channel context |
| rcfg | the rule cfg object. |
Definition at line 647 of file avf_fdir_lib.c.
Here is the caller graph for this function:| int avf_flow_error_set | ( | struct avf_flow_error * | error, |
| int | code, | ||
| enum avf_flow_error_type | type, | ||
| const void * | cause, | ||
| const char * | message | ||
| ) |
Initialize flow error structure.
| [out] | error | Pointer to flow error structure (may be NULL). |
| code | Related error code | |
| type | Cause field and error types. | |
| cause | Object responsible for the error. | |
| message | Human-readable error message. |
Definition at line 810 of file avf_fdir_lib.c.
Here is the caller graph for this function:
|
inlinestatic |
|
inlinestatic |