@@ -71,7 +71,7 @@ static const struct rhashtable_params mlxsw_sp_fid_vni_ht_params = {
71
71
72
72
struct mlxsw_sp_flood_table {
73
73
enum mlxsw_sp_flood_type packet_type ;
74
- enum mlxsw_flood_table_type table_type ;
74
+ enum mlxsw_flood_table_type table_type ; /* For flood_mode!=CFF. */
75
75
int table_index ;
76
76
};
77
77
@@ -109,7 +109,7 @@ struct mlxsw_sp_fid_family {
109
109
enum mlxsw_sp_rif_type rif_type ;
110
110
const struct mlxsw_sp_fid_ops * ops ;
111
111
struct mlxsw_sp * mlxsw_sp ;
112
- bool flood_rsp ;
112
+ bool flood_rsp ; /* For flood_mode!=CFF. */
113
113
enum mlxsw_reg_bridge_type bridge_type ;
114
114
u16 pgt_base ;
115
115
bool smpe_index_valid ;
@@ -1068,7 +1068,7 @@ mlxsw_sp_fid_8021d_vid_to_fid_rif_update(const struct mlxsw_sp_fid *fid,
1068
1068
return 0 ;
1069
1069
}
1070
1070
1071
- static const struct mlxsw_sp_fid_ops mlxsw_sp_fid_8021d_ops = {
1071
+ static const struct mlxsw_sp_fid_ops mlxsw_sp_fid_8021d_ops_ctl = {
1072
1072
.setup = mlxsw_sp_fid_8021d_setup ,
1073
1073
.configure = mlxsw_sp_fid_8021d_configure ,
1074
1074
.deconfigure = mlxsw_sp_fid_8021d_deconfigure ,
@@ -1120,8 +1120,10 @@ mlxsw_sp_fid_8021q_fdb_clear_offload(const struct mlxsw_sp_fid *fid,
1120
1120
br_fdb_clear_offload (nve_dev , mlxsw_sp_fid_8021q_vid (fid ));
1121
1121
}
1122
1122
1123
- static void mlxsw_sp_fid_rfid_setup (struct mlxsw_sp_fid * fid , const void * arg )
1123
+ static void mlxsw_sp_fid_rfid_setup_ctl (struct mlxsw_sp_fid * fid ,
1124
+ const void * arg )
1124
1125
{
1126
+ /* In controlled mode, the FW takes care of FID placement. */
1125
1127
fid -> fid_offset = 0 ;
1126
1128
}
1127
1129
@@ -1248,8 +1250,8 @@ mlxsw_sp_fid_rfid_vid_to_fid_rif_update(const struct mlxsw_sp_fid *fid,
1248
1250
return 0 ;
1249
1251
}
1250
1252
1251
- static const struct mlxsw_sp_fid_ops mlxsw_sp_fid_rfid_ops = {
1252
- .setup = mlxsw_sp_fid_rfid_setup ,
1253
+ static const struct mlxsw_sp_fid_ops mlxsw_sp_fid_rfid_ops_ctl = {
1254
+ .setup = mlxsw_sp_fid_rfid_setup_ctl ,
1253
1255
.configure = mlxsw_sp_fid_rfid_configure ,
1254
1256
.deconfigure = mlxsw_sp_fid_rfid_deconfigure ,
1255
1257
.index_alloc = mlxsw_sp_fid_rfid_index_alloc ,
@@ -1405,7 +1407,7 @@ mlxsw_sp_fid_8021q_port_vid_unmap(struct mlxsw_sp_fid *fid,
1405
1407
__mlxsw_sp_fid_port_vid_map (fid , local_port , vid , false);
1406
1408
}
1407
1409
1408
- static const struct mlxsw_sp_fid_ops mlxsw_sp_fid_8021q_ops = {
1410
+ static const struct mlxsw_sp_fid_ops mlxsw_sp_fid_8021q_ops_ctl = {
1409
1411
.setup = mlxsw_sp_fid_8021q_setup ,
1410
1412
.configure = mlxsw_sp_fid_8021q_configure ,
1411
1413
.deconfigure = mlxsw_sp_fid_8021q_deconfigure ,
@@ -1447,7 +1449,7 @@ static const struct mlxsw_sp_fid_family mlxsw_sp1_fid_8021q_family = {
1447
1449
.flood_tables = mlxsw_sp_fid_8021d_flood_tables ,
1448
1450
.nr_flood_tables = ARRAY_SIZE (mlxsw_sp_fid_8021d_flood_tables ),
1449
1451
.rif_type = MLXSW_SP_RIF_TYPE_VLAN ,
1450
- .ops = & mlxsw_sp_fid_8021q_ops ,
1452
+ .ops = & mlxsw_sp_fid_8021q_ops_ctl ,
1451
1453
.flood_rsp = false,
1452
1454
.bridge_type = MLXSW_REG_BRIDGE_TYPE_0 ,
1453
1455
.smpe_index_valid = false,
@@ -1461,7 +1463,7 @@ static const struct mlxsw_sp_fid_family mlxsw_sp1_fid_8021d_family = {
1461
1463
.flood_tables = mlxsw_sp_fid_8021d_flood_tables ,
1462
1464
.nr_flood_tables = ARRAY_SIZE (mlxsw_sp_fid_8021d_flood_tables ),
1463
1465
.rif_type = MLXSW_SP_RIF_TYPE_FID ,
1464
- .ops = & mlxsw_sp_fid_8021d_ops ,
1466
+ .ops = & mlxsw_sp_fid_8021d_ops_ctl ,
1465
1467
.bridge_type = MLXSW_REG_BRIDGE_TYPE_1 ,
1466
1468
.smpe_index_valid = false,
1467
1469
};
@@ -1475,13 +1477,13 @@ static const struct mlxsw_sp_fid_family mlxsw_sp1_fid_dummy_family = {
1475
1477
.smpe_index_valid = false,
1476
1478
};
1477
1479
1478
- static const struct mlxsw_sp_fid_family mlxsw_sp_fid_rfid_family = {
1480
+ static const struct mlxsw_sp_fid_family mlxsw_sp_fid_rfid_family_ctl = {
1479
1481
.type = MLXSW_SP_FID_TYPE_RFID ,
1480
1482
.fid_size = sizeof (struct mlxsw_sp_fid ),
1481
1483
.start_index = MLXSW_SP_RFID_START ,
1482
1484
.end_index = MLXSW_SP_RFID_END ,
1483
1485
.rif_type = MLXSW_SP_RIF_TYPE_SUBPORT ,
1484
- .ops = & mlxsw_sp_fid_rfid_ops ,
1486
+ .ops = & mlxsw_sp_fid_rfid_ops_ctl ,
1485
1487
.flood_rsp = true,
1486
1488
.smpe_index_valid = false,
1487
1489
};
@@ -1490,32 +1492,32 @@ static const struct mlxsw_sp_fid_family *mlxsw_sp1_fid_family_arr[] = {
1490
1492
[MLXSW_SP_FID_TYPE_8021Q ] = & mlxsw_sp1_fid_8021q_family ,
1491
1493
[MLXSW_SP_FID_TYPE_8021D ] = & mlxsw_sp1_fid_8021d_family ,
1492
1494
[MLXSW_SP_FID_TYPE_DUMMY ] = & mlxsw_sp1_fid_dummy_family ,
1493
- [MLXSW_SP_FID_TYPE_RFID ] = & mlxsw_sp_fid_rfid_family ,
1495
+ [MLXSW_SP_FID_TYPE_RFID ] = & mlxsw_sp_fid_rfid_family_ctl ,
1494
1496
};
1495
1497
1496
- static const struct mlxsw_sp_fid_family mlxsw_sp2_fid_8021q_family = {
1498
+ static const struct mlxsw_sp_fid_family mlxsw_sp2_fid_8021q_family_ctl = {
1497
1499
.type = MLXSW_SP_FID_TYPE_8021Q ,
1498
1500
.fid_size = sizeof (struct mlxsw_sp_fid_8021q ),
1499
1501
.start_index = MLXSW_SP_FID_8021Q_START ,
1500
1502
.end_index = MLXSW_SP_FID_8021Q_END ,
1501
1503
.flood_tables = mlxsw_sp_fid_8021d_flood_tables ,
1502
1504
.nr_flood_tables = ARRAY_SIZE (mlxsw_sp_fid_8021d_flood_tables ),
1503
1505
.rif_type = MLXSW_SP_RIF_TYPE_VLAN ,
1504
- .ops = & mlxsw_sp_fid_8021q_ops ,
1506
+ .ops = & mlxsw_sp_fid_8021q_ops_ctl ,
1505
1507
.flood_rsp = false,
1506
1508
.bridge_type = MLXSW_REG_BRIDGE_TYPE_0 ,
1507
1509
.smpe_index_valid = true,
1508
1510
};
1509
1511
1510
- static const struct mlxsw_sp_fid_family mlxsw_sp2_fid_8021d_family = {
1512
+ static const struct mlxsw_sp_fid_family mlxsw_sp2_fid_8021d_family_ctl = {
1511
1513
.type = MLXSW_SP_FID_TYPE_8021D ,
1512
1514
.fid_size = sizeof (struct mlxsw_sp_fid_8021d ),
1513
1515
.start_index = MLXSW_SP_FID_8021D_START ,
1514
1516
.end_index = MLXSW_SP_FID_8021D_END ,
1515
1517
.flood_tables = mlxsw_sp_fid_8021d_flood_tables ,
1516
1518
.nr_flood_tables = ARRAY_SIZE (mlxsw_sp_fid_8021d_flood_tables ),
1517
1519
.rif_type = MLXSW_SP_RIF_TYPE_FID ,
1518
- .ops = & mlxsw_sp_fid_8021d_ops ,
1520
+ .ops = & mlxsw_sp_fid_8021d_ops_ctl ,
1519
1521
.bridge_type = MLXSW_REG_BRIDGE_TYPE_1 ,
1520
1522
.smpe_index_valid = true,
1521
1523
};
@@ -1529,11 +1531,11 @@ static const struct mlxsw_sp_fid_family mlxsw_sp2_fid_dummy_family = {
1529
1531
.smpe_index_valid = false,
1530
1532
};
1531
1533
1532
- static const struct mlxsw_sp_fid_family * mlxsw_sp2_fid_family_arr [] = {
1533
- [MLXSW_SP_FID_TYPE_8021Q ] = & mlxsw_sp2_fid_8021q_family ,
1534
- [MLXSW_SP_FID_TYPE_8021D ] = & mlxsw_sp2_fid_8021d_family ,
1534
+ static const struct mlxsw_sp_fid_family * mlxsw_sp2_fid_family_arr_ctl [] = {
1535
+ [MLXSW_SP_FID_TYPE_8021Q ] = & mlxsw_sp2_fid_8021q_family_ctl ,
1536
+ [MLXSW_SP_FID_TYPE_8021D ] = & mlxsw_sp2_fid_8021d_family_ctl ,
1535
1537
[MLXSW_SP_FID_TYPE_DUMMY ] = & mlxsw_sp2_fid_dummy_family ,
1536
- [MLXSW_SP_FID_TYPE_RFID ] = & mlxsw_sp_fid_rfid_family ,
1538
+ [MLXSW_SP_FID_TYPE_RFID ] = & mlxsw_sp_fid_rfid_family_ctl ,
1537
1539
};
1538
1540
1539
1541
static struct mlxsw_sp_fid * mlxsw_sp_fid_lookup (struct mlxsw_sp * mlxsw_sp ,
@@ -1877,12 +1879,12 @@ const struct mlxsw_sp_fid_core_ops mlxsw_sp1_fid_core_ops = {
1877
1879
.fini = mlxsw_sp_fids_fini ,
1878
1880
};
1879
1881
1880
- static int mlxsw_sp2_fids_init (struct mlxsw_sp * mlxsw_sp )
1882
+ static int mlxsw_sp2_fids_init_ctl (struct mlxsw_sp * mlxsw_sp )
1881
1883
{
1882
- return mlxsw_sp_fids_init (mlxsw_sp , mlxsw_sp2_fid_family_arr );
1884
+ return mlxsw_sp_fids_init (mlxsw_sp , mlxsw_sp2_fid_family_arr_ctl );
1883
1885
}
1884
1886
1885
1887
const struct mlxsw_sp_fid_core_ops mlxsw_sp2_fid_core_ops = {
1886
- .init = mlxsw_sp2_fids_init ,
1888
+ .init = mlxsw_sp2_fids_init_ctl ,
1887
1889
.fini = mlxsw_sp_fids_fini ,
1888
1890
};
0 commit comments