All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: wexu@redhat.com
Cc: qemu-devel@nongnu.org, jasowang@redhat.com, marcel@redhat.com,
	victork@redhat.com, dfleytma@redhat.com, yvugenfi@redhat.com
Subject: Re: [Qemu-devel] [ RFC Patch v4 2/3] virtio-net rsc: support coalescing ipv4 tcp traffic
Date: Tue, 12 Apr 2016 11:23:28 +0300	[thread overview]
Message-ID: <20160412111638-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1459711556-10273-3-git-send-email-wexu@redhat.com>

On Mon, Apr 04, 2016 at 03:25:55AM +0800, wexu@redhat.com wrote:
> From: Wei Xu <wexu@redhat.com>
> 
> All the data packets in a tcp connection will be cached to a big buffer
> in every receive interval, and will be sent out via a timer, the
> 'virtio_net_rsc_timeout' controls the interval, the value will influent the
> performance and response of tcp connection extremely, 50000(50us) is a
> experience value to gain a performance improvement, since the whql test
> sends packets every 100us, so '300000(300us)' can pass the test case,
> this is also the default value, it's gonna to be tunable.
> 
> The timer will only be triggered if the packets pool is not empty,
> and it'll drain off all the cached packets
> 
> 'NetRscChain' is used to save the segments of different protocols in a
> VirtIONet device.
> 
> The main handler of TCP includes TCP window update, duplicated ACK check
> and the real data coalescing if the new segment passed sanity check
> and is identified as an 'wanted' one.
> 
> An 'wanted' segment means:
> 1. Segment is within current window and the sequence is the expected one.
> 2. ACK of the segment is in the valid window.
> 3. If the ACK in the segment is a duplicated one, then it must less than 2,
>    this is to notify upper layer TCP starting retransmission due to the spec.
> 
> Sanity check includes:
> 1. Incorrect version in IP header
> 2. IP options & IP fragment
> 3. Not a TCP packets
> 4. Sanity size check to prevent buffer overflow attack.
> 
> There maybe more cases should be considered such as ip identification other
> flags, while it broke the test because windows set it to the same even it's
> not a fragment.
> 
> Normally it includes 2 typical ways to handle a TCP control flag, 'bypass'
> and 'finalize', 'bypass' means should be sent out directly, and 'finalize'
> means the packets should also be bypassed, and this should be done
> after searching for the same connection packets in the pool and sending
> all of them out, this is to avoid out of data.
> 
> All the 'SYN' packets will be bypassed since this always begin a new'
> connection, other flags such 'FIN/RST' will trigger a finalization, because
> this normally happens upon a connection is going to be closed, an 'URG' packet
> also finalize current coalescing unit.
> 
> Statistics can be used to monitor the basic coalescing status, the 'out of order'
> and 'out of window' means how many retransmitting packets, thus describe the
> performance intuitively.
> 
> Signed-off-by: Wei Xu <wexu@redhat.com>

Yan pointed out that VIRTIO_NET_HDR_GSO_* is never used in this patch,
nor is gso_type ever set in virtio net header.

This seems strange.

-- 
MST

  parent reply	other threads:[~2016-04-12  8:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-03 19:25 [Qemu-devel] [ RFC Patch v4 0/3] Support Receive-Segment-Offload(RSC) for WHQL wexu
2016-04-03 19:25 ` [Qemu-devel] [ RFC Patch v4 1/3] virtio-net rsc: add a new host offload(rsc) feature bit wexu
2016-04-05  2:05   ` Jason Wang
2016-04-05  8:17     ` Michael S. Tsirkin
2016-04-10 15:23       ` Wei Xu
2016-04-03 19:25 ` [Qemu-devel] [ RFC Patch v4 2/3] virtio-net rsc: support coalescing ipv4 tcp traffic wexu
2016-04-05  2:47   ` Jason Wang
2016-04-08  7:47     ` Wei Xu
2016-04-08  8:31       ` Jason Wang
2016-04-08  9:15         ` Wei Xu
2016-04-12  8:23   ` Michael S. Tsirkin [this message]
2016-04-03 19:25 ` [Qemu-devel] [ RFC Patch v4 3/3] virtio-net rsc: support coalescing ipv6 " wexu
2016-04-05  2:50   ` Jason Wang
2016-04-08  7:06     ` Wei Xu
2016-04-08  7:27       ` Jason Wang
2016-04-08  7:51         ` Wei Xu
2016-04-05  2:52 ` [Qemu-devel] [ RFC Patch v4 0/3] Support Receive-Segment-Offload(RSC) for WHQL Jason Wang

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=20160412111638-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=dfleytma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=victork@redhat.com \
    --cc=wexu@redhat.com \
    --cc=yvugenfi@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.