Date: Mon, 18 May 2009 17:57:34 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r192319 - user/kmacy/releng_7_2_fcs/sys/netinet Message-ID: <200905181757.n4IHvYL2070181@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905181757.n4IHvYL2070181>