From nobody Thu Aug 29 21:43:54 2024 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WvvtQ3TqFz5MTM4 for ; Thu, 29 Aug 2024 21:43:58 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WvvtP66DLz4WLV for ; Thu, 29 Aug 2024 21:43:57 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=BF4314Sv; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::1135 as permitted sender) smtp.mailfrom=markjdb@gmail.com Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-6b8f13f28fbso10333047b3.1 for ; Thu, 29 Aug 2024 14:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724967837; x=1725572637; darn=freebsd.org; h=content-disposition:mime-version:message-id:subject:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=s/YUvzXoGaVC/T95vTvrj8oxpeRVNINkcvWHm4p17+A=; b=BF4314SvvN4vLmA/betTvl8bz7VNsQ3lp/01YP1eqRRkeAYu6byxuciWtplRNSkxlr kvqso0IDGrf+X5tZtTSrkjOwTFzLH+oLZSr25F0tSHEv+/b1tccA4zZPvsgWDz8PPRV/ gdOodivRgcwtbkrvgw9wTpDd0oA0lVeCII+HHnjWdZrTNsybgkXuZyLcwkn6vCtUG2LL /PxfHC0p57lOLbC2bVaHRf1Qc9D2DPjlqNFI9+/0wse78oYHV9s1tSoSaiw0aFbPh8DB fUCbA+RvZK9IFdbZNKQ1SUcX+jusNe/n6bkmXDGd1mzcVf3QCdE8vyGNGhhOpRL3lQub 2aqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724967837; x=1725572637; h=content-disposition:mime-version:message-id:subject:to:from:date :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s/YUvzXoGaVC/T95vTvrj8oxpeRVNINkcvWHm4p17+A=; b=aI3iP1cVa0p53wVJv2Gult7HMjNtW7bNy8U9y1DwmuhMD9IrAXUzyoB6ENRgxRCSd6 mKiC+X+8Yuw/Vbn0QmvyV0fl/h6040eaVK5ywbpfNgzF3Bq80zQcEgCNlIqC0vkVJu5d xZ6/a922lBgk7C/dCZYMVAHYSDuadYQOVpL+JkIK9Ai0Iqw7wr2kKzMG9xB/Fd+4S17w D7OO87Exa9bokjgefSkKE38Rxhs8BLeYytRqrB+xTTkIjnfwiu570T/j98yuGmbQbTcM GZCdXz/9YnVWWSbhO7z0X7m8HbZI9SlN6DuiiXSr4HXK1puVZ5fJCXY6iciC6w09yugg Az2A== X-Gm-Message-State: AOJu0Yya79KdOeI9xEN415SzPUvmN4VayoVkKegwI40DyYkr17VNpVTj zqDIP+1MOWkVdTSY+SXyqstygomkueFEWcH/hjiL1fywZs6AxhaPXKeIMw== X-Google-Smtp-Source: AGHT+IFFbn6N14IjVTZ88mFHpaON6LkIqjG6cN1b/md99+iOEFaov0hp727cQiiReYOtt+fQVDUV+A== X-Received: by 2002:a05:690c:60c7:b0:6af:eb0b:6544 with SMTP id 00721157ae682-6d277778e0emr48106157b3.35.1724967836993; Thu, 29 Aug 2024 14:43:56 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a806d5e1e1sm87747885a.103.2024.08.29.14.43.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2024 14:43:56 -0700 (PDT) Date: Thu, 29 Aug 2024 17:43:54 -0400 From: Mark Johnston To: freebsd-net@freebsd.org Subject: SO_SPLICE implementation Message-ID: List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.58 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.978]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), DKIM not aligned (relaxed),none]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; TO_DOM_EQ_FROM_DOM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1135:from] X-Rspamd-Queue-Id: 4WvvtP66DLz4WLV Hello, Drew Gallatin and I have been working on an implementation of SO_SPLICE, an interface which allows TCP connections to be spliced together. This is intended for use in proxy applications to reduce the overhead of copying data between connections. At the moment the interface isn't widely used, though I'll make sure that net/relayd can take advantage of it (which it already does on OpenBSD). If there are existing applications that might take advantage of it, especially in the FreeBSD base system, I'd be interested to hear suggestions. The code review is here if anyone's interested in looking at the implementation: https://reviews.freebsd.org/D46411