Date: Sun, 18 May 2014 22:37:31 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266421 - head/sys/netinet Message-ID: <201405182237.s4IMbVmx058297@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun May 18 22:37:31 2014 New Revision: 266421 URL: http://svnweb.freebsd.org/changeset/base/266421 Log: * When copying the flowid from inp -> outbound mbuf, also assign the hashtype to to the outbound mbuf as well as the flowid. * Add in socket options to fetch the hashid, the hashtype and RSS CPU ID for a given socket. Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sun May 18 22:34:06 2014 (r266420) +++ head/sys/netinet/ip_output.c Sun May 18 22:37:31 2014 (r266421) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "opt_mpath.h" #include "opt_route.h" #include "opt_sctp.h" +#include "opt_rss.h" #include <sys/param.h> #include <sys/systm.h> @@ -71,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include <netinet/in_systm.h> #include <netinet/ip.h> #include <netinet/in_pcb.h> +#include <netinet/in_rss.h> #include <netinet/in_var.h> #include <netinet/ip_var.h> #include <netinet/ip_options.h> @@ -144,6 +146,7 @@ ip_output(struct mbuf *m, struct mbuf *o M_SETFIB(m, inp->inp_inc.inc_fibnum); if (inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID)) { m->m_pkthdr.flowid = inp->inp_flowid; + M_HASHTYPE_SET(m, inp->inp_flowtype); m->m_flags |= M_FLOWID; } } @@ -1171,6 +1174,11 @@ ip_ctloutput(struct socket *so, struct s case IP_DONTFRAG: case IP_BINDANY: case IP_RECVTOS: + case IP_FLOWID: + case IP_FLOWTYPE: +#ifdef RSS + case IP_RSSCPUID: +#endif switch (sopt->sopt_name) { case IP_TOS: @@ -1232,6 +1240,18 @@ ip_ctloutput(struct socket *so, struct s case IP_RECVTOS: optval = OPTBIT(INP_RECVTOS); break; + case IP_FLOWID: + optval = inp->inp_flowid; + break; + case IP_FLOWTYPE: + optval = inp->inp_flowtype; + break; +#ifdef RSS + case IP_RSSCPUID: + optval = rss_hash2cpuid(inp->inp_flowid, + inp->inp_flowtype); + break; +#endif } error = sooptcopyout(sopt, &optval, sizeof optval); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405182237.s4IMbVmx058297>