[openib-general] [PATCHv3] osm: partition manager force policy
Sasha Khapyorsky
sashak at voltaire.com
Mon Jun 19 09:25:45 PDT 2006
On 18:24 Mon 19 Jun , Eitan Zahavi wrote:
> Hi Sasha,
>
> Thanks. This is yet another bug.
> The fix is trivial and is noted below.
>
> Please let me know when you are done reviewing and I will post a new patch.
I'm done. Did some running, enforcement works as expected now.
Sasha
>
> EZ
> Sasha Khapyorsky wrote:
> >On 14:46 Sun 18 Jun , Eitan Zahavi wrote:
> >
> >>Another one is the handling of switch limited partition cap by
> >>clearing the switch enforcement bit (on the specific port).
> >
> >
> >Some comment about this too. See below.
> >
> >
> >>+ib_api_status_t
> >>+osm_pkey_tbl_set_new_entry(
> >>+ IN osm_pkey_tbl_t *p_pkey_tbl,
> >>+ IN uint16_t block_idx,
> >>+ IN uint8_t pkey_idx,
> >>+ IN uint16_t pkey)
> >>+{
> >>+ ib_pkey_table_t *p_old_block;
> >>+ ib_pkey_table_t *p_new_block;
> >>+
> >>+ if (osm_pkey_tbl_make_block_pair(
> >>+ p_pkey_tbl, block_idx, &p_old_block, &p_new_block))
> >>+ return( IB_ERROR );
> >>+
> >>+ p_new_block->pkey_entry[pkey_idx] = pkey;
> >>+ if (p_pkey_tbl->used_blocks < block_idx)
> >>+ p_pkey_tbl->used_blocks = block_idx;
> Fix:
> if (p_pkey_tbl->used_blocks <= block_idx)
> p_pkey_tbl->used_blocks = block_idx + 1;
> >>+
> >>+ return( IB_SUCCESS );
> >>+}
> >
> >
> >p_pkey_tbl->used_blocks is updated as block index in range 0,1,2....
> >
> >
> >>@@ -242,10 +421,26 @@ pkey_mgr_update_peer_port(
> >> if (!p_sw || !(p_si = osm_switch_get_si_ptr( p_sw )) ||
> >> !p_si->enforce_cap)
> >> return FALSE;
> >>
> >>+ p_pkey_tbl = osm_physp_get_pkey_tbl( p_physp );
> >>+ p_peer_pkey_tbl = osm_physp_get_mod_pkey_tbl( peer );
> >>+ num_of_blocks = osm_pkey_tbl_get_num_blocks( p_pkey_tbl );
> >>+ peer_max_blocks = pkey_mgr_get_physp_max_blocks( p_subn, peer );
> >>+ if (peer_max_blocks < p_pkey_tbl->used_blocks)
> >>+ {
> >
> >
> >But compared with total number of blocks (ranged 1,2,3,...). In case
> >where switch supports N pkey blocks and CA - N+1, switch's ports will be
> >updated and partitioning enforced.
> >
> >Sasha
> >
> >
> >>+ osm_log( p_log, OSM_LOG_ERROR,
> >>+ "pkey_mgr_update_peer_port: ERR
> >>0508: "
> >>+ "not enough entries (%u < %u) on
> >>switch 0x%016" PRIx64
> >>+ " port %u. Clearing Enforcement
> >>bit.\n",
> >>+ peer_max_blocks, num_of_blocks,
> >>+ cl_ntoh64( osm_node_get_node_guid(
> >>p_node ) ),
> >>+ osm_physp_get_port_num( peer ) );
> >>+ enforce = FALSE;
> >>+ }
> >>+
> >
> >
>
More information about the general
mailing list