qcm_strm_shut() callback was extended to ensure stream is properly
closed. Only SE_SHR_DRAIN mode was left unsupported as it was considered
not possible to encounter it. As such a BUG_ON() was added in shut
callback.
Since QUIC backend support, SE_SHR_DRAIN may be used on shut for checks.
As such, it is required to properly handle it. This patch removes the
BUG_ON() and treat SE_SHR_DRAIN similarly to SE_SHR_RESET.
This must be backported up to 3.3.
TRACE_ENTER(QMUX_EV_STRM_SHUT, qcc->conn, qcs);
- /* Not implemented. */
- BUG_ON(mode & SE_SHR_DRAIN);
-
/* Early closure reported if QC_SF_FIN_STREAM not yet set. */
if ((mode & (SE_SHW_SILENT|SE_SHW_NORMAL)) &&
!qcs_is_close_local(qcs) &&
tasklet_wakeup(qcc->wait_event.tasklet);
}
- if ((mode & SE_SHR_RESET) &&
+ if ((mode & (SE_SHR_RESET|SE_SHR_DRAIN)) &&
!qcs_is_close_remote(qcs) && !(qcs->flags & (QC_SF_READ_ABORTED))) {
qcc->app_ops->lclose(qcs, QCC_APP_OPS_LCLO_MODE_READ);
}