From b355854c79a1e446e87684a41663ad5aae258b73 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 15 Dec 2010 17:23:26 -0800 Subject: [PATCH] ibacm: fix lmc usage Convert lmc to actual mask for use in slid comparisons. All SA queries are initiated from the base lid, so set the src_path_bits to 0. It is currently set incorrectly based on using the lmc as a mask against the base lid. Signed-off-by: Sean Hefty --- src/acm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/acm.c b/src/acm.c index 4ec01e8..e0f0b94 100644 --- a/src/acm.c +++ b/src/acm.c @@ -112,7 +112,7 @@ struct acm_port int gid_cnt; uint16_t pkey_cnt; uint16_t lid; - uint8_t lmc; + uint16_t lid_mask; uint8_t port_num; }; @@ -2582,11 +2582,11 @@ static void acm_init_port(struct acm_port *port) break; } port->lid = attr.lid; - port->lmc = attr.lmc; + port->lid_mask = 0xffff - (1 << attr.lmc) - 1; acm_init_dest(&port->sa_dest, ACM_ADDRESS_LID, (uint8_t *) &attr.sm_lid, sizeof(attr.sm_lid)); - port->sa_dest.av.src_path_bits = attr.lid & attr.lmc; + port->sa_dest.av.src_path_bits = 0; port->sa_dest.av.dlid = attr.sm_lid; port->sa_dest.av.sl = attr.sm_sl; port->sa_dest.av.port_num = port->port_num; -- 2.46.0