1
1

usnic: ensure to reset flags on returned frags

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
Jeff Squyres 2017-01-09 22:12:23 +00:00
родитель c4d7876ca0
Коммит 53dc75a89c

Просмотреть файл

@ -11,7 +11,7 @@
* All rights reserved.
* Copyright (c) 2006 Sandia National Laboratories. All rights
* reserved.
* Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2017 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -370,6 +370,7 @@ opal_btl_usnic_small_send_frag_alloc(opal_btl_usnic_module_t *module)
/* this belongs in constructor... */
frag->ssf_base.sf_base.uf_freelist = &(module->small_send_frags);
frag->ssf_segment.ss_send_posted = 0;
assert(frag);
assert(OPAL_BTL_USNIC_FRAG_SMALL_SEND == frag->ssf_base.sf_base.uf_type);
@ -480,6 +481,14 @@ opal_btl_usnic_frag_return(
}
}
/* Reset the "send_posted" flag on the embedded segment for small
fragments */
else if (frag->uf_type == OPAL_BTL_USNIC_FRAG_SMALL_SEND) {
opal_btl_usnic_small_send_frag_t *sfrag;
sfrag = (opal_btl_usnic_small_send_frag_t *) frag;
sfrag->ssf_segment.ss_send_posted = 0;
}
USNIC_COMPAT_FREE_LIST_RETURN(frag->uf_freelist, &(frag->uf_base.super));
}