mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 19:12:29 -04:00
net: microchip: vcap api: Enable/Disable rules via chains in VCAP HW
This supports that individual rules are enabled and disabled via chain information. This is done by keeping disabled rules in the VCAP list (cached) until they are enabled, and only at this time are the rules written to the VCAP HW. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> 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
814e769320
commit
18a15c769d
@@ -164,10 +164,13 @@ static int vcap_debugfs_show_keysets(struct vcap_rule_internal *ri,
|
||||
matches.cnt = 0;
|
||||
matches.max = ARRAY_SIZE(keysets);
|
||||
|
||||
err = vcap_find_keystream_keysets(ri->vctrl, admin->vtype,
|
||||
admin->cache.keystream,
|
||||
admin->cache.maskstream,
|
||||
false, 0, &matches);
|
||||
if (ri->state == VCAP_RS_DISABLED)
|
||||
err = vcap_rule_get_keysets(ri, &matches);
|
||||
else
|
||||
err = vcap_find_keystream_keysets(ri->vctrl, admin->vtype,
|
||||
admin->cache.keystream,
|
||||
admin->cache.maskstream,
|
||||
false, 0, &matches);
|
||||
if (err) {
|
||||
pr_err("%s:%d: could not find valid keysets: %d\n",
|
||||
__func__, __LINE__, err);
|
||||
|
||||
Reference in New Issue
Block a user