/Linux-v6.1/drivers/net/ethernet/intel/ice/ |
D | ice_lag.c | 10 * ice_lag_nop_handler - no-op Rx handler to disable LAG 19 * ice_lag_set_primary - set PF LAG state as Primary 20 * @lag: LAG info struct 22 static void ice_lag_set_primary(struct ice_lag *lag) in ice_lag_set_primary() argument 24 struct ice_pf *pf = lag->pf; in ice_lag_set_primary() 29 if (lag->role != ICE_LAG_UNSET && lag->role != ICE_LAG_BACKUP) { in ice_lag_set_primary() 31 netdev_name(lag->netdev)); in ice_lag_set_primary() 35 lag->role = ICE_LAG_PRIMARY; in ice_lag_set_primary() 39 * ice_lag_set_backup - set PF LAG state to Backup 40 * @lag: LAG info struct [all …]
|
D | ice_lag.h | 9 /* LAG roles for netdev */ 19 /* LAG info struct */ 41 * ice_disable_lag - increment LAG disable count 42 * @lag: LAG struct 44 static inline void ice_disable_lag(struct ice_lag *lag) in ice_disable_lag() argument 46 /* If LAG this PF is not already disabled, disable it */ in ice_disable_lag() 48 if (!netdev_is_rx_handler_busy(lag->netdev)) { in ice_disable_lag() 49 if (!netdev_rx_handler_register(lag->netdev, in ice_disable_lag() 52 lag->handler = true; in ice_disable_lag() 55 lag->dis_lag++; in ice_disable_lag() [all …]
|
/Linux-v6.1/drivers/net/ethernet/netronome/nfp/flower/ |
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 …]
|
/Linux-v6.1/drivers/net/ethernet/microchip/lan966x/ |
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 net_device *bond = lan966x->ports[lag]->bond; in lan966x_lag_set_aggr_pgids() 45 if (!bond || (visited & BIT(lag))) in lan966x_lag_set_aggr_pgids() 73 /* Mark all ports in the same LAG as visited to avoid applying in lan966x_lag_set_aggr_pgids() 76 for (p = lag; p < lan966x->num_phys_ports; p++) { in lan966x_lag_set_aggr_pgids() 219 "LAG device using unsupported Tx type"); in lan966x_lag_port_prechangeupper() 225 "LAG devices can have only the same hash_type"); in lan966x_lag_port_prechangeupper() [all …]
|
/Linux-v6.1/drivers/net/ethernet/marvell/prestera/ |
D | prestera_main.c | 625 port->lag = NULL; in prestera_port_create() 893 struct prestera_lag *lag; in prestera_lag_by_dev() local 897 lag = &sw->lags[id]; in prestera_lag_by_dev() 898 if (lag->dev == dev) in prestera_lag_by_dev() 899 return lag; in prestera_lag_by_dev() 908 struct prestera_lag *lag; in prestera_lag_id() local 913 lag = prestera_lag_by_id(sw, id); in prestera_lag_id() 914 if (lag->member_count) { in prestera_lag_id() 915 if (lag->dev == lag_dev) { in prestera_lag_id() 932 struct prestera_lag *lag = NULL; in prestera_lag_create() local [all …]
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/lag/ |
D | mpesw.c | 6 #include "lag/lag.h" 25 mlx5_core_warn(dev, "Failed to create LAG in MPESW mode (%d)\n", err); in add_mpesw_rule() 46 struct mlx5_lag *ldev = mpesww->lag; in mlx5_mpesw_work() 61 struct mlx5_lag *ldev = dev->priv.lag; in mlx5_lag_mpesw_queue_work() 75 work->lag = ldev; in mlx5_lag_mpesw_queue_work() 101 struct mlx5_lag *ldev = mdev->priv.lag; in mlx5_lag_do_mirred() 116 ret = dev->priv.lag && dev->priv.lag->mode == MLX5_LAG_MODE_MPESW; in mlx5_lag_mpesw_is_activated()
|
D | debugfs.c | 4 #include "lag.h" 25 ldev = dev->priv.lag; in type_show() 44 ldev = dev->priv.lag; in port_sel_mode_show() 64 ldev = dev->priv.lag; in state_show() 80 ldev = dev->priv.lag; in flags_show() 111 ldev = dev->priv.lag; in mapping_show() 145 ldev = dev->priv.lag; in members_show() 168 dbg = debugfs_create_dir("lag", mlx5_debugfs_get_dev_root(dev)); in mlx5_ldev_add_debugfs()
|
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() 411 "Failed to create lag drop rule, error: %d", err); in mlx5_lag_drop_rule_setup() 469 "Failed to modify LAG (%d)\n", in mlx5_modify_lag() 573 "Failed to create LAG (%d)\n", in mlx5_create_lag() 591 "Failed to deactivate RoCE LAG; driver restart required\n"); in mlx5_create_lag() 618 "Failed to create LAG port selection(%d)\n", in mlx5_activate_lag() [all …]
|
D | lag.h | 60 struct mlx5_lag *lag; member 66 /* LAG data of a ConnectX card. 85 /* Protect lag fields/state changes */ 103 return dev->priv.lag; in mlx5_lag_dev()
|
/Linux-v6.1/tools/testing/selftests/drivers/net/mlxsw/ |
D | q_in_q_veto.sh | 119 check_fail $? "802.1ad vlan upper creation on top of a lag not rejected" 124 check_err $? "802.1ad vlan upper creation on top of a lag rejected without extack" 126 log_test "create 802.1ad vlan upper on top of a lag" 188 check_fail $? "vlan upper creation on top of lag enslaved to 802.1ad bridge not rejected" 192 check_err $? "vlan upper creation on top of lag enslaved to 802.1ad bridge rejected without extack" 194 log_test "create vlan upper on top of lag enslaved to 802.1ad bridge" 236 check_fail $? "lag with vlan upper enslavemnt to 802.1ad bridge not rejected" 240 check_err $? "lag with vlan upper enslavemnt to 802.1ad bridge rejected without extack" 242 log_test "enslave lag with vlan upper to 802.1ad bridge"
|
D | rtnetlink.sh | 201 # ("mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG") for more 215 # Test that ports cannot be enslaved to LAG devices that have uppers 227 check_fail $? "managed to enslave port to lag when should not" 234 log_test "lag with bridge upper" 328 check_err $? "subport rif was not created on lag device" 336 check_err $? "subport rif of lag device was destroyed when should not" 344 check_err $? "subport rif of lag device was not destroyed when should" 357 # Test that the reference count of a RIF configured for a LAG is 358 # incremented / decremented when ports join / leave the LAG. We use the 374 check_err $? "subport rif was not created on lag device" [all …]
|
/Linux-v6.1/net/dsa/ |
D | switch.c | 318 static int dsa_switch_do_lag_fdb_add(struct dsa_switch *ds, struct dsa_lag *lag, in dsa_switch_do_lag_fdb_add() argument 325 mutex_lock(&lag->fdb_lock); in dsa_switch_do_lag_fdb_add() 327 a = dsa_mac_addr_find(&lag->fdbs, addr, vid, db); in dsa_switch_do_lag_fdb_add() 339 err = ds->ops->lag_fdb_add(ds, *lag, addr, vid, db); in dsa_switch_do_lag_fdb_add() 349 list_add_tail(&a->list, &lag->fdbs); in dsa_switch_do_lag_fdb_add() 352 mutex_unlock(&lag->fdb_lock); in dsa_switch_do_lag_fdb_add() 357 static int dsa_switch_do_lag_fdb_del(struct dsa_switch *ds, struct dsa_lag *lag, in dsa_switch_do_lag_fdb_del() argument 364 mutex_lock(&lag->fdb_lock); in dsa_switch_do_lag_fdb_del() 366 a = dsa_mac_addr_find(&lag->fdbs, addr, vid, db); in dsa_switch_do_lag_fdb_del() 375 err = ds->ops->lag_fdb_del(ds, *lag, addr, vid, db); in dsa_switch_do_lag_fdb_del() [all …]
|
D | port.c | 400 * for example, when a port leaves a LAG that offloads the bridge, in dsa_port_switchdev_unsync_attrs() 587 if (!dp->lag) in dsa_port_lag_change() 609 struct dsa_lag *lag; in dsa_port_lag_create() local 611 lag = dsa_tree_lag_find(ds->dst, lag_dev); in dsa_port_lag_create() 612 if (lag) { in dsa_port_lag_create() 613 refcount_inc(&lag->refcount); in dsa_port_lag_create() 614 dp->lag = lag; in dsa_port_lag_create() 618 lag = kzalloc(sizeof(*lag), GFP_KERNEL); in dsa_port_lag_create() 619 if (!lag) in dsa_port_lag_create() 622 refcount_set(&lag->refcount, 1); in dsa_port_lag_create() [all …]
|
D | dsa2.c | 76 * dsa_lag_map() - Map LAG structure to a linear LAG array 78 * @lag: LAG structure that is to be mapped to the tree's array. 86 void dsa_lag_map(struct dsa_switch_tree *dst, struct dsa_lag *lag) in dsa_lag_map() argument 92 dst->lags[id - 1] = lag; in dsa_lag_map() 93 lag->id = id; in dsa_lag_map() 100 * returns an error for this device when joining the LAG. The in dsa_lag_map() 102 * fall back to a software LAG. in dsa_lag_map() 107 * dsa_lag_unmap() - Remove a LAG ID mapping 109 * @lag: LAG structure that was mapped. 114 void dsa_lag_unmap(struct dsa_switch_tree *dst, struct dsa_lag *lag) in dsa_lag_unmap() argument [all …]
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlxsw/ |
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 …]
|
/Linux-v6.1/drivers/net/dsa/qca/ |
D | qca8k-common.c | 1019 struct dsa_lag lag, in qca8k_lag_can_offload() argument 1026 if (!lag.id) in qca8k_lag_can_offload() 1029 dsa_lag_foreach_port(dp, ds->dst, &lag) in qca8k_lag_can_offload() 1030 /* Includes the port joining the LAG */ in qca8k_lag_can_offload() 1035 "Cannot offload more than 4 LAG ports"); in qca8k_lag_can_offload() 1041 "Can only offload LAG using hash TX type"); in qca8k_lag_can_offload() 1056 struct dsa_lag lag, in qca8k_lag_setup_hash() argument 1059 struct net_device *lag_dev = lag.dev; in qca8k_lag_setup_hash() 1078 /* Check if we are the unique configured LAG */ in qca8k_lag_setup_hash() 1080 if (i != lag.id && dsa_lag_by_id(ds->dst, i)) { in qca8k_lag_setup_hash() [all …]
|
/Linux-v6.1/Documentation/networking/dsa/ |
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 …]
|
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 …]
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/ |
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
|
/Linux-v6.1/include/net/ |
D | dsa.h | 148 /* Maps offloaded LAG netdevs to a zero-based linear ID for 180 /* LAG IDs are one-based, the dst->lags array is zero-based */ 196 /* DSA LAG IDs are one-based, dst->lags is zero-based */ in dsa_lag_by_id() 206 struct dsa_lag *lag = dsa_lag_by_id(dst, id); in dsa_lag_id() local 208 if (lag->dev == lag_dev) in dsa_lag_id() 209 return lag->id; in dsa_lag_id() 313 struct dsa_lag *lag; member 362 struct dsa_lag lag; member 484 * offloaded LAG should set this to the maximum number of 712 return dp->lag ? dp->lag->id : 0; in dsa_port_lag_id_get() [all …]
|
/Linux-v6.1/tools/testing/selftests/net/forwarding/ |
D | mirror_gre_bridge_1q_lag.sh | 26 # | | + lag (team) 192.0.2.129/28 | | 145 team_create lag loadbalance $swp3 $swp4 146 ip link set dev lag master br1 155 ip link set dev lag nomaster 156 team_destroy lag 259 test_lag_slave $h3 $swp3 $swp4 "mirror to gretap: LAG first slave" 264 test_lag_slave $h4 $swp4 $swp3 "mirror to gretap: LAG second slave"
|
/Linux-v6.1/net/switchdev/ |
D | switchdev.c | 472 * towards a bridge or a LAG device. in __switchdev_handle_fdb_event_to_device() 479 /* Bridge ports might be either us, or LAG interfaces in __switchdev_handle_fdb_event_to_device() 495 /* Event is neither on a bridge nor a LAG. Check whether it is on an in __switchdev_handle_fdb_event_to_device() 559 /* Switch ports might be stacked under e.g. a LAG. Ignore the in __switchdev_handle_port_obj_add() 585 /* Event is neither on a bridge nor a LAG. Check whether it is on an in __switchdev_handle_port_obj_add() 608 * bridge or a LAG. 670 /* Switch ports might be stacked under e.g. a LAG. Ignore the in __switchdev_handle_port_obj_del() 696 /* Event is neither on a bridge nor a LAG. Check whether it is on an in __switchdev_handle_port_obj_del() 719 * bridge or a LAG. 781 /* Switch ports might be stacked under e.g. a LAG. Ignore the in __switchdev_handle_port_attr_set()
|
/Linux-v6.1/drivers/thermal/ |
D | hisi_thermal.c | 132 * The lag register contains 5 bits encoding the temperature in steps. 144 * For instance: the lag register is 5°C, the threshold is 65°C, when 148 * A very short lag can lead to an interrupt storm, a long lag 153 * [0:4] : lag register 205 * [0:6] lag register 348 /* setting lag value between current temp and the threshold */ in hi6220_thermal_enable_sensor() 374 /* setting lag value between current temp and the threshold */ in hi3660_thermal_enable_sensor()
|
/Linux-v6.1/drivers/net/ethernet/mscc/ |
D | ocelot.c | 1389 /* The logical port number of a LAG is equal to the lowest numbered physical 1390 * port ID present in that LAG. It may change if that port ever leaves the LAG. 1404 * Note that when CPU ports are in a LAG, the user ports are assigned to the 1406 * port number of the LAG. 1408 * We leave PGID_SRC poorly configured for the 'secondary' CPU port in the LAG 1436 * or the bit mask of CPU ports if said CPU port is in a LAG. 1929 int i, port, lag; in ocelot_set_aggr_pgids() local 1943 * port ID == LAG ID. So we mark as visited all further ports in the in ocelot_set_aggr_pgids() 1956 /* Now, set PGIDs for each active LAG */ in ocelot_set_aggr_pgids() 1957 for (lag = 0; lag < ocelot->num_phys_ports; lag++) { in ocelot_set_aggr_pgids() [all …]
|
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/en/tc/act/ |
D | mirred.c | 13 #include "lag/lag.h" 36 * In LAG case, *priv* is the private data of in verify_uplink_forwarding() 283 attr->lag.count = true; in parse_mirred()
|