Hi, It looks like a bug. We should make sure the fifo exists, which is typically the case unless transport is stuck in half-open. Note that tcp does timeout and cleanups those stuck half-open sessions, but we should allow the app to cleanup as well.
Let me know if you plan to push a patch or I should do it. Regards, Florin > On Oct 12, 2022, at 12:44 AM, Zhang Dongya <fortitude.zh...@gmail.com> wrote: > > Hi, > > I am now trying to use vpp host-stack to negotiate a valid TCP session, > however, I found if I call vnet_disconnect_session when the TCP stuck in > syn-sent state (this may be caused by I have shutdown the remove side). > > Vpp will crash in the following code which call svm_fifo_clear_deq_ntf while > the tx_fifo is not inited, this is because the tx_fifo will be allocated init > app_worker_init_connected. > > Is this a bug or I have something wrong with my using of host-stack? > > > > void > session_close (session_t * s) > { > if (!s) > return; > > if (s->session_state >= SESSION_STATE_CLOSING) > { > /* Session will only be removed once both app and transport > * acknowledge the close */ > if (s->session_state == SESSION_STATE_TRANSPORT_CLOSED > || s->session_state == SESSION_STATE_TRANSPORT_DELETED) > session_program_transport_ctrl_evt (s, SESSION_CTRL_EVT_CLOSE); > return; > } > > /* App closed so stop propagating dequeue notifications */ > svm_fifo_clear_deq_ntf (s->tx_fifo); > s->session_state = SESSION_STATE_CLOSING; > session_program_transport_ctrl_evt (s, SESSION_CTRL_EVT_CLOSE); > } > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22011): https://lists.fd.io/g/vpp-dev/message/22011 Mute This Topic: https://lists.fd.io/mt/94276501/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-