Commit c5812114 authored by Hoang-Nam Nguyen's avatar Hoang-Nam Nguyen Committed by Roland Dreier

IB/ehca: Use named constant for max mtu

Define and use a constant EHCA_MAX_MTU instead hardcoded value.
Signed-off-by: default avatarHoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 7e28db5d
...@@ -118,8 +118,7 @@ struct ib_ah *ehca_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr) ...@@ -118,8 +118,7 @@ struct ib_ah *ehca_create_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attr)
} }
memcpy(&av->av.grh.word_1, &gid, sizeof(gid)); memcpy(&av->av.grh.word_1, &gid, sizeof(gid));
} }
/* for the time being we use a hard coded PMTU of 2048 Bytes */ av->av.pmtu = EHCA_MAX_MTU;
av->av.pmtu = 4;
/* dgid comes in grh.word_3 */ /* dgid comes in grh.word_3 */
memcpy(&av->av.grh.word_3, &ah_attr->grh.dgid, memcpy(&av->av.grh.word_3, &ah_attr->grh.dgid,
...@@ -193,7 +192,7 @@ int ehca_modify_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr) ...@@ -193,7 +192,7 @@ int ehca_modify_ah(struct ib_ah *ah, struct ib_ah_attr *ah_attr)
memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid)); memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid));
} }
new_ehca_av.pmtu = 4; /* see also comment in create_ah() */ new_ehca_av.pmtu = EHCA_MAX_MTU;
memcpy(&new_ehca_av.grh.word_3, &ah_attr->grh.dgid, memcpy(&new_ehca_av.grh.word_3, &ah_attr->grh.dgid,
sizeof(ah_attr->grh.dgid)); sizeof(ah_attr->grh.dgid));
......
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
#include "ehca_tools.h" #include "ehca_tools.h"
#define EHCA_MAX_MTU 4
/* QP Table Entry Memory Map */ /* QP Table Entry Memory Map */
struct hipz_qptemm { struct hipz_qptemm {
u64 qpx_hcr; u64 qpx_hcr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment