diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx4/cmd.h | 7 | ||||
| -rw-r--r-- | include/linux/mlx4/device.h | 11 | ||||
| -rw-r--r-- | include/linux/mlx4/driver.h | 19 | ||||
| -rw-r--r-- | include/linux/mlx4/qp.h | 1 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 15 |
5 files changed, 52 insertions, 1 deletions
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index ae95adc78509..7b6d4e9ff603 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
| @@ -71,6 +71,7 @@ enum { | |||
| 71 | 71 | ||
| 72 | /*master notify fw on finish for slave's flr*/ | 72 | /*master notify fw on finish for slave's flr*/ |
| 73 | MLX4_CMD_INFORM_FLR_DONE = 0x5b, | 73 | MLX4_CMD_INFORM_FLR_DONE = 0x5b, |
| 74 | MLX4_CMD_VIRT_PORT_MAP = 0x5c, | ||
| 74 | MLX4_CMD_GET_OP_REQ = 0x59, | 75 | MLX4_CMD_GET_OP_REQ = 0x59, |
| 75 | 76 | ||
| 76 | /* TPT commands */ | 77 | /* TPT commands */ |
| @@ -171,6 +172,12 @@ enum { | |||
| 171 | }; | 172 | }; |
| 172 | 173 | ||
| 173 | enum { | 174 | enum { |
| 175 | /* virtual to physical port mapping opcode modifiers */ | ||
| 176 | MLX4_GET_PORT_VIRT2PHY = 0x0, | ||
| 177 | MLX4_SET_PORT_VIRT2PHY = 0x1, | ||
| 178 | }; | ||
| 179 | |||
| 180 | enum { | ||
| 174 | MLX4_MAILBOX_SIZE = 4096, | 181 | MLX4_MAILBOX_SIZE = 4096, |
| 175 | MLX4_ACCESS_MEM_ALIGN = 256, | 182 | MLX4_ACCESS_MEM_ALIGN = 256, |
| 176 | }; | 183 | }; |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index c95d659a39f2..977b0b164431 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -70,6 +70,7 @@ enum { | |||
| 70 | MLX4_FLAG_SLAVE = 1 << 3, | 70 | MLX4_FLAG_SLAVE = 1 << 3, |
| 71 | MLX4_FLAG_SRIOV = 1 << 4, | 71 | MLX4_FLAG_SRIOV = 1 << 4, |
| 72 | MLX4_FLAG_OLD_REG_MAC = 1 << 6, | 72 | MLX4_FLAG_OLD_REG_MAC = 1 << 6, |
| 73 | MLX4_FLAG_BONDED = 1 << 7 | ||
| 73 | }; | 74 | }; |
| 74 | 75 | ||
| 75 | enum { | 76 | enum { |
| @@ -201,7 +202,8 @@ enum { | |||
| 201 | MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 17, | 202 | MLX4_DEV_CAP_FLAG2_SYS_EQS = 1LL << 17, |
| 202 | MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, | 203 | MLX4_DEV_CAP_FLAG2_80_VFS = 1LL << 18, |
| 203 | MLX4_DEV_CAP_FLAG2_FS_A0 = 1LL << 19, | 204 | MLX4_DEV_CAP_FLAG2_FS_A0 = 1LL << 19, |
| 204 | MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 20 | 205 | MLX4_DEV_CAP_FLAG2_RECOVERABLE_ERROR_EVENT = 1LL << 20, |
| 206 | MLX4_DEV_CAP_FLAG2_PORT_REMAP = 1LL << 21 | ||
| 205 | }; | 207 | }; |
| 206 | 208 | ||
| 207 | enum { | 209 | enum { |
| @@ -253,9 +255,14 @@ enum { | |||
| 253 | MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, | 255 | MLX4_BMME_FLAG_TYPE_2_WIN = 1 << 9, |
| 254 | MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, | 256 | MLX4_BMME_FLAG_RESERVED_LKEY = 1 << 10, |
| 255 | MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, | 257 | MLX4_BMME_FLAG_FAST_REG_WR = 1 << 11, |
| 258 | MLX4_BMME_FLAG_PORT_REMAP = 1 << 24, | ||
| 256 | MLX4_BMME_FLAG_VSD_INIT2RTR = 1 << 28, | 259 | MLX4_BMME_FLAG_VSD_INIT2RTR = 1 << 28, |
| 257 | }; | 260 | }; |
| 258 | 261 | ||
| 262 | enum { | ||
| 263 | MLX4_FLAG_PORT_REMAP = MLX4_BMME_FLAG_PORT_REMAP | ||
| 264 | }; | ||
| 265 | |||
| 259 | enum mlx4_event { | 266 | enum mlx4_event { |
| 260 | MLX4_EVENT_TYPE_COMP = 0x00, | 267 | MLX4_EVENT_TYPE_COMP = 0x00, |
| 261 | MLX4_EVENT_TYPE_PATH_MIG = 0x01, | 268 | MLX4_EVENT_TYPE_PATH_MIG = 0x01, |
| @@ -1378,6 +1385,8 @@ int mlx4_phys_to_slave_port(struct mlx4_dev *dev, int slave, int port); | |||
| 1378 | int mlx4_get_base_gid_ix(struct mlx4_dev *dev, int slave, int port); | 1385 | int mlx4_get_base_gid_ix(struct mlx4_dev *dev, int slave, int port); |
| 1379 | 1386 | ||
| 1380 | int mlx4_config_vxlan_port(struct mlx4_dev *dev, __be16 udp_port); | 1387 | int mlx4_config_vxlan_port(struct mlx4_dev *dev, __be16 udp_port); |
| 1388 | int mlx4_disable_rx_port_check(struct mlx4_dev *dev, bool dis); | ||
| 1389 | int mlx4_virt2phy_port_map(struct mlx4_dev *dev, u32 port1, u32 port2); | ||
| 1381 | int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port); | 1390 | int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port); |
| 1382 | int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); | 1391 | int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); |
| 1383 | int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, | 1392 | int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, |
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index 022055c8fb26..9553a73d2049 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
| @@ -49,6 +49,10 @@ enum mlx4_dev_event { | |||
| 49 | MLX4_DEV_EVENT_SLAVE_SHUTDOWN, | 49 | MLX4_DEV_EVENT_SLAVE_SHUTDOWN, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | enum { | ||
| 53 | MLX4_INTFF_BONDING = 1 << 0 | ||
| 54 | }; | ||
| 55 | |||
| 52 | struct mlx4_interface { | 56 | struct mlx4_interface { |
| 53 | void * (*add) (struct mlx4_dev *dev); | 57 | void * (*add) (struct mlx4_dev *dev); |
| 54 | void (*remove)(struct mlx4_dev *dev, void *context); | 58 | void (*remove)(struct mlx4_dev *dev, void *context); |
| @@ -57,11 +61,26 @@ struct mlx4_interface { | |||
| 57 | void * (*get_dev)(struct mlx4_dev *dev, void *context, u8 port); | 61 | void * (*get_dev)(struct mlx4_dev *dev, void *context, u8 port); |
| 58 | struct list_head list; | 62 | struct list_head list; |
| 59 | enum mlx4_protocol protocol; | 63 | enum mlx4_protocol protocol; |
| 64 | int flags; | ||
| 60 | }; | 65 | }; |
| 61 | 66 | ||
| 62 | int mlx4_register_interface(struct mlx4_interface *intf); | 67 | int mlx4_register_interface(struct mlx4_interface *intf); |
| 63 | void mlx4_unregister_interface(struct mlx4_interface *intf); | 68 | void mlx4_unregister_interface(struct mlx4_interface *intf); |
| 64 | 69 | ||
| 70 | int mlx4_bond(struct mlx4_dev *dev); | ||
| 71 | int mlx4_unbond(struct mlx4_dev *dev); | ||
| 72 | static inline int mlx4_is_bonded(struct mlx4_dev *dev) | ||
| 73 | { | ||
| 74 | return !!(dev->flags & MLX4_FLAG_BONDED); | ||
| 75 | } | ||
| 76 | |||
| 77 | struct mlx4_port_map { | ||
| 78 | u8 port1; | ||
| 79 | u8 port2; | ||
| 80 | }; | ||
| 81 | |||
| 82 | int mlx4_port_map_set(struct mlx4_dev *dev, struct mlx4_port_map *v2p); | ||
| 83 | |||
| 65 | void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port); | 84 | void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port); |
| 66 | 85 | ||
| 67 | static inline u64 mlx4_mac_to_u64(u8 *addr) | 86 | static inline u64 mlx4_mac_to_u64(u8 *addr) |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 467ccdf94c98..2bbc62aa818a 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
| @@ -96,6 +96,7 @@ enum { | |||
| 96 | MLX4_QP_BIT_RRE = 1 << 15, | 96 | MLX4_QP_BIT_RRE = 1 << 15, |
| 97 | MLX4_QP_BIT_RWE = 1 << 14, | 97 | MLX4_QP_BIT_RWE = 1 << 14, |
| 98 | MLX4_QP_BIT_RAE = 1 << 13, | 98 | MLX4_QP_BIT_RAE = 1 << 13, |
| 99 | MLX4_QP_BIT_FPP = 1 << 3, | ||
| 99 | MLX4_QP_BIT_RIC = 1 << 4, | 100 | MLX4_QP_BIT_RIC = 1 << 4, |
| 100 | }; | 101 | }; |
| 101 | 102 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1347ac50d2af..ce784d5018e0 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -51,6 +51,7 @@ | |||
| 51 | #include <linux/netdev_features.h> | 51 | #include <linux/netdev_features.h> |
| 52 | #include <linux/neighbour.h> | 52 | #include <linux/neighbour.h> |
| 53 | #include <uapi/linux/netdevice.h> | 53 | #include <uapi/linux/netdevice.h> |
| 54 | #include <uapi/linux/if_bonding.h> | ||
| 54 | 55 | ||
| 55 | struct netpoll_info; | 56 | struct netpoll_info; |
| 56 | struct device; | 57 | struct device; |
| @@ -2056,6 +2057,7 @@ struct pcpu_sw_netstats { | |||
| 2056 | #define NETDEV_RESEND_IGMP 0x0016 | 2057 | #define NETDEV_RESEND_IGMP 0x0016 |
| 2057 | #define NETDEV_PRECHANGEMTU 0x0017 /* notify before mtu change happened */ | 2058 | #define NETDEV_PRECHANGEMTU 0x0017 /* notify before mtu change happened */ |
| 2058 | #define NETDEV_CHANGEINFODATA 0x0018 | 2059 | #define NETDEV_CHANGEINFODATA 0x0018 |
| 2060 | #define NETDEV_BONDING_INFO 0x0019 | ||
| 2059 | 2061 | ||
| 2060 | int register_netdevice_notifier(struct notifier_block *nb); | 2062 | int register_netdevice_notifier(struct notifier_block *nb); |
| 2061 | int unregister_netdevice_notifier(struct notifier_block *nb); | 2063 | int unregister_netdevice_notifier(struct notifier_block *nb); |
| @@ -3494,6 +3496,19 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb, | |||
| 3494 | struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, | 3496 | struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb, |
| 3495 | netdev_features_t features); | 3497 | netdev_features_t features); |
| 3496 | 3498 | ||
| 3499 | struct netdev_bonding_info { | ||
| 3500 | ifslave slave; | ||
| 3501 | ifbond master; | ||
| 3502 | }; | ||
| 3503 | |||
| 3504 | struct netdev_notifier_bonding_info { | ||
| 3505 | struct netdev_notifier_info info; /* must be first */ | ||
| 3506 | struct netdev_bonding_info bonding_info; | ||
| 3507 | }; | ||
| 3508 | |||
| 3509 | void netdev_bonding_info_change(struct net_device *dev, | ||
| 3510 | struct netdev_bonding_info *bonding_info); | ||
| 3511 | |||
| 3497 | static inline | 3512 | static inline |
| 3498 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) | 3513 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, netdev_features_t features) |
| 3499 | { | 3514 | { |
