From: Jiri Pirko Date: Mon, 4 Jul 2016 06:23:06 +0000 (+0200) Subject: mlxsw: reg: Add Router Algorithmic LPM Structure Tree Register definition X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a9823359c6fd3f1322df8baf1f39c17b48690251;p=openwrt%2Fstaging%2Fblogic.git mlxsw: reg: Add Router Algorithmic LPM Structure Tree Register definition Serves to build LPM tree structure. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h index a358e1bf5378..4ea608fde0ad 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/reg.h +++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h @@ -3504,6 +3504,81 @@ static inline void mlxsw_reg_ralta_pack(char *payload, bool alloc, mlxsw_reg_ralta_tree_id_set(payload, tree_id); } +/* RALST - Router Algorithmic LPM Structure Tree Register + * ------------------------------------------------------ + * RALST is used to set and query the structure of an LPM tree. + * The structure of the tree must be sorted as a sorted binary tree, while + * each node is a bin that is tagged as the length of the prefixes the lookup + * will refer to. Therefore, bin X refers to a set of entries with prefixes + * of X bits to match with the destination address. The bin 0 indicates + * the default action, when there is no match of any prefix. + */ +#define MLXSW_REG_RALST_ID 0x8011 +#define MLXSW_REG_RALST_LEN 0x104 + +static const struct mlxsw_reg_info mlxsw_reg_ralst = { + .id = MLXSW_REG_RALST_ID, + .len = MLXSW_REG_RALST_LEN, +}; + +/* reg_ralst_root_bin + * The bin number of the root bin. + * 0