Lines Matching full:lag
2551 /* In DDD mode, which we by default use, each LAG entry is 8 PGT in mlxsw_sp_lag_pgt_init()
2552 * entries. The LAG table address needs to be 8-aligned, but that ought in mlxsw_sp_lag_pgt_init()
2553 * to be the case, since the LAG table is allocated first. in mlxsw_sp_lag_pgt_init()
3028 /* Initialize before FIDs so that the LAG table is at the start of PGT in mlxsw_sp_init()
3033 dev_err(mlxsw_sp->bus_info->dev, "Failed to initialize LAG\n"); in mlxsw_sp_init()
4113 struct mlxsw_sp_lag *lag; in mlxsw_sp_lag_create() local
4124 "Exceeded number of supported LAG devices"); in mlxsw_sp_lag_create()
4134 lag = &mlxsw_sp->lags[lag_id]; in mlxsw_sp_lag_create()
4135 lag->lag_id = lag_id; in mlxsw_sp_lag_create()
4136 lag->dev = lag_dev; in mlxsw_sp_lag_create()
4137 refcount_set(&lag->ref_count, 1); in mlxsw_sp_lag_create()
4139 return lag; in mlxsw_sp_lag_create()
4143 mlxsw_sp_lag_destroy(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_lag *lag) in mlxsw_sp_lag_destroy() argument
4147 lag->dev = NULL; in mlxsw_sp_lag_destroy()
4149 mlxsw_reg_sldr_lag_destroy_pack(sldr_pl, lag->lag_id); in mlxsw_sp_lag_destroy()
4217 struct mlxsw_sp_lag *lag; in mlxsw_sp_lag_get() local
4219 lag = mlxsw_sp_lag_find(mlxsw_sp, lag_dev); in mlxsw_sp_lag_get()
4220 if (lag) { in mlxsw_sp_lag_get()
4221 refcount_inc(&lag->ref_count); in mlxsw_sp_lag_get()
4222 return lag; in mlxsw_sp_lag_get()
4229 mlxsw_sp_lag_put(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_lag *lag) in mlxsw_sp_lag_put() argument
4231 if (!refcount_dec_and_test(&lag->ref_count)) in mlxsw_sp_lag_put()
4234 mlxsw_sp_lag_destroy(mlxsw_sp, lag); in mlxsw_sp_lag_put()
4244 NL_SET_ERR_MSG_MOD(extack, "LAG device using unsupported Tx type"); in mlxsw_sp_master_lag_check()
4354 struct mlxsw_sp_lag *lag; in mlxsw_sp_port_lag_join() local
4359 lag = mlxsw_sp_lag_get(mlxsw_sp, lag_dev, extack); in mlxsw_sp_port_lag_join()
4360 if (IS_ERR(lag)) in mlxsw_sp_port_lag_join()
4361 return PTR_ERR(lag); in mlxsw_sp_port_lag_join()
4363 lag_id = lag->lag_id; in mlxsw_sp_port_lag_join()
4390 /* Join a router interface configured on the LAG, if exists */ in mlxsw_sp_port_lag_join()
4414 mlxsw_sp_lag_put(mlxsw_sp, lag); in mlxsw_sp_port_lag_join()
4423 struct mlxsw_sp_lag *lag; in mlxsw_sp_port_lag_leave() local
4427 lag = &mlxsw_sp->lags[lag_id]; in mlxsw_sp_port_lag_leave()
4434 /* Make the LAG and its directly linked uppers leave bridges they in mlxsw_sp_port_lag_leave()
4441 mlxsw_sp_lag_put(mlxsw_sp, lag); in mlxsw_sp_port_lag_leave()
4689 /* upper_info is relevant for LAG devices. But we would in mlxsw_sp_netdevice_validate_uppers()
4690 * only need this if LAG were a valid upper above in mlxsw_sp_netdevice_validate_uppers()
4692 * LAG), and that is never a valid configuration. So we in mlxsw_sp_netdevice_validate_uppers()
4765 NL_SET_ERR_MSG_MOD(extack, "Master device is a LAG master and this device has a VLAN"); in mlxsw_sp_netdevice_port_upper_event()
4770 NL_SET_ERR_MSG_MOD(extack, "Can not put a VLAN on a LAG port"); in mlxsw_sp_netdevice_port_upper_event()
4912 /* Called for LAG or its upper VLAN after the per-LAG-lower processing was done,
4913 * to do any per-LAG / per-LAG-upper processing.