[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1474363017-2901-9-git-send-email-jiri@resnulli.us>
Date: Tue, 20 Sep 2016 11:16:56 +0200
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, nogahf@...lanox.com, idosch@...lanox.com,
eladr@...lanox.com, yotamg@...lanox.com, ogerlitz@...lanox.com
Subject: [patch net-next 8/9] mlxsw: pci: Add max router interface resource
From: Nogah Frankel <nogahf@...lanox.com>
Add the max number of rif (router interfaces) to resource query.
Signed-off-by: Nogah Frankel <nogahf@...lanox.com>
Reviewed-by: Ido Schimmel <idosch@...lanox.com>
Signed-off-by: Jiri Pirko <jiri@...lanox.com>
---
drivers/net/ethernet/mellanox/mlxsw/core.h | 4 +++-
drivers/net/ethernet/mellanox/mlxsw/pci.c | 5 +++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.h b/drivers/net/ethernet/mellanox/mlxsw/core.h
index 097e560..c4f550b 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.h
@@ -276,7 +276,8 @@ struct mlxsw_resources {
max_virtual_routers_valid:1,
max_system_ports_valid:1,
max_vlan_groups_valid:1,
- max_regions_valid:1;
+ max_regions_valid:1,
+ max_rif_valid:1;
u8 max_span;
u8 max_lag;
u8 max_ports_in_lag;
@@ -287,6 +288,7 @@ struct mlxsw_resources {
u16 max_system_ports;
u16 max_vlan_groups;
u16 max_regions;
+ u16 max_rif;
/* Internal resources.
* Determined by the SW, not queried from the HW.
diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c
index 826b502..e742bd4 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c
@@ -1165,6 +1165,7 @@ mlxsw_pci_config_profile_swid_config(struct mlxsw_pci *mlxsw_pci,
#define MLXSW_MAX_SYSTEM_PORT_ID 0x2502
#define MLXSW_MAX_VLAN_GROUPS_ID 0x2906
#define MLXSW_MAX_REGIONS_ID 0x2901
+#define MLXSW_MAX_RIF_ID 0x2C02
#define MLXSW_RESOURCES_QUERY_MAX_QUERIES 100
#define MLXSW_RESOURCES_PER_QUERY 32
@@ -1212,6 +1213,10 @@ static void mlxsw_pci_resources_query_parse(int id, u64 val,
resources->max_regions = val;
resources->max_regions_valid = 1;
break;
+ case MLXSW_MAX_RIF_ID:
+ resources->max_rif = val;
+ resources->max_rif_valid = 1;
+ break;
default:
break;
}
--
2.5.5
Powered by blists - more mailing lists