aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
diff options
context:
space:
mode:
authorAlex Vesker <valex@mellanox.com>2017-09-14 14:08:39 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2017-10-14 11:22:10 -0700
commit4c6c615e3f308aee26277abebc7d4ffcd9a6abe2 (patch)
treeee79208e8c8d5df36511dfcdcd2d674c2d8d28f0 /drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
parentnet/mlx5e: IPoIB, Use hash-table to map between QPN to child netdev (diff)
downloadlinux-dev-4c6c615e3f308aee26277abebc7d4ffcd9a6abe2.tar.xz
linux-dev-4c6c615e3f308aee26277abebc7d4ffcd9a6abe2.zip
net/mlx5e: IPoIB, Add PKEY child interface nic profile
Child interface profile will be called to support child interface specific behaviour. The child code is sparse compared to the parent since the RX channels are shared between the interfaces. Creating a septate profile for child and parent will make a smother code with a better ability for future expansion. The profile stuct is exposed to the parent using a getter function. Signed-off-by: Alex Vesker <valex@mellanox.com> Reviewed-by: Erez Shitrit <erezsh@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
index e313f6d90729..c9895f7a2358 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
@@ -55,6 +55,10 @@ struct mlx5i_priv {
char *mlx5e_priv[0];
};
+/* Underlay QP create/destroy functions */
+int mlx5i_create_underlay_qp(struct mlx5_core_dev *mdev, struct mlx5_core_qp *qp);
+void mlx5i_destroy_underlay_qp(struct mlx5_core_dev *mdev, struct mlx5_core_qp *qp);
+
/* Allocate/Free underlay QPN to net-device hash table */
int mlx5i_pkey_qpn_ht_init(struct net_device *netdev);
void mlx5i_pkey_qpn_ht_cleanup(struct net_device *netdev);
@@ -66,6 +70,15 @@ int mlx5i_pkey_del_qpn(struct net_device *netdev, u32 qpn);
/* Get the net-device corresponding to the given underlay QPN */
struct net_device *mlx5i_pkey_get_netdev(struct net_device *netdev, u32 qpn);
+/* Parent profile functions */
+void mlx5i_init(struct mlx5_core_dev *mdev,
+ struct net_device *netdev,
+ const struct mlx5e_profile *profile,
+ void *ppriv);
+
+/* Get child interface nic profile */
+const struct mlx5e_profile *mlx5i_pkey_get_profile(void);
+
/* Extract mlx5e_priv from IPoIB netdev */
#define mlx5i_epriv(netdev) ((void *)(((struct mlx5i_priv *)netdev_priv(netdev))->mlx5e_priv))