Lines Matching refs:chk

4654 	struct sctp_tmit_chunk *chk, *nchk;
4668 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) {
4669 TAILQ_REMOVE(&control->reasm, chk, sctp_next);
4670 if (chk->data) {
4671 sctp_m_freem(chk->data);
4672 chk->data = NULL;
4674 if (chk->holds_key_ref)
4675 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
4676 sctp_free_remote_addr(chk->whoTo);
4677 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
4707 struct sctp_tmit_chunk *chk, *nchk;
4999 TAILQ_FOREACH_SAFE(chk, &asoc->free_chunks, sctp_next, nchk) {
5000 TAILQ_REMOVE(&asoc->free_chunks, chk, sctp_next);
5001 if (chk->data) {
5002 sctp_m_freem(chk->data);
5003 chk->data = NULL;
5005 if (chk->holds_key_ref)
5006 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
5007 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
5014 TAILQ_FOREACH_SAFE(chk, &asoc->send_queue, sctp_next, nchk) {
5015 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
5016 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
5019 panic("No chunks on the queues for sid %u.", chk->rec.data.sid);
5022 TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next);
5023 if (chk->data) {
5027 0, chk, SCTP_SO_LOCKED);
5029 if (chk->data) {
5030 sctp_m_freem(chk->data);
5031 chk->data = NULL;
5034 if (chk->holds_key_ref)
5035 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
5036 if (chk->whoTo) {
5037 sctp_free_remote_addr(chk->whoTo);
5038 chk->whoTo = NULL;
5040 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
5045 TAILQ_FOREACH_SAFE(chk, &asoc->sent_queue, sctp_next, nchk) {
5046 if (chk->sent != SCTP_DATAGRAM_NR_ACKED) {
5047 if (asoc->strmout[chk->rec.data.sid].chunks_on_queues > 0) {
5048 asoc->strmout[chk->rec.data.sid].chunks_on_queues--;
5051 panic("No chunks on the queues for sid %u.", chk->rec.data.sid);
5055 TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next);
5056 if (chk->data) {
5060 0, chk, SCTP_SO_LOCKED);
5062 if (chk->data) {
5063 sctp_m_freem(chk->data);
5064 chk->data = NULL;
5067 if (chk->holds_key_ref)
5068 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
5069 sctp_free_remote_addr(chk->whoTo);
5070 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
5082 TAILQ_FOREACH_SAFE(chk, &asoc->control_send_queue, sctp_next, nchk) {
5083 TAILQ_REMOVE(&asoc->control_send_queue, chk, sctp_next);
5084 if (chk->data) {
5085 sctp_m_freem(chk->data);
5086 chk->data = NULL;
5088 if (chk->holds_key_ref)
5089 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
5090 sctp_free_remote_addr(chk->whoTo);
5091 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
5096 TAILQ_FOREACH_SAFE(chk, &asoc->asconf_send_queue, sctp_next, nchk) {
5097 TAILQ_REMOVE(&asoc->asconf_send_queue, chk, sctp_next);
5098 if (chk->data) {
5099 sctp_m_freem(chk->data);
5100 chk->data = NULL;
5102 if (chk->holds_key_ref)
5103 sctp_auth_key_release(stcb, chk->auth_keyid, SCTP_SO_LOCKED);
5104 sctp_free_remote_addr(chk->whoTo);
5105 SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_chunk), chk);
6826 struct sctp_tmit_chunk *chk, *nchk;
6880 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) {
6882 SCTP_CALC_TSN_TO_GAP(gap, chk->rec.data.tsn, asoc->mapping_array_base_tsn);
6883 KASSERT(chk->send_size > 0, ("chunk has zero length"));
6884 if (asoc->size_on_reasm_queue >= chk->send_size) {
6885 asoc->size_on_reasm_queue -= chk->send_size;
6888 panic("size_on_reasm_queue = %u smaller than chunk length %u", asoc->size_on_reasm_queue, chk->send_size);
6895 TAILQ_REMOVE(&control->reasm, chk, sctp_next);
6896 if (chk->data) {
6897 sctp_m_freem(chk->data);
6898 chk->data = NULL;
6900 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
6940 TAILQ_FOREACH_SAFE(chk, &control->reasm, sctp_next, nchk) {
6942 SCTP_CALC_TSN_TO_GAP(gap, chk->rec.data.tsn, asoc->mapping_array_base_tsn);
6943 KASSERT(chk->send_size > 0, ("chunk has zero length"));
6944 if (asoc->size_on_reasm_queue >= chk->send_size) {
6945 asoc->size_on_reasm_queue -= chk->send_size;
6948 panic("size_on_reasm_queue = %u smaller than chunk length %u", asoc->size_on_reasm_queue, chk->send_size);
6955 TAILQ_REMOVE(&control->reasm, chk, sctp_next);
6956 if (chk->data) {
6957 sctp_m_freem(chk->data);
6958 chk->data = NULL;
6960 sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);