Date: Sun, 19 Jan 2014 15:23:23 -0800 From: Adrian Chadd <adrian@freebsd.org> To: FreeBSD Net <freebsd-net@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: [rfc] set inp_flowid on initial TCP connection Message-ID: <CAJ-VmompCyyhA9FCGyW%2BpzUb=HhpOcRR9XY=KutNQ03RRN3GtA@mail.gmail.com> In-Reply-To: <CAJ-VmonO3i7bdY7t8gWyFOcDRA8g_5GYX_0ijhkCxnQkkBwaww@mail.gmail.com> References: <CAJ-VmonO3i7bdY7t8gWyFOcDRA8g_5GYX_0ijhkCxnQkkBwaww@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok, I've committed this to -HEAD.
Thanks,
-a
On 16 January 2014 12:28, Adrian Chadd <adrian@freebsd.org> wrote:
> Hi,
>
> This patch sets the inp_flowid on incoming connections. Without this,
> the initial connection has no flowid, so things like the per-CPU TCP
> callwheel stuff would map to a different CPU on the initial incoming
> setup.
>
>
>
> -a
>
> Index: sys/netinet/tcp_syncache.c
> ===================================================================
> --- sys/netinet/tcp_syncache.c (revision 260499)
> +++ sys/netinet/tcp_syncache.c (working copy)
> @@ -722,6 +722,16 @@
> #endif
>
> /*
> + * If there's an mbuf and it has a flowid, then let's initialise the
> + * inp with that particular flowid.
> + */
> + if (m != NULL && m->m_flags & M_FLOWID) {
> + inp->inp_flags |= INP_HW_FLOWID;
> + inp->inp_flags &= ~INP_SW_FLOWID;
> + inp->inp_flowid = m->m_pkthdr.flowid;
> + }
> +
> + /*
> * Install in the reservation hash table for now, but don't yet
> * install a connection group since the full 4-tuple isn't yet
> * configured.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmompCyyhA9FCGyW%2BpzUb=HhpOcRR9XY=KutNQ03RRN3GtA>
