From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 02B695A0278 for ; Sun, 18 Feb 2024 22:01:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708290093; 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=ZrSP/zBzIQlEHG6lBF0/6a5+5x4uHhLbLAm+ZQa7dzU=; b=fl0p66sOgagOmQ8tG2nnLpmy8pjhIuvsVDFr6twwbXTL1bizZv/FO/hKL1hw/2EaFyG8cU eOgeLGdc52VSnrZxv2xwrh3PzZPR9VcIT2lE4W2K+YGV8JErdR5fVEasHsQs0FXOXePK+6 NSeqzf9EdUYt6O6R36MmXoxua22NnfA= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-156-W_yB-S6RNrqCOq-3f8txEw-1; Sun, 18 Feb 2024 16:01:31 -0500 X-MC-Unique: W_yB-S6RNrqCOq-3f8txEw-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a3d7b6e42b9so171349866b.0 for ; Sun, 18 Feb 2024 13:01:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708290089; x=1708894889; 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=ZrSP/zBzIQlEHG6lBF0/6a5+5x4uHhLbLAm+ZQa7dzU=; b=ME+vB9hH3t/mjxVrSf7aIYTWfOqrddCPLrxfcMC9PHgU95LHHgOwVVA/JTW/Ci8zpb WtrEPsoJcqbvihLX2vcRJRgddepmR9Q97+CsdkJUyFUmyd4Gi5IFioz4CcjZya8glHRS suWLy7TUV4HN/ZpMdBn6V9YnH1j6uv7Kj56Wc6PsIS5Nt3xDZESUJkGcRXkQg8Evl+fk qUz1ynuOrhXWsgm+xVtF21tdli+59mWd1JDlEYOeN7XDibFohPnRDbXg4JOwjYAY4V/r 5rgqy4/q5b07ZliTntNfMT55ykxfEgS6OMay9qjvBpveBm/u2dGSa+Y/jUbsgUx6QCBz 5/cg== X-Gm-Message-State: AOJu0Yzj2G5ZR7iwA2SG+DM8bLxulXkpcDMU75mY2epW23s5LBLUQJhT eed15I+upWU6IErl2W7eGiz/BnutFTguiABM8z8e2UFTpDPVrSwRlKwEGwQjlx+30tm1vyx8el4 Sqgo+SLr+/Ehof/TWgNTocIA0sXVeiMC4GXb7LWvPpys92YGLY4dZNRwOXdVD X-Received: by 2002:a17:906:cd1a:b0:a3e:4093:89df with SMTP id oz26-20020a170906cd1a00b00a3e409389dfmr2164610ejb.74.1708290089629; Sun, 18 Feb 2024 13:01:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDmtIbQbEFDJXjI4hHFRc4Lx5aPbBdJmdM4fu1Nw0EKYbQFMqqw9tiekuVe/t89XH8QGG/2Q== X-Received: by 2002:a17:906:cd1a:b0:a3e:4093:89df with SMTP id oz26-20020a170906cd1a00b00a3e409389dfmr2164603ejb.74.1708290089293; Sun, 18 Feb 2024 13:01:29 -0800 (PST) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id gs8-20020a1709072d0800b00a3dab486a19sm2234263ejc.118.2024.02.18.13.01.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Feb 2024 13:01:28 -0800 (PST) Date: Sun, 18 Feb 2024 22:00:55 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 13/22] tcp_splice: More specific variable names in new splice path Message-ID: <20240218220055.4943925c@elisabeth> In-Reply-To: <20240206011734.884138-14-david@gibson.dropbear.id.au> References: <20240206011734.884138-1-david@gibson.dropbear.id.au> <20240206011734.884138-14-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: FLNYFZ5UAGWBFYDAFYKIYZYXS323HABT X-Message-ID-Hash: FLNYFZ5UAGWBFYDAFYKIYZYXS323HABT 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 Tue, 6 Feb 2024 12:17:25 +1100 David Gibson wrote: > In tcp_splice_conn_from_sock(), the 'port' variable stores the source port > of the connection on the originating side. In tcp_splice_new(), called > directly from it, the 'port' parameter gives the _destination_ port of the > originating connection and is then updated to the destination port of the > connection on the other side. > > Similarly, in tcp_splice_conn_from_sock(), 's' is the fd of the accetped > socket (on side 0), whereas in tcp_splice_new(), 's' is the fd of the > connecting socket (side 1). > > I, for one, find having the same variable name with different meanings in > such close proximity in the flow of control pretty confusing. Yeah, same here, it took me a while to check that what you're changing to 'dstport' is actually a destination port (and not just because a comment says that). -- Stefano