diff options
| author | Moni Shoua <monis@mellanox.com> | 2016-01-14 10:50:37 -0500 |
|---|---|---|
| committer | Doug Ledford <dledford@redhat.com> | 2016-01-19 15:35:00 -0500 |
| commit | 3f723f42d9d625bb9ecfe923d19d1d42da775797 (patch) | |
| tree | ebf0ef5781105d6188a5e897b8910bb0cc10aee9 /include/linux/mlx4 | |
| parent | fca83006294a6356705781eee31da1658fd411a5 (diff) | |
net/mlx4_core: Add support for RoCE v2 entropy
In RoCE v2 we need to choose a source UDP port, we do so by using
entropy over the source and dest QPNs.
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/linux/mlx4')
| -rw-r--r-- | include/linux/mlx4/qp.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index fe052e234906..cdf110d3f260 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
| @@ -204,7 +204,8 @@ struct mlx4_qp_context { | |||
| 204 | u32 reserved1; | 204 | u32 reserved1; |
| 205 | __be32 next_send_psn; | 205 | __be32 next_send_psn; |
| 206 | __be32 cqn_send; | 206 | __be32 cqn_send; |
| 207 | u32 reserved2[2]; | 207 | __be16 roce_entropy; |
| 208 | __be16 reserved2[3]; | ||
| 208 | __be32 last_acked_psn; | 209 | __be32 last_acked_psn; |
| 209 | __be32 ssn; | 210 | __be32 ssn; |
| 210 | __be32 params2; | 211 | __be32 params2; |
| @@ -487,4 +488,14 @@ static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn) | |||
| 487 | 488 | ||
| 488 | void mlx4_qp_remove(struct mlx4_dev *dev, struct mlx4_qp *qp); | 489 | void mlx4_qp_remove(struct mlx4_dev *dev, struct mlx4_qp *qp); |
| 489 | 490 | ||
| 491 | static inline u16 folded_qp(u32 q) | ||
| 492 | { | ||
| 493 | u16 res; | ||
| 494 | |||
| 495 | res = ((q & 0xff) ^ ((q & 0xff0000) >> 16)) | (q & 0xff00); | ||
| 496 | return res; | ||
| 497 | } | ||
| 498 | |||
| 499 | u16 mlx4_qp_roce_entropy(struct mlx4_dev *dev, u32 qpn); | ||
| 500 | |||
| 490 | #endif /* MLX4_QP_H */ | 501 | #endif /* MLX4_QP_H */ |
