mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
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>
This commit is contained in:
@@ -204,7 +204,8 @@ struct mlx4_qp_context {
|
||||
u32 reserved1;
|
||||
__be32 next_send_psn;
|
||||
__be32 cqn_send;
|
||||
u32 reserved2[2];
|
||||
__be16 roce_entropy;
|
||||
__be16 reserved2[3];
|
||||
__be32 last_acked_psn;
|
||||
__be32 ssn;
|
||||
__be32 params2;
|
||||
@@ -487,4 +488,14 @@ static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn)
|
||||
|
||||
void mlx4_qp_remove(struct mlx4_dev *dev, struct mlx4_qp *qp);
|
||||
|
||||
static inline u16 folded_qp(u32 q)
|
||||
{
|
||||
u16 res;
|
||||
|
||||
res = ((q & 0xff) ^ ((q & 0xff0000) >> 16)) | (q & 0xff00);
|
||||
return res;
|
||||
}
|
||||
|
||||
u16 mlx4_qp_roce_entropy(struct mlx4_dev *dev, u32 qpn);
|
||||
|
||||
#endif /* MLX4_QP_H */
|
||||
|
||||
Reference in New Issue
Block a user