net: mscc: ocelot: parameterize the vcap_is2 properties
Remove the definitions for the VCAP IS2 table from ocelot_ace.c, since it is specific to VSC7514. The VSC9959 VCAP IS2 table supports more rules (1024 instead of 64) and has a different width for the action (89 bits instead of 99). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
1ba8f6561a
commit
8551cdeb2a
@@ -463,6 +463,7 @@ struct ocelot {
|
||||
|
||||
const struct vcap_field *vcap_is2_keys;
|
||||
const struct vcap_field *vcap_is2_actions;
|
||||
const struct vcap_props *vcap;
|
||||
|
||||
/* Workqueue to check statistics for overflow with its lock */
|
||||
struct mutex stats_lock;
|
||||
|
||||
@@ -11,6 +11,30 @@
|
||||
* =================================================================
|
||||
*/
|
||||
|
||||
enum {
|
||||
/* VCAP_IS1, */
|
||||
VCAP_IS2,
|
||||
/* VCAP_ES0, */
|
||||
};
|
||||
|
||||
struct vcap_props {
|
||||
u16 tg_width; /* Type-group width (in bits) */
|
||||
u16 sw_count; /* Sub word count */
|
||||
u16 entry_count; /* Entry count */
|
||||
u16 entry_words; /* Number of entry words */
|
||||
u16 entry_width; /* Entry width (in bits) */
|
||||
u16 action_count; /* Action count */
|
||||
u16 action_words; /* Number of action words */
|
||||
u16 action_width; /* Action width (in bits) */
|
||||
u16 action_type_width; /* Action type width (in bits) */
|
||||
struct {
|
||||
u16 width; /* Action type width (in bits) */
|
||||
u16 count; /* Action type sub word count */
|
||||
} action_table[2];
|
||||
u16 counter_words; /* Number of counter words */
|
||||
u16 counter_width; /* Counter width (in bits) */
|
||||
};
|
||||
|
||||
/* VCAP Type-Group values */
|
||||
#define VCAP_TG_NONE 0 /* Entry is invalid */
|
||||
#define VCAP_TG_FULL 1 /* Full entry */
|
||||
@@ -22,11 +46,6 @@
|
||||
* =================================================================
|
||||
*/
|
||||
|
||||
#define VCAP_IS2_CNT 64
|
||||
#define VCAP_IS2_ENTRY_WIDTH 376
|
||||
#define VCAP_IS2_ACTION_WIDTH 99
|
||||
#define VCAP_PORT_CNT 11
|
||||
|
||||
/* IS2 half key types */
|
||||
#define IS2_TYPE_ETYPE 0
|
||||
#define IS2_TYPE_LLC 1
|
||||
@@ -42,9 +61,11 @@
|
||||
/* IS2 half key type mask for matching any IP */
|
||||
#define IS2_TYPE_MASK_IP_ANY 0xe
|
||||
|
||||
/* IS2 action types */
|
||||
#define IS2_ACTION_TYPE_NORMAL 0
|
||||
#define IS2_ACTION_TYPE_SMAC_SIP 1
|
||||
enum {
|
||||
IS2_ACTION_TYPE_NORMAL,
|
||||
IS2_ACTION_TYPE_SMAC_SIP,
|
||||
IS2_ACTION_TYPE_MAX,
|
||||
};
|
||||
|
||||
/* IS2 MASK_MODE values */
|
||||
#define IS2_ACT_MASK_MODE_NONE 0
|
||||
|
||||
Reference in New Issue
Block a user