mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: microchip: sparx5: Provide rule count, key removal and keyset select
This provides these 3 functions in the VCAP API: - Count the number of rules in a VCAP lookup (chain) - Remove a key from a VCAP rule - Find the keyset that gives the smallest rule list from a list of keysets Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
fbd3dce958
commit
bfcb94aacc
@@ -201,6 +201,9 @@ int vcap_rule_add_action_bit(struct vcap_rule *rule,
|
||||
int vcap_rule_add_action_u32(struct vcap_rule *rule,
|
||||
enum vcap_action_field action, u32 value);
|
||||
|
||||
/* Get number of rules in a vcap instance lookup chain id range */
|
||||
int vcap_admin_rule_count(struct vcap_admin *admin, int cid);
|
||||
|
||||
/* VCAP rule counter operations */
|
||||
int vcap_get_rule_count_by_cookie(struct vcap_control *vctrl,
|
||||
struct vcap_counter *ctr, u64 cookie);
|
||||
@@ -269,6 +272,14 @@ int vcap_rule_mod_action_u32(struct vcap_rule *rule,
|
||||
int vcap_rule_get_key_u32(struct vcap_rule *rule, enum vcap_key_field key,
|
||||
u32 *value, u32 *mask);
|
||||
|
||||
/* Remove a key field with value and mask in the rule */
|
||||
int vcap_rule_rem_key(struct vcap_rule *rule, enum vcap_key_field key);
|
||||
|
||||
/* Select the keyset from the list that results in the smallest rule size */
|
||||
enum vcap_keyfield_set
|
||||
vcap_select_min_rule_keyset(struct vcap_control *vctrl, enum vcap_type vtype,
|
||||
struct vcap_keyset_list *kslist);
|
||||
|
||||
struct vcap_client_actionfield *
|
||||
vcap_find_actionfield(struct vcap_rule *rule, enum vcap_action_field act);
|
||||
#endif /* __VCAP_API_CLIENT__ */
|
||||
|
||||
Reference in New Issue
Block a user