From owner-svn-src-user@FreeBSD.ORG Mon Jun 8 04:09:13 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 7521D106566C; Mon, 8 Jun 2009 04:09:13 +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 63BD28FC14; Mon, 8 Jun 2009 04:09:13 +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 n5849Dgq015313; Mon, 8 Jun 2009 04:09:13 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5849DgS015311; Mon, 8 Jun 2009 04:09:13 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906080409.n5849DgS015311@svn.freebsd.org> From: Kip Macy Date: Mon, 8 Jun 2009 04:09:13 +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: r193681 - 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, 08 Jun 2009 04:09:13 -0000 Author: kmacy Date: Mon Jun 8 04:09:13 2009 New Revision: 193681 URL: http://svn.freebsd.org/changeset/base/193681 Log: give all udp packets a flowid Modified: user/kmacy/releng_7_2_fcs/sys/netinet/in_pcb.c user/kmacy/releng_7_2_fcs/sys/netinet/udp_usrreq.c Modified: user/kmacy/releng_7_2_fcs/sys/netinet/in_pcb.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/in_pcb.c Mon Jun 8 04:08:18 2009 (r193680) +++ user/kmacy/releng_7_2_fcs/sys/netinet/in_pcb.c Mon Jun 8 04:09:13 2009 (r193681) @@ -196,7 +196,8 @@ in_pcballoc(struct socket *so, struct in #endif struct inpcb *inp; int error; - + static int flowid = 1; + INP_INFO_WLOCK_ASSERT(pcbinfo); error = 0; inp = uma_zalloc(pcbinfo->ipi_zone, M_NOWAIT); @@ -207,6 +208,7 @@ in_pcballoc(struct socket *so, struct in inp->inp_socket = so; inp->inp_cred = crhold(so->so_cred); inp->inp_inc.inc_fibnum = so->so_fibnum; + inp->inp_flowid = flowid++; #ifdef MAC error = mac_inpcb_init(inp, M_NOWAIT); if (error != 0) Modified: user/kmacy/releng_7_2_fcs/sys/netinet/udp_usrreq.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/udp_usrreq.c Mon Jun 8 04:08:18 2009 (r193680) +++ user/kmacy/releng_7_2_fcs/sys/netinet/udp_usrreq.c Mon Jun 8 04:09:13 2009 (r193681) @@ -1116,7 +1116,11 @@ udp_output(struct inpcb *inp, struct mbu INP_INFO_WUNLOCK(&V_udbinfo); else if (unlock_udbinfo == 1) INP_INFO_RUNLOCK(&V_udbinfo); - error = ip_output(m, inp->inp_options, NULL, ipflags, + if (inp->inp_flowid != 0) { + m->m_pkthdr.flowid = inp->inp_flowid; + m->m_flags |= M_FLOWID; + } + error = ip_output(m, inp->inp_options, NULL, ipflags, inp->inp_moptions, inp); if (unlock_udbinfo == 2) INP_WUNLOCK(inp);