diff mbox

[rdma-core,2/3] srp_daemon/srp_daemon.c: Eliminate some unneeded code in get_shared_pkeys

Message ID a14febfc-a190-6ca8-5dca-dec58f5a3bce@dev.mellanox.co.il (mailing list archive)
State Accepted
Headers show

Commit Message

Hal Rosenstock April 13, 2017, 2:48 p.m. UTC
PathRecords are obtained using SubAdmGet and not SubAdmGetTable
so RMPP is not involved. Eliminate unneeded initialization of MAD
RMPP fields.

Signed-off-by: Hal Rosenstock <hal@mellanox.com>
---
 srp_daemon/srp_daemon.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Bart Van Assche April 13, 2017, 3:25 p.m. UTC | #1
On Thu, 2017-04-13 at 10:48 -0400, Hal Rosenstock wrote:
> PathRecords are obtained using SubAdmGet and not SubAdmGetTable
> so RMPP is not involved. Eliminate unneeded initialization of MAD
> RMPP fields.

Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Honggang LI April 14, 2017, 12:34 a.m. UTC | #2
On Thu, Apr 13, 2017 at 10:48:25AM -0400, Hal Rosenstock wrote:
> 
> PathRecords are obtained using SubAdmGet and not SubAdmGetTable
> so RMPP is not involved. Eliminate unneeded initialization of MAD
> RMPP fields.
> 
> Signed-off-by: Hal Rosenstock <hal@mellanox.com>
> ---
>  srp_daemon/srp_daemon.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
> index 9fb2ecc..59a6137 100644
> --- a/srp_daemon/srp_daemon.c
> +++ b/srp_daemon/srp_daemon.c
> @@ -1134,8 +1134,6 @@ static int get_shared_pkeys(struct resources *res,
>  
>  		/* Mark components: DLID, SLID, PKEY */
>  		out_sa_mad->comp_mask = htobe64(1 << 4 | 1 << 5 | 1 << 13);
> -		out_sa_mad->rmpp_hdr.rmpp_version = UMAD_RMPP_VERSION;
> -		out_sa_mad->rmpp_hdr.rmpp_type = 1;
>  		path_rec = (struct ib_path_rec *)out_sa_mad->data;
>  		path_rec->slid = htobe16(local_port_lid);
>  		path_rec->dlid = htobe16(dest_port_lid);
> -- 
> 1.8.2.3
> 

Reviewed-by: Honggang Li <honli@redhat.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
index 9fb2ecc..59a6137 100644
--- a/srp_daemon/srp_daemon.c
+++ b/srp_daemon/srp_daemon.c
@@ -1134,8 +1134,6 @@  static int get_shared_pkeys(struct resources *res,
 
 		/* Mark components: DLID, SLID, PKEY */
 		out_sa_mad->comp_mask = htobe64(1 << 4 | 1 << 5 | 1 << 13);
-		out_sa_mad->rmpp_hdr.rmpp_version = UMAD_RMPP_VERSION;
-		out_sa_mad->rmpp_hdr.rmpp_type = 1;
 		path_rec = (struct ib_path_rec *)out_sa_mad->data;
 		path_rec->slid = htobe16(local_port_lid);
 		path_rec->dlid = htobe16(dest_port_lid);