Commit aae4e500 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: mscc: ocelot: generalize the "ACE/ACL" names

Access Control Lists (and their respective Access Control Entries) are
specifically entries in the VCAP IS2, the security enforcement block,
according to the documentation.
Let's rename the structures and functions to something more generic, so
that VCAP IS1 structures (which would otherwise have to be called
Ingress Classification Entries) can reuse the same code without
confusion.

Some renaming that was done:

struct ocelot_ace_rule -> struct ocelot_vcap_filter
struct ocelot_acl_block -> struct ocelot_vcap_block
enum ocelot_ace_type -> enum ocelot_vcap_key_type
struct ocelot_ace_vlan -> struct ocelot_vcap_key_vlan
enum ocelot_ace_action -> enum ocelot_vcap_action
struct ocelot_ace_stats -> struct ocelot_vcap_stats
enum ocelot_ace_type -> enum ocelot_vcap_key_type
struct ocelot_ace_frame_* -> struct ocelot_vcap_key_*

No functional change is intended.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c83654f
...@@ -1392,7 +1392,7 @@ int ocelot_init(struct ocelot *ocelot) ...@@ -1392,7 +1392,7 @@ int ocelot_init(struct ocelot *ocelot)
INIT_LIST_HEAD(&ocelot->multicast); INIT_LIST_HEAD(&ocelot->multicast);
ocelot_mact_init(ocelot); ocelot_mact_init(ocelot);
ocelot_vlan_init(ocelot); ocelot_vlan_init(ocelot);
ocelot_ace_init(ocelot); ocelot_vcap_init(ocelot);
for (port = 0; port < ocelot->num_phys_ports; port++) { for (port = 0; port < ocelot->num_phys_ports; port++) {
/* Clear all counters (5 groups) */ /* Clear all counters (5 groups) */
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "ocelot_vcap.h" #include "ocelot_vcap.h"
static int ocelot_flower_parse_action(struct flow_cls_offload *f, static int ocelot_flower_parse_action(struct flow_cls_offload *f,
struct ocelot_ace_rule *ace) struct ocelot_vcap_filter *filter)
{ {
const struct flow_action_entry *a; const struct flow_action_entry *a;
s64 burst; s64 burst;
...@@ -26,17 +26,17 @@ static int ocelot_flower_parse_action(struct flow_cls_offload *f, ...@@ -26,17 +26,17 @@ static int ocelot_flower_parse_action(struct flow_cls_offload *f,
flow_action_for_each(i, a, &f->rule->action) { flow_action_for_each(i, a, &f->rule->action) {
switch (a->id) { switch (a->id) {
case FLOW_ACTION_DROP: case FLOW_ACTION_DROP:
ace->action = OCELOT_ACL_ACTION_DROP; filter->action = OCELOT_VCAP_ACTION_DROP;
break; break;
case FLOW_ACTION_TRAP: case FLOW_ACTION_TRAP:
ace->action = OCELOT_ACL_ACTION_TRAP; filter->action = OCELOT_VCAP_ACTION_TRAP;
break; break;
case FLOW_ACTION_POLICE: case FLOW_ACTION_POLICE:
ace->action = OCELOT_ACL_ACTION_POLICE; filter->action = OCELOT_VCAP_ACTION_POLICE;
rate = a->police.rate_bytes_ps; rate = a->police.rate_bytes_ps;
ace->pol.rate = div_u64(rate, 1000) * 8; filter->pol.rate = div_u64(rate, 1000) * 8;
burst = rate * PSCHED_NS2TICKS(a->police.burst); burst = rate * PSCHED_NS2TICKS(a->police.burst);
ace->pol.burst = div_u64(burst, PSCHED_TICKS_PER_SEC); filter->pol.burst = div_u64(burst, PSCHED_TICKS_PER_SEC);
break; break;
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -47,7 +47,7 @@ static int ocelot_flower_parse_action(struct flow_cls_offload *f, ...@@ -47,7 +47,7 @@ static int ocelot_flower_parse_action(struct flow_cls_offload *f,
} }
static int ocelot_flower_parse(struct flow_cls_offload *f, static int ocelot_flower_parse(struct flow_cls_offload *f,
struct ocelot_ace_rule *ace) struct ocelot_vcap_filter *filter)
{ {
struct flow_rule *rule = flow_cls_offload_flow_rule(f); struct flow_rule *rule = flow_cls_offload_flow_rule(f);
struct flow_dissector *dissector = rule->match.dissector; struct flow_dissector *dissector = rule->match.dissector;
...@@ -88,14 +88,14 @@ static int ocelot_flower_parse(struct flow_cls_offload *f, ...@@ -88,14 +88,14 @@ static int ocelot_flower_parse(struct flow_cls_offload *f,
return -EOPNOTSUPP; return -EOPNOTSUPP;
flow_rule_match_eth_addrs(rule, &match); flow_rule_match_eth_addrs(rule, &match);
ace->type = OCELOT_ACE_TYPE_ETYPE; filter->key_type = OCELOT_VCAP_KEY_ETYPE;
ether_addr_copy(ace->frame.etype.dmac.value, ether_addr_copy(filter->key.etype.dmac.value,
match.key->dst); match.key->dst);
ether_addr_copy(ace->frame.etype.smac.value, ether_addr_copy(filter->key.etype.smac.value,
match.key->src); match.key->src);
ether_addr_copy(ace->frame.etype.dmac.mask, ether_addr_copy(filter->key.etype.dmac.mask,
match.mask->dst); match.mask->dst);
ether_addr_copy(ace->frame.etype.smac.mask, ether_addr_copy(filter->key.etype.smac.mask,
match.mask->src); match.mask->src);
goto finished_key_parsing; goto finished_key_parsing;
} }
...@@ -105,18 +105,18 @@ static int ocelot_flower_parse(struct flow_cls_offload *f, ...@@ -105,18 +105,18 @@ static int ocelot_flower_parse(struct flow_cls_offload *f,
flow_rule_match_basic(rule, &match); flow_rule_match_basic(rule, &match);
if (ntohs(match.key->n_proto) == ETH_P_IP) { if (ntohs(match.key->n_proto) == ETH_P_IP) {
ace->type = OCELOT_ACE_TYPE_IPV4; filter->key_type = OCELOT_VCAP_KEY_IPV4;
ace->frame.ipv4.proto.value[0] = filter->key.ipv4.proto.value[0] =
match.key->ip_proto; match.key->ip_proto;
ace->frame.ipv4.proto.mask[0] = filter->key.ipv4.proto.mask[0] =
match.mask->ip_proto; match.mask->ip_proto;
match_protocol = false; match_protocol = false;
} }
if (ntohs(match.key->n_proto) == ETH_P_IPV6) { if (ntohs(match.key->n_proto) == ETH_P_IPV6) {
ace->type = OCELOT_ACE_TYPE_IPV6; filter->key_type = OCELOT_VCAP_KEY_IPV6;
ace->frame.ipv6.proto.value[0] = filter->key.ipv6.proto.value[0] =
match.key->ip_proto; match.key->ip_proto;
ace->frame.ipv6.proto.mask[0] = filter->key.ipv6.proto.mask[0] =
match.mask->ip_proto; match.mask->ip_proto;
match_protocol = false; match_protocol = false;
} }
...@@ -128,16 +128,16 @@ static int ocelot_flower_parse(struct flow_cls_offload *f, ...@@ -128,16 +128,16 @@ static int ocelot_flower_parse(struct flow_cls_offload *f,
u8 *tmp; u8 *tmp;
flow_rule_match_ipv4_addrs(rule, &match); flow_rule_match_ipv4_addrs(rule, &match);
tmp = &ace->frame.ipv4.sip.value.addr[0]; tmp = &filter->key.ipv4.sip.value.addr[0];
memcpy(tmp, &match.key->src, 4); memcpy(tmp, &match.key->src, 4);
tmp = &ace->frame.ipv4.sip.mask.addr[0]; tmp = &filter->key.ipv4.sip.mask.addr[0];
memcpy(tmp, &match.mask->src, 4); memcpy(tmp, &match.mask->src, 4);
tmp = &ace->frame.ipv4.dip.value.addr[0]; tmp = &filter->key.ipv4.dip.value.addr[0];
memcpy(tmp, &match.key->dst, 4); memcpy(tmp, &match.key->dst, 4);
tmp = &ace->frame.ipv4.dip.mask.addr[0]; tmp = &filter->key.ipv4.dip.mask.addr[0];
memcpy(tmp, &match.mask->dst, 4); memcpy(tmp, &match.mask->dst, 4);
match_protocol = false; match_protocol = false;
} }
...@@ -151,10 +151,10 @@ static int ocelot_flower_parse(struct flow_cls_offload *f, ...@@ -151,10 +151,10 @@ static int ocelot_flower_parse(struct flow_cls_offload *f,
struct flow_match_ports match; struct flow_match_ports match;
flow_rule_match_ports(rule, &match); flow_rule_match_ports(rule, &match);
ace->frame.ipv4.sport.value = ntohs(match.key->src); filter->key.ipv4.sport.value = ntohs(match.key->src);
ace->frame.ipv4.sport.mask = ntohs(match.mask->src); filter->key.ipv4.sport.mask = ntohs(match.mask->src);
ace->frame.ipv4.dport.value = ntohs(match.key->dst); filter->key.ipv4.dport.value = ntohs(match.key->dst);
ace->frame.ipv4.dport.mask = ntohs(match.mask->dst); filter->key.ipv4.dport.mask = ntohs(match.mask->dst);
match_protocol = false; match_protocol = false;
} }
...@@ -162,11 +162,11 @@ static int ocelot_flower_parse(struct flow_cls_offload *f, ...@@ -162,11 +162,11 @@ static int ocelot_flower_parse(struct flow_cls_offload *f,
struct flow_match_vlan match; struct flow_match_vlan match;
flow_rule_match_vlan(rule, &match); flow_rule_match_vlan(rule, &match);
ace->type = OCELOT_ACE_TYPE_ANY; filter->key_type = OCELOT_VCAP_KEY_ANY;
ace->vlan.vid.value = match.key->vlan_id; filter->vlan.vid.value = match.key->vlan_id;
ace->vlan.vid.mask = match.mask->vlan_id; filter->vlan.vid.mask = match.mask->vlan_id;
ace->vlan.pcp.value[0] = match.key->vlan_priority; filter->vlan.pcp.value[0] = match.key->vlan_priority;
ace->vlan.pcp.mask[0] = match.mask->vlan_priority; filter->vlan.pcp.mask[0] = match.mask->vlan_priority;
match_protocol = false; match_protocol = false;
} }
...@@ -175,76 +175,76 @@ static int ocelot_flower_parse(struct flow_cls_offload *f, ...@@ -175,76 +175,76 @@ static int ocelot_flower_parse(struct flow_cls_offload *f,
/* TODO: support SNAP, LLC etc */ /* TODO: support SNAP, LLC etc */
if (proto < ETH_P_802_3_MIN) if (proto < ETH_P_802_3_MIN)
return -EOPNOTSUPP; return -EOPNOTSUPP;
ace->type = OCELOT_ACE_TYPE_ETYPE; filter->key_type = OCELOT_VCAP_KEY_ETYPE;
*(__be16 *)ace->frame.etype.etype.value = htons(proto); *(__be16 *)filter->key.etype.etype.value = htons(proto);
*(__be16 *)ace->frame.etype.etype.mask = htons(0xffff); *(__be16 *)filter->key.etype.etype.mask = htons(0xffff);
} }
/* else, a rule of type OCELOT_ACE_TYPE_ANY is implicitly added */ /* else, a filter of type OCELOT_VCAP_KEY_ANY is implicitly added */
ace->prio = f->common.prio; filter->prio = f->common.prio;
ace->id = f->cookie; filter->id = f->cookie;
return ocelot_flower_parse_action(f, ace); return ocelot_flower_parse_action(f, filter);
} }
static static struct ocelot_vcap_filter
struct ocelot_ace_rule *ocelot_ace_rule_create(struct ocelot *ocelot, int port, *ocelot_vcap_filter_create(struct ocelot *ocelot, int port,
struct flow_cls_offload *f) struct flow_cls_offload *f)
{ {
struct ocelot_ace_rule *ace; struct ocelot_vcap_filter *filter;
ace = kzalloc(sizeof(*ace), GFP_KERNEL); filter = kzalloc(sizeof(*filter), GFP_KERNEL);
if (!ace) if (!filter)
return NULL; return NULL;
ace->ingress_port_mask = BIT(port); filter->ingress_port_mask = BIT(port);
return ace; return filter;
} }
int ocelot_cls_flower_replace(struct ocelot *ocelot, int port, int ocelot_cls_flower_replace(struct ocelot *ocelot, int port,
struct flow_cls_offload *f, bool ingress) struct flow_cls_offload *f, bool ingress)
{ {
struct ocelot_ace_rule *ace; struct ocelot_vcap_filter *filter;
int ret; int ret;
ace = ocelot_ace_rule_create(ocelot, port, f); filter = ocelot_vcap_filter_create(ocelot, port, f);
if (!ace) if (!filter)
return -ENOMEM; return -ENOMEM;
ret = ocelot_flower_parse(f, ace); ret = ocelot_flower_parse(f, filter);
if (ret) { if (ret) {
kfree(ace); kfree(filter);
return ret; return ret;
} }
return ocelot_ace_rule_offload_add(ocelot, ace, f->common.extack); return ocelot_vcap_filter_add(ocelot, filter, f->common.extack);
} }
EXPORT_SYMBOL_GPL(ocelot_cls_flower_replace); EXPORT_SYMBOL_GPL(ocelot_cls_flower_replace);
int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port, int ocelot_cls_flower_destroy(struct ocelot *ocelot, int port,
struct flow_cls_offload *f, bool ingress) struct flow_cls_offload *f, bool ingress)
{ {
struct ocelot_ace_rule ace; struct ocelot_vcap_filter filter;
ace.prio = f->common.prio; filter.prio = f->common.prio;
ace.id = f->cookie; filter.id = f->cookie;
return ocelot_ace_rule_offload_del(ocelot, &ace); return ocelot_vcap_filter_del(ocelot, &filter);
} }
EXPORT_SYMBOL_GPL(ocelot_cls_flower_destroy); EXPORT_SYMBOL_GPL(ocelot_cls_flower_destroy);
int ocelot_cls_flower_stats(struct ocelot *ocelot, int port, int ocelot_cls_flower_stats(struct ocelot *ocelot, int port,
struct flow_cls_offload *f, bool ingress) struct flow_cls_offload *f, bool ingress)
{ {
struct ocelot_ace_rule ace; struct ocelot_vcap_filter filter;
int ret; int ret;
ace.prio = f->common.prio; filter.prio = f->common.prio;
ace.id = f->cookie; filter.id = f->cookie;
ret = ocelot_ace_rule_stats_update(ocelot, &ace); ret = ocelot_vcap_filter_stats_update(ocelot, &filter);
if (ret) if (ret)
return ret; return ret;
flow_stats_update(&f->stats, 0x0, ace.stats.pkts, 0, 0x0, flow_stats_update(&f->stats, 0x0, filter.stats.pkts, 0, 0x0,
FLOW_ACTION_HW_STATS_IMMEDIATE); FLOW_ACTION_HW_STATS_IMMEDIATE);
return 0; return 0;
} }
......
...@@ -33,9 +33,9 @@ struct qos_policer_conf { ...@@ -33,9 +33,9 @@ struct qos_policer_conf {
int qos_policer_conf_set(struct ocelot *ocelot, int port, u32 pol_ix, int qos_policer_conf_set(struct ocelot *ocelot, int port, u32 pol_ix,
struct qos_policer_conf *conf); struct qos_policer_conf *conf);
int ocelot_ace_policer_add(struct ocelot *ocelot, u32 pol_ix, int ocelot_vcap_policer_add(struct ocelot *ocelot, u32 pol_ix,
struct ocelot_policer *pol); struct ocelot_policer *pol);
int ocelot_ace_policer_del(struct ocelot *ocelot, u32 pol_ix); int ocelot_vcap_policer_del(struct ocelot *ocelot, u32 pol_ix);
#endif /* _MSCC_OCELOT_POLICE_H_ */ #endif /* _MSCC_OCELOT_POLICE_H_ */
This diff is collapsed.
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* Copyright (c) 2019 Microsemi Corporation * Copyright (c) 2019 Microsemi Corporation
*/ */
#ifndef _MSCC_OCELOT_ACE_H_ #ifndef _MSCC_OCELOT_VCAP_H_
#define _MSCC_OCELOT_ACE_H_ #define _MSCC_OCELOT_VCAP_H_
#include "ocelot.h" #include "ocelot.h"
#include "ocelot_police.h" #include "ocelot_police.h"
...@@ -76,31 +76,31 @@ struct ocelot_vcap_udp_tcp { ...@@ -76,31 +76,31 @@ struct ocelot_vcap_udp_tcp {
u16 mask; u16 mask;
}; };
enum ocelot_ace_type { enum ocelot_vcap_key_type {
OCELOT_ACE_TYPE_ANY, OCELOT_VCAP_KEY_ANY,
OCELOT_ACE_TYPE_ETYPE, OCELOT_VCAP_KEY_ETYPE,
OCELOT_ACE_TYPE_LLC, OCELOT_VCAP_KEY_LLC,
OCELOT_ACE_TYPE_SNAP, OCELOT_VCAP_KEY_SNAP,
OCELOT_ACE_TYPE_ARP, OCELOT_VCAP_KEY_ARP,
OCELOT_ACE_TYPE_IPV4, OCELOT_VCAP_KEY_IPV4,
OCELOT_ACE_TYPE_IPV6 OCELOT_VCAP_KEY_IPV6
}; };
struct ocelot_ace_vlan { struct ocelot_vcap_key_vlan {
struct ocelot_vcap_vid vid; /* VLAN ID (12 bit) */ struct ocelot_vcap_vid vid; /* VLAN ID (12 bit) */
struct ocelot_vcap_u8 pcp; /* PCP (3 bit) */ struct ocelot_vcap_u8 pcp; /* PCP (3 bit) */
enum ocelot_vcap_bit dei; /* DEI */ enum ocelot_vcap_bit dei; /* DEI */
enum ocelot_vcap_bit tagged; /* Tagged/untagged frame */ enum ocelot_vcap_bit tagged; /* Tagged/untagged frame */
}; };
struct ocelot_ace_frame_etype { struct ocelot_vcap_key_etype {
struct ocelot_vcap_u48 dmac; struct ocelot_vcap_u48 dmac;
struct ocelot_vcap_u48 smac; struct ocelot_vcap_u48 smac;
struct ocelot_vcap_u16 etype; struct ocelot_vcap_u16 etype;
struct ocelot_vcap_u16 data; /* MAC data */ struct ocelot_vcap_u16 data; /* MAC data */
}; };
struct ocelot_ace_frame_llc { struct ocelot_vcap_key_llc {
struct ocelot_vcap_u48 dmac; struct ocelot_vcap_u48 dmac;
struct ocelot_vcap_u48 smac; struct ocelot_vcap_u48 smac;
...@@ -108,7 +108,7 @@ struct ocelot_ace_frame_llc { ...@@ -108,7 +108,7 @@ struct ocelot_ace_frame_llc {
struct ocelot_vcap_u32 llc; struct ocelot_vcap_u32 llc;
}; };
struct ocelot_ace_frame_snap { struct ocelot_vcap_key_snap {
struct ocelot_vcap_u48 dmac; struct ocelot_vcap_u48 dmac;
struct ocelot_vcap_u48 smac; struct ocelot_vcap_u48 smac;
...@@ -116,7 +116,7 @@ struct ocelot_ace_frame_snap { ...@@ -116,7 +116,7 @@ struct ocelot_ace_frame_snap {
struct ocelot_vcap_u40 snap; struct ocelot_vcap_u40 snap;
}; };
struct ocelot_ace_frame_arp { struct ocelot_vcap_key_arp {
struct ocelot_vcap_u48 smac; struct ocelot_vcap_u48 smac;
enum ocelot_vcap_bit arp; /* Opcode ARP/RARP */ enum ocelot_vcap_bit arp; /* Opcode ARP/RARP */
enum ocelot_vcap_bit req; /* Opcode request/reply */ enum ocelot_vcap_bit req; /* Opcode request/reply */
...@@ -133,7 +133,7 @@ struct ocelot_ace_frame_arp { ...@@ -133,7 +133,7 @@ struct ocelot_ace_frame_arp {
struct ocelot_vcap_ipv4 dip; /* Target IP address */ struct ocelot_vcap_ipv4 dip; /* Target IP address */
}; };
struct ocelot_ace_frame_ipv4 { struct ocelot_vcap_key_ipv4 {
enum ocelot_vcap_bit ttl; /* TTL zero */ enum ocelot_vcap_bit ttl; /* TTL zero */
enum ocelot_vcap_bit fragment; /* Fragment */ enum ocelot_vcap_bit fragment; /* Fragment */
enum ocelot_vcap_bit options; /* Header options */ enum ocelot_vcap_bit options; /* Header options */
...@@ -155,7 +155,7 @@ struct ocelot_ace_frame_ipv4 { ...@@ -155,7 +155,7 @@ struct ocelot_ace_frame_ipv4 {
enum ocelot_vcap_bit seq_zero; /* TCP sequence number is zero */ enum ocelot_vcap_bit seq_zero; /* TCP sequence number is zero */
}; };
struct ocelot_ace_frame_ipv6 { struct ocelot_vcap_key_ipv6 {
struct ocelot_vcap_u8 proto; /* IPv6 protocol */ struct ocelot_vcap_u8 proto; /* IPv6 protocol */
struct ocelot_vcap_u128 sip; /* IPv6 source (byte 0-7 ignored) */ struct ocelot_vcap_u128 sip; /* IPv6 source (byte 0-7 ignored) */
enum ocelot_vcap_bit ttl; /* TTL zero */ enum ocelot_vcap_bit ttl; /* TTL zero */
...@@ -174,58 +174,58 @@ struct ocelot_ace_frame_ipv6 { ...@@ -174,58 +174,58 @@ struct ocelot_ace_frame_ipv6 {
enum ocelot_vcap_bit seq_zero; /* TCP sequence number is zero */ enum ocelot_vcap_bit seq_zero; /* TCP sequence number is zero */
}; };
enum ocelot_ace_action { enum ocelot_vcap_action {
OCELOT_ACL_ACTION_DROP, OCELOT_VCAP_ACTION_DROP,
OCELOT_ACL_ACTION_TRAP, OCELOT_VCAP_ACTION_TRAP,
OCELOT_ACL_ACTION_POLICE, OCELOT_VCAP_ACTION_POLICE,
}; };
struct ocelot_ace_stats { struct ocelot_vcap_stats {
u64 bytes; u64 bytes;
u64 pkts; u64 pkts;
u64 used; u64 used;
}; };
struct ocelot_ace_rule { struct ocelot_vcap_filter {
struct list_head list; struct list_head list;
u16 prio; u16 prio;
u32 id; u32 id;
enum ocelot_ace_action action; enum ocelot_vcap_action action;
struct ocelot_ace_stats stats; struct ocelot_vcap_stats stats;
unsigned long ingress_port_mask; unsigned long ingress_port_mask;
enum ocelot_vcap_bit dmac_mc; enum ocelot_vcap_bit dmac_mc;
enum ocelot_vcap_bit dmac_bc; enum ocelot_vcap_bit dmac_bc;
struct ocelot_ace_vlan vlan; struct ocelot_vcap_key_vlan vlan;
enum ocelot_ace_type type; enum ocelot_vcap_key_type key_type;
union { union {
/* ocelot_ACE_TYPE_ANY: No specific fields */ /* OCELOT_VCAP_KEY_ANY: No specific fields */
struct ocelot_ace_frame_etype etype; struct ocelot_vcap_key_etype etype;
struct ocelot_ace_frame_llc llc; struct ocelot_vcap_key_llc llc;
struct ocelot_ace_frame_snap snap; struct ocelot_vcap_key_snap snap;
struct ocelot_ace_frame_arp arp; struct ocelot_vcap_key_arp arp;
struct ocelot_ace_frame_ipv4 ipv4; struct ocelot_vcap_key_ipv4 ipv4;
struct ocelot_ace_frame_ipv6 ipv6; struct ocelot_vcap_key_ipv6 ipv6;
} frame; } key;
struct ocelot_policer pol; struct ocelot_policer pol;
u32 pol_ix; u32 pol_ix;
}; };
int ocelot_ace_rule_offload_add(struct ocelot *ocelot, int ocelot_vcap_filter_add(struct ocelot *ocelot,
struct ocelot_ace_rule *rule, struct ocelot_vcap_filter *rule,
struct netlink_ext_ack *extack); struct netlink_ext_ack *extack);
int ocelot_ace_rule_offload_del(struct ocelot *ocelot, int ocelot_vcap_filter_del(struct ocelot *ocelot,
struct ocelot_ace_rule *rule); struct ocelot_vcap_filter *rule);
int ocelot_ace_rule_stats_update(struct ocelot *ocelot, int ocelot_vcap_filter_stats_update(struct ocelot *ocelot,
struct ocelot_ace_rule *rule); struct ocelot_vcap_filter *rule);
int ocelot_ace_init(struct ocelot *ocelot); int ocelot_vcap_init(struct ocelot *ocelot);
int ocelot_setup_tc_cls_flower(struct ocelot_port_private *priv, int ocelot_setup_tc_cls_flower(struct ocelot_port_private *priv,
struct flow_cls_offload *f, struct flow_cls_offload *f,
bool ingress); bool ingress);
#endif /* _MSCC_OCELOT_ACE_H_ */ #endif /* _MSCC_OCELOT_VCAP_H_ */
...@@ -470,7 +470,7 @@ struct ocelot_ops { ...@@ -470,7 +470,7 @@ struct ocelot_ops {
int (*reset)(struct ocelot *ocelot); int (*reset)(struct ocelot *ocelot);
}; };
struct ocelot_acl_block { struct ocelot_vcap_block {
struct list_head rules; struct list_head rules;
int count; int count;
int pol_lpr; int pol_lpr;
...@@ -535,7 +535,7 @@ struct ocelot { ...@@ -535,7 +535,7 @@ struct ocelot {
struct list_head multicast; struct list_head multicast;
struct ocelot_acl_block acl_block; struct ocelot_vcap_block block;
const struct vcap_field *vcap_is2_keys; const struct vcap_field *vcap_is2_keys;
const struct vcap_field *vcap_is2_actions; const struct vcap_field *vcap_is2_actions;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment