22/*
33 * Copyright (c) 2018 Los Alamos National Security, LLC. All rights
44 * reserved.
5+ * Copyright (c) 2025 Google, LLC. All rights reserved.
56 * $COPYRIGHT$
67 *
78 * Additional copyrights may follow
@@ -26,7 +27,7 @@ mca_btl_base_descriptor_t *mca_btl_uct_alloc(mca_btl_base_module_t *btl,
2627 mca_btl_uct_module_t * uct_btl = (mca_btl_uct_module_t * ) btl ;
2728 mca_btl_uct_base_frag_t * frag = NULL ;
2829
29- if (size <= (size_t ) MCA_BTL_UCT_TL_ATTR ( uct_btl -> am_tl , 0 ) .cap .am .max_short ) {
30+ if (size <= (size_t ) uct_btl -> am_tl -> uct_iface_attr .cap .am .max_short ) {
3031 frag = mca_btl_uct_frag_alloc_short (uct_btl , endpoint );
3132 } else if (size <= uct_btl -> super .btl_eager_limit ) {
3233 frag = mca_btl_uct_frag_alloc_eager (uct_btl , endpoint );
@@ -105,7 +106,7 @@ struct mca_btl_base_descriptor_t *mca_btl_uct_prepare_src(mca_btl_base_module_t
105106 frag -> uct_iov .length = total_size ;
106107 frag -> base .order = order ;
107108 frag -> base .des_flags = flags ;
108- if (total_size > (size_t ) MCA_BTL_UCT_TL_ATTR ( uct_btl -> am_tl , 0 ) .cap .am .max_short ) {
109+ if (total_size > (size_t ) uct_btl -> am_tl -> uct_iface_attr .cap .am .max_short ) {
109110 frag -> segments [0 ].seg_len = reserve ;
110111 frag -> segments [1 ].seg_len = * size ;
111112 frag -> segments [1 ].seg_addr .pval = data_ptr ;
@@ -181,7 +182,7 @@ int mca_btl_uct_send_frag(mca_btl_uct_module_t *uct_btl, mca_btl_uct_base_frag_t
181182 mca_btl_uct_context_lock (context );
182183 /* attempt to post the fragment */
183184 if (NULL != frag -> base .super .registration
184- && (context -> uct_iface_attr .cap .flags & UCT_IFACE_FLAG_AM_ZCOPY )) {
185+ && (uct_btl -> am_tl -> uct_iface_attr .cap .flags & UCT_IFACE_FLAG_AM_ZCOPY )) {
185186 frag -> comp .dev_context = context ;
186187 ucs_status = uct_ep_am_zcopy (ep_handle , MCA_BTL_UCT_FRAG , & frag -> header ,
187188 sizeof (frag -> header ), & frag -> uct_iov , 1 , 0 ,
@@ -196,7 +197,7 @@ int mca_btl_uct_send_frag(mca_btl_uct_module_t *uct_btl, mca_btl_uct_base_frag_t
196197 /* short message */
197198 if (1 == frag -> base .des_segment_count
198199 && (frag -> uct_iov .length + 8 )
199- < MCA_BTL_UCT_TL_ATTR ( uct_btl -> am_tl , 0 ) .cap .am .max_short ) {
200+ < uct_btl -> am_tl -> uct_iface_attr .cap .am .max_short ) {
200201 ucs_status = uct_ep_am_short (ep_handle , MCA_BTL_UCT_FRAG , frag -> header .value ,
201202 frag -> uct_iov .buffer , frag -> uct_iov .length );
202203
@@ -290,9 +291,9 @@ static size_t mca_btl_uct_sendi_pack(void *data, void *arg)
290291 return args -> header_size + args -> payload_size + 8 ;
291292}
292293
293- static inline size_t mca_btl_uct_max_sendi (mca_btl_uct_module_t * uct_btl , int context_id )
294+ static inline size_t mca_btl_uct_max_sendi (mca_btl_uct_module_t * uct_btl )
294295{
295- return MCA_BTL_UCT_TL_ATTR ( uct_btl -> am_tl , context_id ) .cap .am .max_bcopy ;
296+ return uct_btl -> am_tl -> uct_iface_attr .cap .am .max_bcopy ;
296297}
297298
298299int mca_btl_uct_sendi (mca_btl_base_module_t * btl , mca_btl_base_endpoint_t * endpoint ,
@@ -312,7 +313,7 @@ int mca_btl_uct_sendi(mca_btl_base_module_t *btl, mca_btl_base_endpoint_t *endpo
312313
313314 rc = mca_btl_uct_endpoint_check_am (uct_btl , endpoint , context , & ep_handle );
314315 if (OPAL_UNLIKELY (OPAL_SUCCESS != rc
315- || msg_size > mca_btl_uct_max_sendi (uct_btl , context -> context_id ))) {
316+ || msg_size > mca_btl_uct_max_sendi (uct_btl ))) {
316317 if (descriptor ) {
317318 * descriptor = mca_btl_uct_alloc (btl , endpoint , order , total_size , flags );
318319 }
@@ -326,7 +327,7 @@ int mca_btl_uct_sendi(mca_btl_base_module_t *btl, mca_btl_base_endpoint_t *endpo
326327 if (0 == payload_size ) {
327328 ucs_status = uct_ep_am_short (ep_handle , MCA_BTL_UCT_FRAG , am_header .value , header ,
328329 header_size );
329- } else if (msg_size < (size_t ) MCA_BTL_UCT_TL_ATTR ( uct_btl -> am_tl , context -> context_id )
330+ } else if (msg_size < (size_t ) uct_btl -> am_tl -> uct_iface_attr
330331 .cap .am .max_short ) {
331332 int8_t * data = alloca (total_size );
332333 size_t packed_payload_size = payload_size ;
0 commit comments