mlxsw: switchx2: Add Infiniband switch partition
authorElad Raz <eladr@mellanox.com>
Fri, 28 Oct 2016 19:35:56 +0000 (21:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Oct 2016 20:50:17 +0000 (16:50 -0400)
In order to put a port in Infiniband fabric it should be assigned
to separate swid (Switch partition) that initialized as IB swid.

Signed-off-by: Elad Raz <eladr@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/port.h
drivers/net/ethernet/mellanox/mlxsw/switchx2.c

index af371a82c35ba82e284d5b687dcf655e1ae84b50..7296071377380ccbdf63822f516ed85ce106bd4f 100644 (file)
@@ -44,6 +44,7 @@
 
 #define MLXSW_PORT_SWID_DISABLED_PORT  255
 #define MLXSW_PORT_SWID_ALL_SWIDS      254
+#define MLXSW_PORT_SWID_TYPE_IB                1
 #define MLXSW_PORT_SWID_TYPE_ETH       2
 
 #define MLXSW_PORT_MID                 0xd000
index 8eac26f42425d58305ead24886af11486dd945b5..a905589263d97de400ebb1680b8798484c19a0ad 100644 (file)
@@ -1590,13 +1590,17 @@ static struct mlxsw_config_profile mlxsw_sx_config_profile = {
        .used_flood_mode                = 1,
        .flood_mode                     = 3,
        .used_max_ib_mc                 = 1,
-       .max_ib_mc                      = 0,
+       .max_ib_mc                      = 6,
        .used_max_pkey                  = 1,
        .max_pkey                       = 0,
        .swid_config                    = {
                {
                        .used_type      = 1,
                        .type           = MLXSW_PORT_SWID_TYPE_ETH,
+               },
+               {
+                       .used_type      = 1,
+                       .type           = MLXSW_PORT_SWID_TYPE_IB,
                }
        },
        .resource_query_enable          = 0,