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 AC7635A0275 for ; Fri, 8 Mar 2024 09:34:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709886882; 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=67GZKpSCuHU7fWgYLLHuv3KDaeNnBcx3KAHi6sYpUKA=; b=EpI60artDcnpaDFXFOFb6c0Pp2813CMbdx7xIUOZ4OxeEl0ywR2uJ6rqukkUg3EUBq3iXy K2rtaQlmJRO/XbtezWUd9Cwi+86cgrYXmUccmk0ZZNWO7GWp9O0uRzD/ars9RoOEEq+yH6 Ba/u59FWjf5LAFOwJi9dv0HK+cvK8MU= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-303-otq-aF8kOcmtYxfqiE8AEQ-1; Fri, 08 Mar 2024 03:34:40 -0500 X-MC-Unique: otq-aF8kOcmtYxfqiE8AEQ-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a45c994ba7cso104423266b.1 for ; Fri, 08 Mar 2024 00:34:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709886879; x=1710491679; 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=67GZKpSCuHU7fWgYLLHuv3KDaeNnBcx3KAHi6sYpUKA=; b=t7U8/shB5fzHMqSf4iQ9Go1JhFYVFPA0KSO8uHvITM9SIt1LTrMBtPWLt7xMfrvDS+ 2SXM+8PApVGDmCyB6GnUIcEc5HObSnVNAycNUmDm6qv3qzusneiCJDr4950JhRD9np4n igxfbrbP+oeJAdqalEZfGArh2iQNaHvRUCwpTNBE5Czk2Oa5GHZAxcGnE8HqDuJjTGOL hIVTipuG+2VHv/rv19wra+ZV1OZ73+MyT+6T/xtcSK/YBd1jNj6YC2uISDJOS1NZGnmO 0Y5JzSifX4Jb2BAvNrHxe+oPGMX6csz1DfWMc2pFO6EvQv+QKP30Qp4Bk7MPJhMTLf1f BOjA== X-Forwarded-Encrypted: i=1; AJvYcCXvtIqmVCF3JRUs59KZT7JrvxL5b+332sjTDl3qTkojSet8HQCiMt6MDUgi7gYqUOxoxcRHI+1wZQYNqJRcR3s3Qp/t X-Gm-Message-State: AOJu0YyhFLgrEjL67y3QuFES/DvW9yCiFh6upFSpOzwlLQVAGqpAEWH8 8pea6MzjHEpMk3pXs25vVf6w3xYGSBnOt2DUGPEEQ7R18oTGBm9VrP97BTVjUyeuiMIEjEf5fuY hc+SfuAjK5jrtWo9ySBKATGsu8rgYPNZL2agWIE7uSvUlm6p6Lg== X-Received: by 2002:a17:906:16c7:b0:a44:d498:c6b8 with SMTP id t7-20020a17090616c700b00a44d498c6b8mr12385355ejd.40.1709886879478; Fri, 08 Mar 2024 00:34:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFa314TqthL/5cbzCS4kiPk0725tPlnaAXEYTPK0QbPDT4G22JgrA2tHmWVuywDevnbHe7pw== X-Received: by 2002:a17:906:16c7:b0:a44:d498:c6b8 with SMTP id t7-20020a17090616c700b00a44d498c6b8mr12385342ejd.40.1709886878930; Fri, 08 Mar 2024 00:34:38 -0800 (PST) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id ju22-20020a170906e91600b00a45c18345e0sm2286158ejb.163.2024.03.08.00.34.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Mar 2024 00:34:38 -0800 (PST) Date: Fri, 8 Mar 2024 09:34:04 +0100 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH 0/4] Some improvements to the tap send path Message-ID: <20240308093404.3328ad2a@elisabeth> In-Reply-To: <348a52c9-7c07-4150-b594-4743c7775be6@redhat.com> References: <20240308065325.2181322-1-david@gibson.dropbear.id.au> <348a52c9-7c07-4150-b594-4743c7775be6@redhat.com> 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: A52WOAUTJHGCKRAACOJS73O3NMKJ3VQF X-Message-ID-Hash: A52WOAUTJHGCKRAACOJS73O3NMKJ3VQF 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: David Gibson , 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, 8 Mar 2024 09:18:48 +0100 Laurent Vivier wrote: > On 3/8/24 07:53, David Gibson wrote: > > This series has a handful of small improvements to the tap send path. > > See individual commit messages for the details. > > > > I expect this will conflict with Laurent's upcoming work. I hope the > > conflicts won't be too bad, and indeed will set us up for less > > duplication there in the end. > > I'm working on patch that devides TCP buffers in several buffers pointed out by an IOV > arrays and then provided to tap_send_frames(). I'm going to base my patch on this series. > > The idea is: > > A frame is made with 4 iovecs: > > #define TCP_IOV_VNET 0 > #define TCP_IOV_ETH 1 > #define TCP_IOV_IP 2 > #define TCP_IOV_PAYLOAD 3 > #define TCP_IOV_NUM 4 > typedef struct iovec tap_iovec_t[TCP_IOV_NUM]; Except for the typedef :) (I'm actively trying to discourage them) ...this looks very neat. I would suggest that as soon as you have something barely spitting out pseudo-correct bytes, you give it a try with perf(1). I'm quite concerned that we might end up killing throughput, especially without vhost-user, even though in theory it all sounds nice and byte-saving. -- Stefano