From owner-p4-projects@FreeBSD.ORG Sun Dec 9 06:27:41 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9781B16A468; Sun, 9 Dec 2007 06:27:41 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A8F616A420 for ; Sun, 9 Dec 2007 06:27:41 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0A2FB13C461 for ; Sun, 9 Dec 2007 06:27:41 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lB96RelN017155 for ; Sun, 9 Dec 2007 06:27:40 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lB96ReTk017152 for perforce@freebsd.org; Sun, 9 Dec 2007 06:27:40 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 9 Dec 2007 06:27:40 GMT Message-Id: <200712090627.lB96ReTk017152@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 130531 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2007 06:27:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=130531 Change 130531 by kmacy@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;