History

Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux

This merge includes updates to bonding driver needed for the rdma stack, to avoid conflicts with the RDMA branch. Maor Gottlieb Says: ==================== Bonding: Add support to get xmit slave The following series adds support to get the LAG master xmit slave by introducing new .ndo - ndo_get_xmit_slave. Every LAG module can implement it and it first implemented in the bond driver. This is follow-up to the RFC discussion [1]. The main motivation for doing this is for drivers that offload part of the LAG functionality. For example, Mellanox Connect-X hardware implements RoCE LAG which selects the TX affinity when the resources are created and port is remapped when it goes down. The first part of this patchset introduces the new .ndo and add the support to the bonding module. The second part adds support to get the RoCE LAG xmit slave by building skb of the RoCE packet based on the AH attributes and call to the new .ndo. The third part change the mlx5 driver driver to set the QP's affinity port according to the slave which found by the .ndo. ====================

Saeed Mahameed committed 6 years ago

Commit 76cd6222 parents 5eb2bcf c6bc6048 files · +301 −99Browse files

Showing the changes to include/linux (2 of 8 files). Show all

Unified · Split

2 files
  1. include/linux/mlx5/driver.h +2 −0
  2. include/linux/netdevice.h +12 −0
include/linux/mlx5/driver.h+2−0
@@ -1074,6 +1074,8 @@ bool mlx5_lag_is_sriov(struct mlx5_core_dev *dev); · 1073 unmodified lines
10741074 bool mlx5_lag_is_multipath(struct mlx5_core_dev *dev);
10751075 bool mlx5_lag_is_active(struct mlx5_core_dev *dev);
10761076 struct net_device *mlx5_lag_get_roce_netdev(struct mlx5_core_dev *dev);
1077+u8 mlx5_lag_get_slave_port(struct mlx5_core_dev *dev,
1078+ struct net_device *slave);
10771079 int mlx5_lag_query_cong_counters(struct mlx5_core_dev *dev,
10781080 u64 *values,
10791081 int num_counters,
include/linux/netdevice.h+12−0
@@ -1148,6 +1148,12 @@ struct netdev_net_notifier { · 1147 unmodified lines
11481148 * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
11491149 * Called to release previously enslaved netdev.
11501150 *
1151+ * struct net_device *(*ndo_get_xmit_slave)(struct net_device *dev,
1152+ * struct sk_buff *skb,
1153+ * bool all_slaves);
1154+ * Get the xmit slave of master device. If all_slaves is true, function
1155+ * assume all the slaves can transmit.
1156+ *
11511157 * Feature/offload setting functions.
11521158 * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
11531159 * netdev_features_t features);
@@ -1391,6 +1397,9 @@ struct net_device_ops { · 237 unmodified lines
13911397 struct netlink_ext_ack *extack);
13921398 int (*ndo_del_slave)(struct net_device *dev,
13931399 struct net_device *slave_dev);
1400+ struct net_device* (*ndo_get_xmit_slave)(struct net_device *dev,
1401+ struct sk_buff *skb,
1402+ bool all_slaves);
13941403 netdev_features_t (*ndo_fix_features)(struct net_device *dev,
13951404 netdev_features_t features);
13961405 int (*ndo_set_features)(struct net_device *dev,
@@ -2745,6 +2754,9 @@ void netdev_freemem(struct net_device *dev); · 1348 unmodified lines
27452754 void synchronize_net(void);
27462755 int init_dummy_netdev(struct net_device *dev);
27472756
2757+struct net_device *netdev_get_xmit_slave(struct net_device *dev,
2758+ struct sk_buff *skb,
2759+ bool all_slaves);
27482760 struct net_device *dev_get_by_index(struct net *net, int ifindex);
27492761 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
27502762 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);