/openbmc/linux/drivers/net/ethernet/intel/ice/ |
H A D | ice_lag.c | 26 * ice_lag_set_primary - set PF LAG state as Primary 27 * @lag: LAG info struct 29 static void ice_lag_set_primary(struct ice_lag *lag) in ice_lag_set_primary() argument 31 struct ice_pf *pf = lag->pf; in ice_lag_set_primary() 36 if (lag->role != ICE_LAG_UNSET && lag->role != ICE_LAG_BACKUP) { in ice_lag_set_primary() 38 netdev_name(lag->netdev)); in ice_lag_set_primary() 42 lag->role = ICE_LAG_PRIMARY; in ice_lag_set_primary() 46 * ice_lag_set_backup - set PF LAG state to Backup 47 * @lag: LAG info struct 49 static void ice_lag_set_backup(struct ice_lag *lag) in ice_lag_set_backup() argument [all …]
|
H A D | ice_lag.h | 9 /* LAG roles for netdev */ 29 /* LAG info struct */ 47 /* LAG workqueue struct */ 51 struct ice_lag *lag; member 66 void ice_lag_move_vf_nodes_cfg(struct ice_lag *lag, u8 src_prt, u8 dst_prt);
|
H A D | ice_dcb_nl.c | 73 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setets() 178 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setdcbx() 274 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setpfc() 341 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_set_pfc_cfg() 402 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setstate() 479 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_set_pg_tc_cfg_tx() 538 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_set_pg_bwg_cfg_tx() 763 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setapp() 879 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_delapp() 985 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_cee_set_all()
|
/openbmc/linux/drivers/net/ethernet/netronome/nfp/flower/ |
H A D | lag_conf.c | 6 /* LAG group config flags. */ 15 /* LAG port state flags. */ 27 * struct nfp_flower_cmsg_lag_config - control message payload for LAG config 49 * struct nfp_fl_lag_group - list entry for each LAG group 86 static unsigned int nfp_fl_get_next_pkt_number(struct nfp_fl_lag *lag) in nfp_fl_get_next_pkt_number() argument 88 lag->pkt_num++; in nfp_fl_get_next_pkt_number() 89 lag->pkt_num &= NFP_FL_LAG_PKT_NUMBER_MASK; in nfp_fl_get_next_pkt_number() 91 return lag->pkt_num; in nfp_fl_get_next_pkt_number() 94 static void nfp_fl_increment_version(struct nfp_fl_lag *lag) in nfp_fl_increment_version() argument 97 lag->batch_ver += 2; in nfp_fl_increment_version() [all …]
|
H A D | main.h | 109 * struct nfp_tun_neigh_lag - lag info 110 * @lag_version: lag version 111 * @lag_instance: lag instance 148 * @lag: lag port info 155 struct nfp_tun_neigh_lag lag; member 164 * @lag: lag port info 171 struct nfp_tun_neigh_lag lag; member 229 * @rst_cfg: Marker to reset HW LAG config 363 * @lag_port_flags: Extended port flags to record lag state of repr 655 void nfp_flower_lag_init(struct nfp_fl_lag *lag); [all …]
|
/openbmc/linux/drivers/net/ethernet/microchip/lan966x/ |
H A D | lan966x_lag.c | 10 int p, lag, i; in lan966x_lag_set_aggr_pgids() local 25 * port ID == LAG ID. So we mark as visited all further ports in the in lan966x_lag_set_aggr_pgids() 38 /* Now, set PGIDs for each active LAG */ in lan966x_lag_set_aggr_pgids() 39 for (lag = 0; lag < lan966x->num_phys_ports; ++lag) { in lan966x_lag_set_aggr_pgids() 40 struct lan966x_port *port = lan966x->ports[lag]; in lan966x_lag_set_aggr_pgids() 46 if (!port || !port->bond || (visited & BIT(lag))) in lan966x_lag_set_aggr_pgids() 78 /* Mark all ports in the same LAG as visited to avoid applying in lan966x_lag_set_aggr_pgids() 81 for (p = lag; p < lan966x->num_phys_ports; p++) { in lan966x_lag_set_aggr_pgids() 224 "LAG device using unsupported Tx type"); in lan966x_lag_port_prechangeupper() 230 "LAG devices can have only the same hash_type"); in lan966x_lag_port_prechangeupper() [all …]
|
/openbmc/linux/drivers/net/ethernet/marvell/prestera/ |
H A D | prestera_main.c | 618 port->lag = NULL; in prestera_port_create() 877 struct prestera_lag *lag; in prestera_lag_by_dev() local 881 lag = &sw->lags[id]; in prestera_lag_by_dev() 882 if (lag->dev == dev) in prestera_lag_by_dev() 883 return lag; in prestera_lag_by_dev() 892 struct prestera_lag *lag; in prestera_lag_id() local 897 lag = prestera_lag_by_id(sw, id); in prestera_lag_id() 898 if (lag->member_count) { in prestera_lag_id() 899 if (lag->dev == lag_dev) { in prestera_lag_id() 916 struct prestera_lag *lag = NULL; in prestera_lag_create() local [all …]
|
/openbmc/linux/tools/testing/selftests/drivers/net/mlxsw/ |
H A D | rif_bridge.sh | 92 log_test "Drop RIF for bridge on LAG deslavement" 108 log_test "Add RIF for bridge on LAG reenslavement" 115 # Adding an address while the LAG is enslaved shouldn't generate a RIF. 124 # Removing the LAG from the bridge should drop RIF for the bridge (as 125 # tested in bridge_rif_lag_nomaster), but since the LAG now has an 135 log_test "Add RIF for LAG on deslavement from bridge" 155 log_test "Drop RIF for bridge on deslavement of port from LAG" 173 log_test "Add RIF for bridge on reenslavement of port to LAG"
|
H A D | rif_lag.sh | 64 log_test "Add RIF for LAG on address addition" 80 log_test "Drop RIF for LAG on port deslavement" 98 log_test "Add RIF for LAG on port reenslavement" 105 # Adding an address while the port is LAG'd shouldn't generate a RIF. 114 # Removing the port from LAG should drop RIF for the LAG (as tested in 126 log_test "Add RIF for port on deslavement from LAG"
|
H A D | rif_lag_vlan.sh | 74 log_test "Add RIFs for LAG VLANs on address addition" 90 log_test "Drop RIFs for LAG VLANs on port deslavement" 108 log_test "Add RIFs for LAG VLANs on port reenslavement" 115 # Adding an address while the port is LAG'd shouldn't generate a RIF. 124 # Removing the port from LAG should drop two RIFs for the LAG VLANs (as 136 log_test "Add RIF for port on deslavement from LAG"
|
H A D | q_in_q_veto.sh | 121 check_fail $? "802.1ad vlan upper creation on top of a lag not rejected" 126 check_err $? "802.1ad vlan upper creation on top of a lag rejected without extack" 128 log_test "create 802.1ad vlan upper on top of a lag" 192 check_fail $? "vlan upper creation on top of lag enslaved to 802.1ad bridge not rejected" 196 check_err $? "vlan upper creation on top of lag enslaved to 802.1ad bridge rejected without extack" 198 log_test "create vlan upper on top of lag enslaved to 802.1ad bridge" 242 check_fail $? "lag with vlan upper enslavemnt to 802.1ad bridge not rejected" 246 check_err $? "lag with vlan upper enslavemnt to 802.1ad bridge rejected without extack" 248 log_test "enslave lag with vlan upper to 802.1ad bridge"
|
H A D | rtnetlink.sh | 201 # ("mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG") for more 301 check_err $? "subport rif was not created on lag device" 309 check_err $? "subport rif of lag device was destroyed when should not" 317 check_err $? "subport rif of lag device was not destroyed when should" 330 # Test that the reference count of a RIF configured for a LAG is 331 # incremented / decremented when ports join / leave the LAG. We use the 347 check_err $? "subport rif was not created on lag device" 352 check_err $? "subport rif of lag device was destroyed after removing one port" 358 check_err $? "subport rif of lag device was destroyed after re-adding a port and removing another" 363 check_err $? "subport rif of lag device was not destroyed when should" [all …]
|
/openbmc/linux/net/dsa/ |
H A D | switch.c | 354 static int dsa_switch_do_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag *lag, in dsa_switch_do_lag_fdb_add() argument 361 mutex_lock(&lag->fdb_lock); in dsa_switch_do_lag_fdb_add() 363 a = dsa_mac_addr_find(&lag->fdbs, addr, vid, db); in dsa_switch_do_lag_fdb_add() 366 trace_dsa_lag_fdb_add_bump(lag->dev, addr, vid, &db, in dsa_switch_do_lag_fdb_add() 377 err = ds->ops->lag_fdb_add(ds, *lag, addr, vid, db); in dsa_switch_do_lag_fdb_add() 378 trace_dsa_lag_fdb_add_hw(lag->dev, addr, vid, &db, err); in dsa_switch_do_lag_fdb_add() 388 list_add_tail(&a->list, &lag->fdbs); in dsa_switch_do_lag_fdb_add() 391 mutex_unlock(&lag->fdb_lock); in dsa_switch_do_lag_fdb_add() 396 static int dsa_switch_do_lag_fdb_del(struct dsa_switch *ds, struct dsa_lag *lag, in dsa_switch_do_lag_fdb_del() argument 403 mutex_lock(&lag->fdb_lock); in dsa_switch_do_lag_fdb_del() [all …]
|
H A D | port.c | 406 * for example, when a port leaves a LAG that offloads the bridge, in dsa_port_switchdev_unsync_attrs() 593 if (!dp->lag) in dsa_port_lag_change() 615 struct dsa_lag *lag; in dsa_port_lag_create() local 617 lag = dsa_tree_lag_find(ds->dst, lag_dev); in dsa_port_lag_create() 618 if (lag) { in dsa_port_lag_create() 619 refcount_inc(&lag->refcount); in dsa_port_lag_create() 620 dp->lag = lag; in dsa_port_lag_create() 624 lag = kzalloc(sizeof(*lag), GFP_KERNEL); in dsa_port_lag_create() 625 if (!lag) in dsa_port_lag_create() 628 refcount_set(&lag->refcount, 1); in dsa_port_lag_create() [all …]
|
H A D | trace.c | 15 sprintf(buf, "lag %s id %d", db->lag.dev->name, db->lag.id); in dsa_db_print()
|
H A D | dsa.c | 54 * dsa_lag_map() - Map LAG structure to a linear LAG array 56 * @lag: LAG structure that is to be mapped to the tree's array. 64 void dsa_lag_map(struct dsa_switch_tree *dst, struct dsa_lag *lag) in dsa_lag_map() argument 70 dst->lags[id - 1] = lag; in dsa_lag_map() 71 lag->id = id; in dsa_lag_map() 78 * returns an error for this device when joining the LAG. The in dsa_lag_map() 80 * fall back to a software LAG. in dsa_lag_map() 85 * dsa_lag_unmap() - Remove a LAG ID mapping 87 * @lag: LAG structure that was mapped. 92 void dsa_lag_unmap(struct dsa_switch_tree *dst, struct dsa_lag *lag) in dsa_lag_unmap() argument [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | pci_hw.h | 141 * Packet arrives from a port which is a LAG 143 MLXSW_ITEM32(pci, cqe0, lag, 0x00, 23, 1); 144 MLXSW_ITEM32(pci, cqe12, lag, 0x00, 24, 1); 145 mlxsw_pci_cqe_item_helpers(lag, 0, 12, 12); 148 * When lag=0: System port on which the packet was received 149 * When lag=1: 150 * bits [15:4] LAG ID on which the packet was received 245 * The Tx port of a packet that is mirrored / sampled to the CPU is a LAG. 250 * The port index within the LAG of a packet that is mirrored / sampled to the 259 * The Tx LAG ID of the original packet that is mirrored / sampled to the CPU. [all …]
|
/openbmc/linux/drivers/net/dsa/qca/ |
H A D | qca8k-common.c | 1043 struct dsa_lag lag, in qca8k_lag_can_offload() argument 1050 if (!lag.id) in qca8k_lag_can_offload() 1053 dsa_lag_foreach_port(dp, ds->dst, &lag) in qca8k_lag_can_offload() 1054 /* Includes the port joining the LAG */ in qca8k_lag_can_offload() 1059 "Cannot offload more than 4 LAG ports"); in qca8k_lag_can_offload() 1065 "Can only offload LAG using hash TX type"); in qca8k_lag_can_offload() 1080 struct dsa_lag lag, in qca8k_lag_setup_hash() argument 1083 struct net_device *lag_dev = lag.dev; in qca8k_lag_setup_hash() 1102 /* Check if we are the unique configured LAG */ in qca8k_lag_setup_hash() 1104 if (i != lag.id && dsa_lag_by_id(ds->dst, i)) { in qca8k_lag_setup_hash() [all …]
|
/openbmc/linux/Documentation/networking/dsa/ |
H A D | configuration.rst | 383 This can be achieved by placing the DSA masters under a LAG interface (bonding 384 or team). DSA monitors this operation and creates a mirror of this software LAG 385 on the CPU ports facing the physical DSA masters that constitute the LAG slave 399 information, or a LAG interface which contains only slaves which are valid 417 # CPU ports in LAG, using explicit assignment of the DSA master 429 # CPU ports in LAG, relying on implicit migration of the DSA master 437 Notice that in the case of CPU ports under a LAG, the use of the 447 static user to CPU port assignment with LAG between DSA masters. It is not 449 upper interfaces (this includes LAG devices - the master must always be the LAG 455 Physical DSA masters are allowed to join and leave at any time a LAG interface [all …]
|
H A D | dsa.rst | 306 When using multiple CPU ports, it is possible to stack a LAG (bonding/team) 307 device between the DSA slave devices and the physical DSA masters. The LAG 308 device is thus also a DSA master, but the LAG slave devices continue to be DSA 310 recovery in case the LAG DSA master disappears). Thus, the data path of the LAG 313 LAG slave). Therefore, the RX data path of the LAG DSA master is not used. 315 ``dsa_enqueue_skb``, which calls ``dev_queue_xmit`` towards the LAG DSA master. 655 master->dsa_ptr``. Additionally, the master can also be a LAG device where 656 all the slave devices are physical DSA masters. LAG DSA masters also have a 658 duplicate of the first physical DSA master's (LAG slave) ``dsa_ptr``. In case 659 of a LAG DSA master, a further call to ``port_lag_join`` will be emitted [all …]
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | Makefile | 17 fs_counters.o fs_ft_pool.o rl.o lag/debugfs.o lag/lag.o dev.o events.o wq.o lib/gid.o \ 41 mlx5_core-$(CONFIG_MLX5_ESWITCH) += lag/mp.o lag/port_sel.o lib/geneve.o lib/port_tun.o \ 43 en/mapping.o lag/mpesw.o
|
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/lag/ |
H A D | lag.c | 42 #include "lag.h" 204 mlx5_core_info(dev, "lag map active ports: %s\n", buf); in mlx5_lag_print_mapping() 216 mlx5_core_info(dev, "lag map:%s\n", buf); in mlx5_lag_print_mapping() 269 mlx5_core_err(dev, "Failed to register LAG netdev notifier\n"); in mlx5_lag_dev_alloc() 275 mlx5_core_err(dev, "Failed to init multipath lag err=%d\n", in mlx5_lag_dev_alloc() 410 "Failed to create lag drop rule, error: %d", err); in mlx5_lag_drop_rule_setup() 468 "Failed to modify LAG (%d)\n", in mlx5_modify_lag() 597 "Failed to create LAG (%d)\n", in mlx5_create_lag() 614 "Failed to deactivate RoCE LAG; driver restart required\n"); in mlx5_create_lag() 641 "Failed to create LAG port selection(%d)\n", in mlx5_activate_lag() [all …]
|
H A D | mpesw.c | 6 #include "lag/lag.h" 95 mlx5_core_warn(dev0, "Failed to create LAG in MPESW mode (%d)\n", err); in enable_mpesw() 132 struct mlx5_lag *ldev = mpesww->lag; in mlx5_mpesw_work() 168 work->lag = ldev; in mlx5_lag_mpesw_queue_work()
|
/openbmc/linux/include/net/ |
H A D | dsa.h | 135 /* Maps offloaded LAG netdevs to a zero-based linear ID for 167 /* LAG IDs are one-based, the dst->lags array is zero-based */ 183 /* DSA LAG IDs are one-based, dst->lags is zero-based */ in dsa_lag_by_id() 193 struct dsa_lag *lag = dsa_lag_by_id(dst, id); in dsa_lag_id() local 195 if (lag->dev == lag_dev) in dsa_lag_id() 196 return lag->id; in dsa_lag_id() 300 struct dsa_lag *lag; member 352 struct dsa_lag lag; member 474 * offloaded LAG should set this to the maximum number of 702 return dp->lag ? dp->lag->id : 0; in dsa_port_lag_id_get() [all …]
|
/openbmc/linux/tools/testing/selftests/net/forwarding/ |
H A D | mirror_gre_bridge_1q_lag.sh | 26 # | | + lag (team) 192.0.2.129/28 | | 146 team_create lag loadbalance $swp3 $swp4 147 ip link set dev lag master br1 156 ip link set dev lag nomaster 157 team_destroy lag 260 test_lag_slave $h3 $swp3 $swp4 "mirror to gretap: LAG first slave" 265 test_lag_slave $h4 $swp4 $swp3 "mirror to gretap: LAG second slave"
|