[rfc] set inp_flowid on initial TCP connection

Adrian Chadd adrian at freebsd.org
Sun Jan 19 23:23:25 UTC 2014


Ok, I've committed this to -HEAD.

Thanks,


-a


On 16 January 2014 12:28, Adrian Chadd <adrian at 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.


More information about the freebsd-net mailing list