MFC 312906:

Unregister CPL handlers for TOE-related messages when unloading TOM.

Sponsored by:	Chelsio Communications
This commit is contained in:
John Baldwin 2017-02-03 23:33:06 +00:00
parent d85f210000
commit 6b22c99601
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=313178
5 changed files with 30 additions and 6 deletions

View File

@ -275,6 +275,14 @@ t4_init_connect_cpl_handlers(void)
t4_register_cpl_handler(CPL_ACT_OPEN_RPL, do_act_open_rpl);
}
void
t4_uninit_connect_cpl_handlers(void)
{
t4_register_cpl_handler(CPL_ACT_ESTABLISH, NULL);
t4_register_cpl_handler(CPL_ACT_OPEN_RPL, NULL);
}
#define DONT_OFFLOAD_ACTIVE_OPEN(x) do { \
reason = __LINE__; \
rc = (x); \

View File

@ -1798,11 +1798,11 @@ void
t4_uninit_cpl_io_handlers(void)
{
t4_register_cpl_handler(CPL_PEER_CLOSE, do_peer_close);
t4_register_cpl_handler(CPL_CLOSE_CON_RPL, do_close_con_rpl);
t4_register_cpl_handler(CPL_ABORT_REQ_RSS, do_abort_req);
t4_register_cpl_handler(CPL_ABORT_RPL_RSS, do_abort_rpl);
t4_register_cpl_handler(CPL_RX_DATA, do_rx_data);
t4_register_cpl_handler(CPL_FW4_ACK, do_fw4_ack);
t4_register_cpl_handler(CPL_PEER_CLOSE, NULL);
t4_register_cpl_handler(CPL_CLOSE_CON_RPL, NULL);
t4_register_cpl_handler(CPL_ABORT_REQ_RSS, NULL);
t4_register_cpl_handler(CPL_ABORT_RPL_RSS, NULL);
t4_register_cpl_handler(CPL_RX_DATA, NULL);
t4_register_cpl_handler(CPL_FW4_ACK, NULL);
}
#endif

View File

@ -1677,4 +1677,14 @@ t4_init_listen_cpl_handlers(void)
t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, do_pass_accept_req);
t4_register_cpl_handler(CPL_PASS_ESTABLISH, do_pass_establish);
}
void
t4_uninit_listen_cpl_handlers(void)
{
t4_register_cpl_handler(CPL_PASS_OPEN_RPL, NULL);
t4_register_cpl_handler(CPL_CLOSE_LISTSRV_RPL, NULL);
t4_register_cpl_handler(CPL_PASS_ACCEPT_REQ, NULL);
t4_register_cpl_handler(CPL_PASS_ESTABLISH, NULL);
}
#endif

View File

@ -1225,6 +1225,10 @@ t4_tom_mod_unload(void)
t4_ddp_mod_unload();
t4_uninit_connect_cpl_handlers();
t4_uninit_listen_cpl_handlers();
t4_uninit_cpl_io_handlers();
return (0);
}
#endif /* TCP_OFFLOAD */

View File

@ -298,12 +298,14 @@ void release_lip(struct tom_data *, struct clip_entry *);
/* t4_connect.c */
void t4_init_connect_cpl_handlers(void);
void t4_uninit_connect_cpl_handlers(void);
int t4_connect(struct toedev *, struct socket *, struct rtentry *,
struct sockaddr *);
void act_open_failure_cleanup(struct adapter *, u_int, u_int);
/* t4_listen.c */
void t4_init_listen_cpl_handlers(void);
void t4_uninit_listen_cpl_handlers(void);
int t4_listen_start(struct toedev *, struct tcpcb *);
int t4_listen_stop(struct toedev *, struct tcpcb *);
void t4_syncache_added(struct toedev *, void *);