opensm/osm_mcast_tbl: Fix size of port mask table array
PATCH 1/1 opensm/osm_mcast_tbl: Fix size of port mask table array
Should be IB_MCAST_POSITION_MAX + 1 rather than just IB_MCAST_POSITION_MAX
Signed-off-by Hal Rosenstock <[email protected]>
---
opensm/include/opensm/osm_mcast_tbl.h +2 -2
@@ -76,7 +76,7 @@ typedef struct osm_mcast_fwdbl {uint16_t num_entries;uint16_t max_mlid_ho;uint16_t mft_depth; -uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX ]; +uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX +1 ]; } osm_mcast_tbl_t;/* * FIELDS
@@ -106,7 +106,7 @@ typedef struct osm_mcast_fwdbl {* * p_mask_tbl * Pointer to a two dimensional array of port_masks for this switch. -* The first dimension is MLID, the second dimension is mask position. +* The first dimension is MLID offset, second dimension is mask position. * This pointer is null for switches that do not support multicast. * * SEE ALSO
opensm/opensm/osm_mcast_tbl.c +1 -1
@@ -119,7 +119,7 @@ void osm_mcast_tbl_set(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho, int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN uintn_t mlid_offset) {size_t mft_depth, size; -uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX ]; +uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX +1 ];if (mlid_offset < p_tbl->mft_depth) goto done;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Sasha Khapyorsky
AppliedQuoted 4 lines · Hal Rosenstock
Should be
IB_MCAST_POSITION_MAX+ 1 rather than justIB_MCAST_POSITION_MAXSigned-off-by Hal Rosenstock <[email protected]>
Applied. Thanks.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html