From owner-svn-src-all@freebsd.org Tue Apr 24 19:18:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF4ABFB0590; Tue, 24 Apr 2018 19:18:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7435277EA1; Tue, 24 Apr 2018 19:18:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it0-x234.google.com with SMTP id p3-v6so16495269itc.0; Tue, 24 Apr 2018 12:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=DQrHZ+m9M56ZtphAdQZzMjEmgLupnBue47wxv3V0MHU=; b=ljvkjFTP1sdr9YrzHNOxM5ilLa3GUBsXqqvhhRFC4syi/zTlDMNKCWNJzq0sjnPcQT TwkuIBLqTNU4Oboa8IiZolM9mn2fNZpsOtkeSbq2vhTYYj6wMjX7VjZUnsNjXafio8yk xvW5mlkbihsgEbensB0I7G5NbTGkPIzZpAZXIpE7AYcTijX8k83cFNrG5RrKIF76xJ2U uUI7o9ArHgvFOvq9GPlEU8mpK/Jrw5cEO3Lj4cnoj000YHOuLcWbeOG+PABZ1/2WNNdu I5Skl0T4HZk6Z8+aVPxY4GPMJEUfaoFyH73DTohh5N7pNDWyMiK17xNucpnRIf9KFqjt Oo5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=DQrHZ+m9M56ZtphAdQZzMjEmgLupnBue47wxv3V0MHU=; b=dfVREGbN51aWUtmcaTGg7hgExdVRGgZzAQ65fC8K9u+X5H0s6p2ajS9OZSNcrhwkcW djkv59iskIxcDPdnqBxV4tEQkm/lk8Er+71BRYteFLKlcbSpVCsAG6BeMOcoHEhaR1RV 6R8fngmBp3Qs/fQwVz1GPlAJbISt4W+Uq+Y38l7/Ix2t69YjUXvD3UFqAe9XFE69UM7L huJQvJ5O1ykICxysdTpC+lhBlXprZNQZ0ZqD/7IcGPq8Y/euDdHSVif40D5EiYX2E6uN MkTFx27IoHALxcHIPf6zealQ7MMZa1Ti9JJf6BBIL/L8TWpW1KzBK7Zb05ppyzf/2c8W l4Ow== X-Gm-Message-State: ALQs6tDEnej08pPj/OGUGlRjqc9a/prhE2JzWFFtFlPPn3VmtLF5CE2Z VXTdMUpfXvD2FZVBVzyf24J4oQ== X-Google-Smtp-Source: AB8JxZorxJKnrPQI2eXVCQGzLgA+RKlFsLf5PdRQmWpM2WfUWLIOi1h6SXN2AXm2CDEtlgFn/XSnTw== X-Received: by 2002:a24:4f46:: with SMTP id c67-v6mr21068784itb.66.1524597513421; Tue, 24 Apr 2018 12:18:33 -0700 (PDT) Received: from raichu (toroon0560w-lp130-04-184-145-252-74.dsl.bell.ca. [184.145.252.74]) by smtp.gmail.com with ESMTPSA id m184-v6sm6368692ioa.27.2018.04.24.12.18.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 12:18:32 -0700 (PDT) Sender: Mark Johnston Date: Tue, 24 Apr 2018 15:18:28 -0400 From: Mark Johnston To: Sean Bruno Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r332894 - in head: cddl/lib/libdtrace sys/kern sys/netinet sys/netinet6 sys/sys Message-ID: <20180424191828.GA8078@raichu> References: <201804231951.w3NJp0Se084895@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201804231951.w3NJp0Se084895@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2018 19:18:35 -0000 On Mon, Apr 23, 2018 at 07:51:00PM +0000, Sean Bruno wrote: > Author: sbruno > Date: Mon Apr 23 19:51:00 2018 > New Revision: 332894 > URL: https://svnweb.freebsd.org/changeset/base/332894 > > Log: > Load balance sockets with new SO_REUSEPORT_LB option > > This patch adds a new socket option, SO_REUSEPORT_LB, which allow multiple > programs or threads to bind to the same port and incoming connections will be > load balanced using a hash function. > > Most of the code was copied from a similar patch for DragonflyBSD. > > However, in DragonflyBSD, load balancing is a global on/off setting and can not > be set per socket. This patch allows for simultaneous use of both the current > SO_REUSEPORT and the new SO_REUSEPORT_LB options on the same system. > > Required changes to structures > Globally change so_options from 16 to 32 bit value to allow for more options. > Add hashtable in pcbinfo to hold all SO_REUSEPORT_LB sockets. > > Limitations > As DragonflyBSD, a load balance group is limited to 256 pcbs > (256 programs or threads sharing the same socket). > > Submitted by: Johannes Lundberg > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D11003 > > Modified: > head/cddl/lib/libdtrace/tcp.d > head/sys/kern/uipc_debug.c > head/sys/kern/uipc_socket.c > head/sys/netinet/in_pcb.c > head/sys/netinet/in_pcb.h > head/sys/netinet/ip_output.c > head/sys/netinet/tcp_subr.c > head/sys/netinet/udp_usrreq.c > head/sys/netinet6/in6_pcb.c > head/sys/netinet6/in6_src.c > head/sys/netinet6/ip6_output.c > head/sys/netinet6/udp6_usrreq.c > head/sys/sys/socket.h > head/sys/sys/socketvar.h > > Modified: head/cddl/lib/libdtrace/tcp.d > ============================================================================== > --- head/cddl/lib/libdtrace/tcp.d Mon Apr 23 18:33:26 2018 (r332893) > +++ head/cddl/lib/libdtrace/tcp.d Mon Apr 23 19:51:00 2018 (r332894) > @@ -192,12 +192,12 @@ translator tcpsinfo_t < struct tcpcb *p > { > tcps_rport = p == NULL ? 0 : ntohs(p->t_inpcb->inp_inc.inc_ie.ie_fport); > tcps_laddr = p == NULL ? 0 : > p->t_inpcb->inp_vflag == INP_IPV4 ? > - inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.ie46_local.ia46_addr4.s_addr) : > - inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.ie6_local); > + inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.id46_addr.ia46_addr4.s_addr) : > + inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependladdr.id6_addr); > tcps_raddr = p == NULL ? 0 : > p->t_inpcb->inp_vflag == INP_IPV4 ? > - inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.ie46_foreign.ia46_addr4.s_addr) : > - inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.ie6_foreign); > + inet_ntoa(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.id46_addr.ia46_addr4.s_addr) : > + inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.id6_addr); > tcps_state = p == NULL ? -1 : p->t_state; > tcps_iss = p == NULL ? 0 : p->iss; > tcps_irs = p == NULL ? 0 : p->irs; A similar change is needed in udp.d. Without it, libdtrace fails to compile its libraries when initializing a consumer, so dtrace(1) is currently unusable on head without "-x nolibs".