]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
ibacm: fix lmc usage
authorSean Hefty <sean.hefty@intel.com>
Thu, 16 Dec 2010 01:23:26 +0000 (17:23 -0800)
committerSean Hefty <sean.hefty@intel.com>
Thu, 16 Dec 2010 01:23:26 +0000 (17:23 -0800)
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 <sean.hefty@intel.com>
src/acm.c

index 4ec01e8de4594c53988063df0e965dbf7cabafad..e0f0b948f913d64c7c1236da45cc88ecabdd3482 100644 (file)
--- 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;