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

MFC after:	1 week
Sponsored by:	Chelsio Communications
This commit is contained in:
John Baldwin 2017-01-27 23:08:30 +00:00
parent e035717e57
commit fbb779cca9
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

@ -1848,12 +1848,12 @@ 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);
}
/*

View File

@ -1622,4 +1622,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

@ -1227,6 +1227,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

@ -326,12 +326,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 *);