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 E489F5A0271 for ; Fri, 8 Mar 2024 16:49:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709912965; 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=k6lXskzI15/jud2n3z6RJrz59HTENvklmrzp/LeDtkg=; b=V6g9+fjjTZElqBg3B3TNOKHke6lZi8vJrvVSxCJ8bZ5Jiqxc7iRhPHD6m03R++67f/yZvz 1yRs6Jari+dvRLkK1swrwFHWn6eflg+MoodyZSuZ4rKfRRcI6lS6mAici5WFhvU4yWR8MJ Td6rl6/i88sRibdSfDqG9zdwmogWBAQ= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-616-2eXoQMNwNOach5IgdAb_Rg-1; Fri, 08 Mar 2024 10:49:23 -0500 X-MC-Unique: 2eXoQMNwNOach5IgdAb_Rg-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-33d8d208be9so526434f8f.2 for ; Fri, 08 Mar 2024 07:49:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709912962; x=1710517762; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k6lXskzI15/jud2n3z6RJrz59HTENvklmrzp/LeDtkg=; b=rMVI+FQY8r+HQRJZ6ytyPiEDDKeVkiVOcMkWRiJDCD6NSco7wuxIQGT0m875nkUuqG DDDWIVItjbFbOQMyRxjxDY9csOGtMzPCWvddwKNLhZOrI0e4I/DL9WTrAQ31Bd8nKAwI HCRoE2OAa5r2Bvgtj80a4Ogt0FTWY9piq97TqAwnZaoDgZXUtnB8eVtKmBx3YCda3jIi PQXpydFihVO0gJqbBCFskmRYvMtatBymjWuitcSv0p0NtCUgOP539+a7j70ad95eqOED wmLQW+4K3NPbse0fo/1eMuP5isMWU5HodKpIfPu9v8QXz7seBXmxj11BfZqPnBHB9rfk NDRg== X-Forwarded-Encrypted: i=1; AJvYcCWqOEFH5bJAVcVn06I9sT1GRFWFpMFBCKdCs36iXBVO+Jwi1quKtIQPoy9DiFwWu6Pul1X2nVY8TL2bJpQFUwjA1BCd X-Gm-Message-State: AOJu0YyyFnribIW6Z8if2Cx4VgaIEJqvFcqY/gYTUzu/q6zGZTzyeuId GwGBUrbhIiYbJ4TaQdTeSP5nMGPNhtUBrhb5sAk6b9KOsfnltniNJTlZRkVPreGN04HIFomh2ZQ DL2sHEDGnfotvo+ZnhO1O4SC5iYlZ5QmxCYyYwpdnuFzbB5Rodw== X-Received: by 2002:a5d:508b:0:b0:33d:73de:cd95 with SMTP id a11-20020a5d508b000000b0033d73decd95mr14332631wrt.17.1709912962496; Fri, 08 Mar 2024 07:49:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVffvdLeijXSGQ5OIuM9Z2emADfh+J1zz9lvsgO4DMGpw7TEODFHIaYR9Ks2pv+4sld+wh+A== X-Received: by 2002:a5d:508b:0:b0:33d:73de:cd95 with SMTP id a11-20020a5d508b000000b0033d73decd95mr14332610wrt.17.1709912961938; Fri, 08 Mar 2024 07:49:21 -0800 (PST) Received: from [192.168.100.30] ([82.142.8.70]) by smtp.gmail.com with ESMTPSA id r12-20020adff10c000000b0033de2f2a88dsm23382064wro.103.2024.03.08.07.49.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Mar 2024 07:49:21 -0800 (PST) Message-ID: <63786860-6caa-40b3-a432-9a5399636af5@redhat.com> Date: Fri, 8 Mar 2024 16:49:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/4] Some improvements to the tap send path To: Stefano Brivio References: <20240308065325.2181322-1-david@gibson.dropbear.id.au> <348a52c9-7c07-4150-b594-4743c7775be6@redhat.com> <20240308093404.3328ad2a@elisabeth> From: Laurent Vivier In-Reply-To: <20240308093404.3328ad2a@elisabeth> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: GYIQ3TVPQE3AWKGMFJ35IGLTVKF6Z2M5 X-Message-ID-Hash: GYIQ3TVPQE3AWKGMFJ35IGLTVKF6Z2M5 X-MailFrom: lvivier@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 3/8/24 09:34, Stefano Brivio wrote: > 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. > Using iovec improves performance: iperf3 -c localhost -p 10001 -t 60 -4 iovec [ 5] 0.00-60.00 sec 32.9 GBytes 4.72 Gbits/sec 0 sender [ 5] 0.00-60.06 sec 32.9 GBytes 4.71 Gbits/sec receiver buf_t [ 5] 0.00-60.00 sec 15.9 GBytes 2.27 Gbits/sec 0 sender [ 5] 0.00-60.06 sec 15.9 GBytes 2.27 Gbits/sec receiver iperf3 -c localhost -p 10001 -t 60 -6 iovec [ 5] 0.00-60.00 sec 26.0 GBytes 3.73 Gbits/sec 0 sender [ 5] 0.00-60.06 sec 26.0 GBytes 3.72 Gbits/sec receiver buf_t [ 5] 0.00-60.00 sec 15.7 GBytes 2.25 Gbits/sec 0 sender [ 5] 0.00-60.07 sec 15.7 GBytes 2.25 Gbits/sec receiver Thanks, Laurent