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.129.124]) by passt.top (Postfix) with ESMTP id 2B5925A005E for ; Wed, 4 Jan 2023 18:45:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672854321; 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=+mK6Ume0JVYP2vaIbKrEzGy7XXsl7UqlPFBv3jmwF5s=; b=EpR0pEGZO2Av+b5rFnXAyH9Q9TtSDNOf1F1q7oYqzeka6XEPkgg9z+f350051jonOLNj6c 9z0IEEQF6f4qWymk0nPJiDVAy/RPLX7/0T/8rofHL6uf9aYxtVe9wZ0MQx963590PdS+8O nzILB2Q5cdXQeuvcmVvuhlbiT6IcMtE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-641-d7vV3ozqOiuMLWe7sQ0-yw-1; Wed, 04 Jan 2023 12:45:19 -0500 X-MC-Unique: d7vV3ozqOiuMLWe7sQ0-yw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 223C0857F82; Wed, 4 Jan 2023 17:45:19 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-4.brq.redhat.com [10.40.208.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD6E21121314; Wed, 4 Jan 2023 17:45:18 +0000 (UTC) Date: Wed, 4 Jan 2023 18:45:16 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 05/18] tcp: Improve interface to tcp_l2_buf_flush() Message-ID: <20230104184516.30e10877@elisabeth> In-Reply-To: <20221209054228.4085990-6-david@gibson.dropbear.id.au> References: <20221209054228.4085990-1-david@gibson.dropbear.id.au> <20221209054228.4085990-6-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: MFAKRLWHKM3L64AMNOH63PRV5OCERW63 X-Message-ID-Hash: MFAKRLWHKM3L64AMNOH63PRV5OCERW63 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.3 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, 9 Dec 2022 16:42:15 +1100 David Gibson wrote: > Currently this takes a msghdr, but the only thing we actually care about > in there in is the io vector. Make it take an io vector directly. We also s/in is/is/, if you re-spin. > have a weird side effect of zeroing @buf_used. Just pass this by value > and zero it in the caller instead. That was done on purpose: call a "flush" function, and that will set the right value for @buf_used. On the other hand, after 3/18, I think both options are equally readable, and if you found it weird, so be it. -- Stefano