1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2018-2021, Intel Corporation. */
7 #include <linux/netdevice.h>
9 /* LAG roles for netdev */
17 #define ICE_LAG_INVALID_PORT 0xFF
19 #define ICE_LAG_RESET_RETRIES 5
24 struct ice_lag_netdev_list {
25 struct list_head node;
26 struct net_device *netdev;
31 struct ice_pf *pf; /* backlink to PF struct */
32 struct net_device *netdev; /* this PF's netdev */
33 struct net_device *upper_netdev; /* upper bonding netdev */
34 struct list_head *netdev_head;
35 struct notifier_block notif_block;
37 u16 bond_swid; /* swid for primary interface */
38 u8 active_port; /* lport value for the current active port */
39 u8 bonded:1; /* currently bonded */
40 u8 primary:1; /* this is primary */
47 /* LAG workqueue struct */
49 struct work_struct lag_task;
50 struct ice_lag_netdev_list netdev_list;
53 struct net_device *event_netdev;
55 struct netdev_notifier_changeupper_info changeupper_info;
56 struct netdev_notifier_bonding_info bonding_info;
57 struct netdev_notifier_info notifier_info;
61 void ice_lag_move_new_vf_nodes(struct ice_vf *vf);
62 int ice_init_lag(struct ice_pf *pf);
63 void ice_deinit_lag(struct ice_pf *pf);
64 void ice_lag_rebuild(struct ice_pf *pf);
65 #endif /* _ICE_LAG_H_ */