Lines Matching defs:chk
4507 struct sctp_tmit_chunk *chk, *nchk;
4521 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) {
4522 TAILQ_REMOVE(&control->reasm, chk, sctp_next);
4523 if (chk->data) {
4524 sctp_m_freem(chk->data);
4525 chk->data = NULL;
4527 if (chk->holds_key_ref)
4528 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
4529 sctp_free_remote_addr(chk->whoTo);
4530 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
4559 struct sctp_tmit_chunk *chk, *nchk;
4834 TAILQ_FOREACH_SAFE(chk, &asoc->free_chunks, sctp_next, nchk) {
4835 TAILQ_REMOVE(&asoc->free_chunks, chk, sctp_next);
4836 if (chk->data) {
4837 sctp_m_freem(chk->data);
4838 chk->data = NULL;
4840 if (chk->holds_key_ref)
4841 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
4842 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
4849 TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) {
4850 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
4851 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
4854 panic("No chunks on the queues for sid %u.", chk->rec.data.sid);
4857 TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next);
4858 if (chk->data) {
4862 0, chk, SCTP_SO_LOCKED);
4864 if (chk->data) {
4865 sctp_m_freem(chk->data);
4866 chk->data = NULL;
4869 if (chk->holds_key_ref)
4870 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
4871 if (chk->whoTo) {
4872 sctp_free_remote_addr(chk->whoTo);
4873 chk->whoTo = NULL;
4875 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
4880 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) {
4881 if (chk->sent != SCTP_DATAGRAM_NR_ACKED) {
4882 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
4883 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
4886 panic("No chunks on the queues for sid %u.", chk->rec.data.sid);
4890 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
4891 if (chk->data) {
4895 0, chk, SCTP_SO_LOCKED);
4897 if (chk->data) {
4898 sctp_m_freem(chk->data);
4899 chk->data = NULL;
4902 if (chk->holds_key_ref)
4903 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
4904 sctp_free_remote_addr(chk->whoTo);
4905 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
4917 TAILQ_FOREACH_SAFE(chk, &asoc->control_send_queue, sctp_next, nchk) {
4918 TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next);
4919 if (chk->data) {
4920 sctp_m_freem(chk->data);
4921 chk->data = NULL;
4923 if (chk->holds_key_ref)
4924 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
4925 sctp_free_remote_addr(chk->whoTo);
4926 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
4931 TAILQ_FOREACH_SAFE(chk, &asoc->asconf_send_queue, sctp_next, nchk) {
4932 TAILQ_REMOVE(&asoc->asconf_send_queue, chk, sctp_next);
4933 if (chk->data) {
4934 sctp_m_freem(chk->data);
4935 chk->data = NULL;
4937 if (chk->holds_key_ref)
4938 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
4939 sctp_free_remote_addr(chk->whoTo);
4940 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
6632 struct sctp_tmit_chunk *chk, *nchk;
6686 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) {
6688 SCTP_CALC_TSN_TO_GAP(gap, chk->rec.data.tsn, asoc->mapping_array_base_tsn);
6689 KASSERT(chk->send_size > 0, ("chunk has zero length"));
6690 if (asoc->size_on_reasm_queue >= chk->send_size) {
6691 asoc->size_on_reasm_queue -= chk->send_size;
6694 panic("size_on_reasm_queue = %u smaller than chunk length %u", asoc->size_on_reasm_queue, chk->send_size);
6701 TAILQ_REMOVE(&control->reasm, chk, sctp_next);
6702 if (chk->data) {
6703 sctp_m_freem(chk->data);
6704 chk->data = NULL;
6706 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
6746 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) {
6748 SCTP_CALC_TSN_TO_GAP(gap, chk->rec.data.tsn, asoc->mapping_array_base_tsn);
6749 KASSERT(chk->send_size > 0, ("chunk has zero length"));
6750 if (asoc->size_on_reasm_queue >= chk->send_size) {
6751 asoc->size_on_reasm_queue -= chk->send_size;
6754 panic("size_on_reasm_queue = %u smaller than chunk length %u", asoc->size_on_reasm_queue, chk->send_size);
6761 TAILQ_REMOVE(&control->reasm, chk, sctp_next);
6762 if (chk->data) {
6763 sctp_m_freem(chk->data);
6764 chk->data = NULL;
6766 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);