svn commit: r312906 - head/sys/dev/cxgbe/tom
John Baldwin
jhb at FreeBSD.org
Fri Jan 27 23:08:31 UTC 2017
Author: jhb
Date: Fri Jan 27 23:08:30 2017
New Revision: 312906
URL: https://svnweb.freebsd.org/changeset/base/312906
Log:
Unregister CPL handlers for TOE-related messages when unloading TOM.
MFC after: 1 week
Sponsored by: Chelsio Communications
Modified:
head/sys/dev/cxgbe/tom/t4_connect.c
head/sys/dev/cxgbe/tom/t4_cpl_io.c
head/sys/dev/cxgbe/tom/t4_listen.c
head/sys/dev/cxgbe/tom/t4_tom.c
head/sys/dev/cxgbe/tom/t4_tom.h
Modified: head/sys/dev/cxgbe/tom/t4_connect.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_connect.c Fri Jan 27 23:08:06 2017 (r312905)
+++ head/sys/dev/cxgbe/tom/t4_connect.c Fri Jan 27 23:08:30 2017 (r312906)
@@ -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); \
Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Jan 27 23:08:06 2017 (r312905)
+++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Fri Jan 27 23:08:30 2017 (r312906)
@@ -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);
}
/*
Modified: head/sys/dev/cxgbe/tom/t4_listen.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_listen.c Fri Jan 27 23:08:06 2017 (r312905)
+++ head/sys/dev/cxgbe/tom/t4_listen.c Fri Jan 27 23:08:30 2017 (r312906)
@@ -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
Modified: head/sys/dev/cxgbe/tom/t4_tom.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_tom.c Fri Jan 27 23:08:06 2017 (r312905)
+++ head/sys/dev/cxgbe/tom/t4_tom.c Fri Jan 27 23:08:30 2017 (r312906)
@@ -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 */
Modified: head/sys/dev/cxgbe/tom/t4_tom.h
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_tom.h Fri Jan 27 23:08:06 2017 (r312905)
+++ head/sys/dev/cxgbe/tom/t4_tom.h Fri Jan 27 23:08:30 2017 (r312906)
@@ -326,12 +326,14 @@ void release_lip(struct tom_data *, stru
/* 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 *);
More information about the svn-src-all
mailing list