public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>, passt-dev@passt.top
Subject: Re: [PATCH 0/4] Some improvements to the tap send path
Date: Fri, 8 Mar 2024 16:49:20 +0100	[thread overview]
Message-ID: <63786860-6caa-40b3-a432-9a5399636af5@redhat.com> (raw)
In-Reply-To: <20240308093404.3328ad2a@elisabeth>

On 3/8/24 09:34, Stefano Brivio wrote:
> On Fri, 8 Mar 2024 09:18:48 +0100
> Laurent Vivier <lvivier@redhat.com> 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


  parent reply	other threads:[~2024-03-08 15:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08  6:53 [PATCH 0/4] Some improvements to the tap send path David Gibson
2024-03-08  6:53 ` [PATCH 1/4] tap: Extend tap_send_frames() to allow multi-buffer frames David Gibson
2024-03-14  7:02   ` Stefano Brivio
2024-03-14  8:47     ` David Gibson
2024-03-08  6:53 ` [PATCH 2/4] tap: Simplify some casts in the tap "slow path" functions David Gibson
2024-03-08  6:53 ` [PATCH 3/4] tap: Implement tap_send() "slow path" in terms of fast path David Gibson
2024-03-08  6:53 ` [PATCH 4/4] tap: Rename tap_iov_{base,len} David Gibson
2024-03-08  8:18 ` [PATCH 0/4] Some improvements to the tap send path Laurent Vivier
2024-03-08  8:34   ` Stefano Brivio
2024-03-08  8:55     ` Laurent Vivier
2024-03-08 15:49     ` Laurent Vivier [this message]
2024-03-08 16:24       ` Stefano Brivio
2024-03-08 12:42   ` David Gibson
2024-03-08 16:49     ` Laurent Vivier
2024-03-09  4:15       ` David Gibson
2024-03-11 11:02     ` Laurent Vivier
2024-03-14  2:22       ` David Gibson
2024-03-14 16:40 ` Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63786860-6caa-40b3-a432-9a5399636af5@redhat.com \
    --to=lvivier@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).