Date: Wed, 23 May 2018 20:50:10 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334116 - head/sys/netinet Message-ID: <201805232050.w4NKoATG064633@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmacy Date: Wed May 23 20:50:09 2018 New Revision: 334116 URL: https://svnweb.freebsd.org/changeset/base/334116 Log: udp: assign flowid to udp sockets round-robin On a 2x8x2 SKL this increases measured throughput with 64 netperf -H $DUT -t UDP_STREAM -- -m 1 from 590kpps to 1.1Mpps before: https://people.freebsd.org/~mmacy/2018.05.11/udpsender.svg after: https://people.freebsd.org/~mmacy/2018.05.11/udpsender2.svg Modified: head/sys/netinet/udp_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Wed May 23 20:06:04 2018 (r334115) +++ head/sys/netinet/udp_usrreq.c Wed May 23 20:50:09 2018 (r334116) @@ -1565,6 +1565,7 @@ udp_abort(struct socket *so) static int udp_attach(struct socket *so, int proto, struct thread *td) { + static uint32_t udp_flowid; struct inpcb *inp; struct inpcbinfo *pcbinfo; int error; @@ -1585,6 +1586,8 @@ udp_attach(struct socket *so, int proto, struct thread inp = sotoinpcb(so); inp->inp_vflag |= INP_IPV4; inp->inp_ip_ttl = V_ip_defttl; + inp->inp_flowid = atomic_fetchadd_int(&udp_flowid, 1); + inp->inp_flowtype = M_HASHTYPE_OPAQUE; error = udp_newudpcb(inp); if (error) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805232050.w4NKoATG064633>