FreeBSD/sys/dev/iser/icl_iser.c
/*
 * Allocate icl_pdu with empty BHS to fill up by the caller.
 */
Allocate icl_pdu with empty BHS to fill up by the caller.
Allocate icl_pdu with empty BHS to fill up by the caller .
struct icl_pdu *
iser_new_pdu(struct icl_conn *ic, int flags)
{
	struct icl_iser_pdu *iser_pdu;
	struct icl_pdu *ip;
	struct iser_conn *iser_conn = icl_to_iser_conn(ic);
	iser_pdu = uma_zalloc(icl_pdu_zone, flags | M_ZERO);
	if (iser_pdu == NULL) {
		ISER_WARN("failed to allocate %zd bytes", sizeof(*iser_pdu));
		return (NULL);
	}
	iser_pdu->iser_conn = iser_conn;
	ip = &iser_pdu->icl_pdu;
	ip->ip_conn = ic;
	ip->ip_bhs = &iser_pdu->desc.iscsi_header;
	return (ip);
}
struct icl_pdu * iser_new_pdu ( struct icl_conn * ic , int flags ) { struct icl_iser_pdu * iser_pdu ; struct icl_pdu * ip ; struct iser_conn * iser_conn = icl_to_iser_conn ( ic ) ; iser_pdu = uma_zalloc ( icl_pdu_zone , flags | M_ZERO ) ; if ( iser_pdu == NULL ) { ISER_WARN ( " " , sizeof ( * iser_pdu ) ) ; return ( NULL ) ; } iser_pdu -> iser_conn = iser_conn ; ip = & iser_pdu -> icl_pdu ; ip -> ip_conn = ic ; ip -> ip_bhs = & iser_pdu -> desc . iscsi_header ; return ( ip ) ; }
Allocate icl_pdu with empty BHS to fill up by the caller.
Allocate icl_pdu with empty BHS to fill up by the caller .