From owner-svn-src-user@FreeBSD.ORG Mon May 18 17:57:34 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9D17106566C; Mon, 18 May 2009 17:57:34 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E3B18FC0C; Mon, 18 May 2009 17:57:34 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4IHvYAU070184; Mon, 18 May 2009 17:57:34 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4IHvYL2070181; Mon, 18 May 2009 17:57:34 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200905181757.n4IHvYL2070181@svn.freebsd.org> From: Kip Macy Date: Mon, 18 May 2009 17:57:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192319 - user/kmacy/releng_7_2_fcs/sys/netinet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2009 17:57:35 -0000 Author: kmacy Date: Mon May 18 17:57:33 2009 New Revision: 192319 URL: http://svn.freebsd.org/changeset/base/192319 Log: glue in flowid Modified: user/kmacy/releng_7_2_fcs/sys/netinet/in_pcb.h user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c user/kmacy/releng_7_2_fcs/sys/netinet/tcp_input.c Modified: user/kmacy/releng_7_2_fcs/sys/netinet/in_pcb.h ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/in_pcb.h Mon May 18 17:48:46 2009 (r192318) +++ user/kmacy/releng_7_2_fcs/sys/netinet/in_pcb.h Mon May 18 17:57:33 2009 (r192319) @@ -168,7 +168,7 @@ struct inpcb { u_char inp_ip_ttl; /* (i) time to live proto */ u_char inp_ip_p; /* (c) protocol proto */ u_char inp_ip_minttl; /* (i) minimum TTL or drop */ - uint32_t inp_ispare1; /* (x) connection id / queue id */ + uint32_t inp_flowid; /* (x) connection id / queue id */ u_int inp_refcount; /* (i) refcount */ void *inp_pspare[2]; /* (x) rtentry / general use */ Modified: user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Mon May 18 17:48:46 2009 (r192318) +++ user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Mon May 18 17:57:33 2009 (r192319) @@ -158,6 +158,10 @@ ip_output(struct mbuf *m, struct mbuf *o if (inp != NULL) { M_SETFIB(m, inp->inp_inc.inc_fibnum); INP_LOCK_ASSERT(inp); + if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) { + m->m_pkthdr.flowid = inp->inp_flowid; + m->m_flags |= M_FLOWID; + } } if ((ro == &iproute) && (ro->ro_rt == NULL) && (ro->ro_lle == NULL)) { if (flowtable_lookup(ip_ft, m, ro) == 0) Modified: user/kmacy/releng_7_2_fcs/sys/netinet/tcp_input.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/tcp_input.c Mon May 18 17:48:46 2009 (r192318) +++ user/kmacy/releng_7_2_fcs/sys/netinet/tcp_input.c Mon May 18 17:57:33 2009 (r192319) @@ -595,7 +595,14 @@ findpcb: goto dropwithreset; } INP_WLOCK(inp); - + if (!(inp->inp_flags & INP_HW_FLOWID) + && (m->m_flags & M_FLOWID) + && ((inp->inp_socket == NULL) + || !(inp->inp_socket->so_options & SO_ACCEPTCONN))) { + inp->inp_flags |= INP_HW_FLOWID; + inp->inp_flags &= ~INP_SW_FLOWID; + inp->inp_flowid = m->m_pkthdr.flowid; + } #ifdef IPSEC #ifdef INET6 if (isipv6 && ipsec6_in_reject(m, inp)) {