Discussion of the VIRTIO specification
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Vitaly Mireyno <vmireyno@marvell.com>
Cc: "virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: Re: [virtio-comment] [PATCH] virtio-net: Add support for correct hdr_len field.
Date: Thu, 20 Feb 2020 15:24:51 -0500	[thread overview]
Message-ID: <20200220052144-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <BN6PR1801MB2067FDC276CB401920EAEF5FC5130@BN6PR1801MB2067.namprd18.prod.outlook.com>

On Thu, Feb 20, 2020 at 10:18:32AM +0000, Vitaly Mireyno wrote:
> 
> >-----Original Message-----
> >From: Michael S. Tsirkin <mst@redhat.com>
> >Sent: Thursday, 20 February, 2020 12:01
> >To: Vitaly Mireyno <vmireyno@marvell.com>
> >Cc: virtio-comment@lists.oasis-open.org; jasowang@redhat.com
> >Subject: [EXT] Re: [virtio-comment] [PATCH] virtio-net: Add support for correct hdr_len field.
> >
> >----------------------------------------------------------------------
> >On Thu, Feb 20, 2020 at 09:51:17AM +0000, Vitaly Mireyno wrote:
> >>
> >> >-----Original Message-----
> >> >From: virtio-comment@lists.oasis-open.org
> >> ><virtio-comment@lists.oasis-open.org> On Behalf Of Michael S. Tsirkin
> >> >Sent: Thursday, 20 February, 2020 10:12
> >> >To: Vitaly Mireyno <vmireyno@marvell.com>
> >> >Cc: virtio-comment@lists.oasis-open.org; jasowang@redhat.com
> >> >Subject: Re: [virtio-comment] [PATCH] virtio-net: Add support for correct hdr_len field.
> >> >
> >> >---------------------------------------------------------------------
> >> >- On Thu, Oct 24, 2019 at 03:24:43PM +0000, Vitaly Mireyno wrote:
> >> >> Some devices benefit from the knowledge of the exact header length for TSO processing.
> >> >> Add a feature bit for a driver that is capable of providing the correct header length for TSO
> >packets.
> >> >>
> >> >> Signed-off-by: Vitaly Mireyno <vmireyno@marvell.com>
> >> >
> >> >So I looked at implementing this and maybe this was not such a good idea after all.
> >> >
> >> >How would we implement this in Linux?
> >> >Current code just puts skb_headlen there which is # of bytes in the linear buffer.
> >> >Which I guess it often the header, but not at all always.
> >> >
> >> >Should this have been limited to TSO packets?
> >> >
> >> >I also could not figure out how this is useful for the host.
> >> >Could you enlighten me pls?
> >>
> >> As see it, header length is essential for TSO, and maybe not so useful for non-TSO.
> >
> >So maybe we should limit this for when gso type is actually set?
> 
> Do you mean the hdr_len field will be valid only for TSO packets, or it will be accurate only for TSO packets?
> I'm fine with both options.

Let's say accurate only for TSO.

Can you write a spec patch like this?

> >
> >> To calculate the header length, I suppose a Linux driver could do something like:
> >> skb_transport_header(skb) + tcp_hdrlen(skb) - skb->data

That's only good for TCP though.


> >
> >That's parsing the header in software. Why not have the card do it in hardware?
> >
> 
> It depends on hw architecture. The architecture I'm familiar with, the hw can parse the header, but it happens too late for the segmentation decision.
> 
> 
> >--
> >MST


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


  reply	other threads:[~2020-02-20 20:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 10:18 [virtio-comment] [PATCH] virtio-net: Add support for correct hdr_len field Vitaly Mireyno
2020-02-20 20:24 ` Michael S. Tsirkin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-23  7:00 Vitaly Mireyno
2020-02-23  9:56 ` Michael S. Tsirkin
2020-02-20  9:51 Vitaly Mireyno
2020-02-20 10:01 ` Michael S. Tsirkin
2019-10-24 15:24 Vitaly Mireyno
2020-02-20  8:00 ` Michael S. Tsirkin
2020-02-20  8:11 ` Michael S. Tsirkin

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=20200220052144-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=vmireyno@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox