PERFORCE change 130531 for review

Kip Macy kmacy at FreeBSD.org
Sat Dec 8 22:27:42 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=130531

Change 130531 by kmacy at kmacy:storage:toestack on 2007/12/09 06:26:59

	add interface hook to allow TCP to tell the TOE that the upper
	level data structures are going away

Affected files ...

.. //depot/projects/toestack/sys/netinet/tcp_ofld.c#7 edit
.. //depot/projects/toestack/sys/netinet/tcp_ofld.h#7 edit
.. //depot/projects/toestack/sys/netinet/tcp_subr.c#9 edit

Differences ...

==== //depot/projects/toestack/sys/netinet/tcp_ofld.c#7 (text+ko) ====

@@ -88,6 +88,12 @@
 }
 
 void
+ofld_detach(struct tcpcb *tp)
+{	
+	tp->t_tu->tu_detach(tp);
+}
+
+void
 ofld_listen_open(struct tcpcb *tp)
 {
 	EVENTHANDLER_INVOKE(ofld_listen, OFLD_LISTEN_OPEN, tp);

==== //depot/projects/toestack/sys/netinet/tcp_ofld.h#7 (text+ko) ====

@@ -12,6 +12,7 @@
 int ofld_rcvd(struct tcpcb *tp);
 int ofld_disconnect(struct tcpcb *tp);
 int ofld_abort(struct tcpcb *tp);
+void ofld_detach(struct tcpcb *tp);
 
 void ofld_listen_open(struct tcpcb *tp);
 void ofld_listen_close(struct tcpcb *tp);
@@ -96,6 +97,13 @@
 {
 	ofld_listen_close(tp);
 }
+
+static __inline void
+tcp_gen_detach(struct tcpcb *tp)
+{
+	ofld_detach(tp);
+}
+
 #else
 
 static __inline int
@@ -134,6 +142,12 @@
 static __inline void
 tcp_gen_listen_close(struct tcpcb *tp) {}
 
+static __inline void
+tcp_gen_detach(struct tcpcb *tp) {}
+
+	
+
+
 #endif
 
 struct toe_usrreqs {
@@ -141,6 +155,7 @@
 	int (*tu_rcvd)(struct tcpcb *tp);
 	int (*tu_disconnect)(struct tcpcb *tp);
 	int (*tu_abort)(struct tcpcb *tp);
+	void (*tu_detach)(struct tcpcb *tp);
 
 };
 

==== //depot/projects/toestack/sys/netinet/tcp_subr.c#9 (text+ko) ====

@@ -750,6 +750,9 @@
 		tp->t_segqlen--;
 		tcp_reass_qsize--;
 	}
+	if (tp->t_flags & TF_TOE) 
+		tcp_gen_detach(tp);
+		
 	tcp_free_sackholes(tp);
 	inp->inp_ppcb = NULL;
 	tp->t_inpcb = NULL;


More information about the p4-projects mailing list