Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7084f842 authored by Roland Dreier's avatar Roland Dreier
Browse files

IB/core: Set static rate in ib_init_ah_from_path()



The static rate from the path record should be put into the address
vector -- a long time ago the rate in the address attributes needed to
be a relative rate, which required more munging, but now that the
conversion from absolute to relative is done in the low-level driver,
it's easy for ib_init_ah_from_path() to put the absolute rate in.

Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 630e61f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -471,6 +471,7 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
	ah_attr->sl = rec->sl;
	ah_attr->sl = rec->sl;
	ah_attr->src_path_bits = be16_to_cpu(rec->slid) & 0x7f;
	ah_attr->src_path_bits = be16_to_cpu(rec->slid) & 0x7f;
	ah_attr->port_num = port_num;
	ah_attr->port_num = port_num;
	ah_attr->static_rate = rec->rate;


	if (rec->hop_limit > 1) {
	if (rec->hop_limit > 1) {
		ah_attr->ah_flags = IB_AH_GRH;
		ah_attr->ah_flags = IB_AH_GRH;