From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JrpNYrta; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id CEF115A0008 for ; Mon, 07 Apr 2025 23:49:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744062554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fP02Q30Nhx/XjBlAcPsRwe7NjQog+wjOiUr109EQgP4=; b=JrpNYrtaUFCts28aY/K06UreZoHbpyjnnMid0c6yh2IebiuDwO7+GqqPS9cBcldhoDPAsY iSHw8BEKDKh4SXoxgk1blI1f6IycxQ6ilEu76XSSpIdqwCWPC+4Ltrdz9Vt2301aQ+Rqd2 wym/18IyRErXaDTrhnjOOputt7j5I4k= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-202-6LLu-_J-NDi3GO0suzNReA-1; Mon, 07 Apr 2025 17:49:12 -0400 X-MC-Unique: 6LLu-_J-NDi3GO0suzNReA-1 X-Mimecast-MFC-AGG-ID: 6LLu-_J-NDi3GO0suzNReA_1744062551 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3913f546dfdso2837506f8f.1 for ; Mon, 07 Apr 2025 14:49:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744062550; x=1744667350; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fP02Q30Nhx/XjBlAcPsRwe7NjQog+wjOiUr109EQgP4=; b=JkbtspvQ7XxUqK8G6kHq4t0+mqAHiU4vJYSjX/C6lMnnVSOPbRvWK3UHLkHIoZFwNK EKVpr1OoCM6+wz0OI0Kiesc37Ab3Tub5FnUliT2ZRMohjw4Poz+YJTv4NcKmQxaNcMJH jUoEKEtAgjjykcmRPi6KFVYcpcw7KSxB+yiJfOD2hCGflQdJok3rk/nqpRGaC6PcD1mr iFhyf+ogooJY9MOj8flmT4UJQ5iCYfEFWSWDMNdsGBE/MlhmQUyUlq9TOUX0T4CTKPRd NqLIPGV48r2gs3aui/MuPfQcw5m33mtFFdl03z5XMmo5HRecxHqj7tFvp1IQjs6CGKwc IRsQ== X-Gm-Message-State: AOJu0Yy8ohsDaYL8wLCrqUCXWFAbmI+bC9fO1iThlOo2bamuvrupUnW9 bn6NcVzo5HzrFvXXl7P/uGkB+tCkrtMfnWAIm7eRcFScK8Dl1tZYuQWXVxxrw60XAhhhzNGIdm7 CkIMOK+i2zUc7YqkoYvDqVYPNmagxAH3OBpOaYF1ZL9JtWAXrqP1qD0OPMw== X-Gm-Gg: ASbGncsmL1kTwblJY3lLUgDMHWfOX2yiyAAJqL/vEuwLzzspTI+ePBriDV1iZRUQCqQ DBuCup2Z9yCM1fNAXENHTkDbsI0hzzxi7aUkOcMaw4gXYdmDQhzDZjfVeZuSjx/LQvJrr7vAhsD 3O6AHq4TMnVhsZKoJpoDXLbUC5xfiBjvXlfRrWSNhMjOvVFP+OJT1x/Pcd2pOtpNRu7ILasQvYo hJDhNAAwKRHvDODvCkZbxXCnq26K7z5fahFPe9huBsl2OHpMUB/UVVsUiJdNzEkqdR+Wx2bKPkM 0tckQSJ0GproIsIow8xCxTnF3jGpDsTF2h9rTxZPaKN8 X-Received: by 2002:a05:6000:2281:b0:39c:cc7:3c97 with SMTP id ffacd0b85a97d-39d6fd3646cmr6448340f8f.50.1744062550242; Mon, 07 Apr 2025 14:49:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeJbdeDRrmJ0FUdPkY1lZOsaS7zc7AhC9btcDhgzy30thriNwb1IaeGPwiwvLc+ADBaZxhmw== X-Received: by 2002:a05:6000:2281:b0:39c:cc7:3c97 with SMTP id ffacd0b85a97d-39d6fd3646cmr6448331f8f.50.1744062549882; Mon, 07 Apr 2025 14:49:09 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ec36699e0sm142333585e9.35.2025.04.07.14.49.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Apr 2025 14:49:09 -0700 (PDT) Date: Mon, 7 Apr 2025 23:49:08 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 00/12] Use connect()ed sockets for both sides of UDP flows Message-ID: <20250407234908.7ce7489d@elisabeth> In-Reply-To: <20250404101542.3729316-1-david@gibson.dropbear.id.au> References: <20250404101542.3729316-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: t1v50i7ZMbtDyVH0YGvMTJLB0NfiPVDrYlPGeXK-J_Y_1744062551 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: CV5DZXGGSTQUZ2MM6DR6PQ4WAT2LMFYT X-Message-ID-Hash: CV5DZXGGSTQUZ2MM6DR6PQ4WAT2LMFYT X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 4 Apr 2025 21:15:30 +1100 David Gibson wrote: > As discussed, I've been working on using connect()ed sockets, rather > than dups of the listening sockets for handling traffic on the > initiating side of UDP flows. This improves consistency, avoids some > problems (bug 103) and will allow for some useful future improvements. > > It has the nice side effect of allowing some more code to be shared > between various paths, resulting in a pretty nice negative diffstat. > > David Gibson (12): > udp: Use connect()ed sockets for initiating side > udp: Make udp_sock_recv() take max number of frames as a parameter > udp: Polish udp_vu_sock_info() and remove from vu specific code > udp: Don't bother to batch datagrams from "listening" socket > udp: Parameterize number of datagrams handled by > udp_*_reply_sock_data() > udp: Split spliced forwarding path from udp_buf_reply_sock_data() > udp: Merge vhost-user and "buf" listening socket paths > udp: Move UDP_MAX_FRAMES to udp.c > udp_flow: Take pif and port as explicit parameters to > udp_flow_from_sock() > udp: Rework udp_listen_sock_data() into udp_sock_fwd() > udp: Fold udp_splice_prepare and udp_splice_send into udp_sock_to_sock > udp_flow: Don't discard packets that arrive between bind() and > connect() Applied. I took the liberty of fixing up a number of nits (all in comments or outside functions), as that was all I had. I listed them as comments to single patches. -- Stefano