Commit adcb7aa3 authored by Ioana Ciornei's avatar Ioana Ciornei Committed by David S. Miller

dpaa2-switch: rename dpaa2_switch_acl_tbl into filter_block

Until now, shared filter blocks were implemented only by ACL tables
shared between ports. Going forward, when the mirroring support will be
added, this will not be true anymore.

Rename the dpaa2_switch_acl_tbl into dpaa2_switch_filter_block so that
we make it clear that the structure is used not only for filters that
use the ACL table but will be used for all the filters that are added in
a block.
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b5d8b44
......@@ -113,20 +113,20 @@ struct dpaa2_switch_acl_entry {
struct dpsw_acl_key key;
};
struct dpaa2_switch_acl_tbl {
struct list_head entries;
struct dpaa2_switch_filter_block {
struct ethsw_core *ethsw;
u64 ports;
u16 id;
u8 num_rules;
bool in_use;
struct list_head acl_entries;
u16 acl_id;
u8 num_acl_rules;
};
static inline bool
dpaa2_switch_acl_tbl_is_full(struct dpaa2_switch_acl_tbl *acl_tbl)
dpaa2_switch_acl_tbl_is_full(struct dpaa2_switch_filter_block *filter_block)
{
if ((acl_tbl->num_rules + DPAA2_ETHSW_PORT_DEFAULT_TRAPS) >=
if ((filter_block->num_acl_rules + DPAA2_ETHSW_PORT_DEFAULT_TRAPS) >=
DPAA2_ETHSW_PORT_MAX_ACL_ENTRIES)
return true;
return false;
......@@ -149,7 +149,7 @@ struct ethsw_port_priv {
bool ucast_flood;
bool learn_ena;
struct dpaa2_switch_acl_tbl *acl_tbl;
struct dpaa2_switch_filter_block *filter_block;
};
/* Switch data */
......@@ -175,7 +175,7 @@ struct ethsw_core {
int napi_users;
struct dpaa2_switch_fdb *fdbs;
struct dpaa2_switch_acl_tbl *acls;
struct dpaa2_switch_filter_block *filter_blocks;
};
static inline int dpaa2_switch_get_index(struct ethsw_core *ethsw,
......@@ -229,18 +229,18 @@ typedef int dpaa2_switch_fdb_cb_t(struct ethsw_port_priv *port_priv,
/* TC offload */
int dpaa2_switch_cls_flower_replace(struct dpaa2_switch_acl_tbl *acl_tbl,
int dpaa2_switch_cls_flower_replace(struct dpaa2_switch_filter_block *block,
struct flow_cls_offload *cls);
int dpaa2_switch_cls_flower_destroy(struct dpaa2_switch_acl_tbl *acl_tbl,
int dpaa2_switch_cls_flower_destroy(struct dpaa2_switch_filter_block *block,
struct flow_cls_offload *cls);
int dpaa2_switch_cls_matchall_replace(struct dpaa2_switch_acl_tbl *acl_tbl,
int dpaa2_switch_cls_matchall_replace(struct dpaa2_switch_filter_block *block,
struct tc_cls_matchall_offload *cls);
int dpaa2_switch_cls_matchall_destroy(struct dpaa2_switch_acl_tbl *acl_tbl,
int dpaa2_switch_cls_matchall_destroy(struct dpaa2_switch_filter_block *block,
struct tc_cls_matchall_offload *cls);
int dpaa2_switch_acl_entry_add(struct dpaa2_switch_acl_tbl *acl_tbl,
int dpaa2_switch_acl_entry_add(struct dpaa2_switch_filter_block *block,
struct dpaa2_switch_acl_entry *entry);
#endif /* __ETHSW_H */
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