qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "H. Peter Anvin" <hpa@zytor.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	qemu-devel@nongnu.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-devel] [PATCH] slirp: support dynamic block size for TFTP transfers
Date: Tue, 22 Nov 2016 09:19:05 +0100	[thread overview]
Message-ID: <0fa87764-975a-a919-f1f3-a5543d096b13@redhat.com> (raw)
In-Reply-To: <06704f59-9ae1-6fcd-df14-0ff8bd7413c6@zytor.com>

On 21.11.2016 20:51, H. Peter Anvin wrote:
> On 11/21/16 11:45, Hervé Poussineau wrote:
>> The blocksize option is defined in RFC 1783.
>> We now support block sizes between 1 and 1432 bytes, instead of 512 only.
> 
> It ought to be 1476: Ethernet MTU = 1500, minus a minimum of 20 bytes
> for an IPv4 header and 4 for a TFTP header.

Don't forget the size of the UDP header - so the maximum value is 1468.
However, if you want to play safe, you should also consider that
somebody is putting additional options into the IPv4 header, so the IPv4
header can be up to 60 bytes instead of only 20 bytes. So a real safe
value for the maximum TFTP block size is:

 1500 - 60 - 8 - 4 = 1428

This is also what is mentioned in RFC2348 which obsoletes RFC1783 (that
mentions 1432).

 Thomas

  reply	other threads:[~2016-11-22  8:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 19:45 [Qemu-devel] [PATCH] slirp: support dynamic block size for TFTP transfers Hervé Poussineau
2016-11-21 19:49 ` no-reply
2016-11-21 19:51 ` H. Peter Anvin
2016-11-22  8:19   ` Thomas Huth [this message]
2016-12-20 23:03 ` Samuel Thibault

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=0fa87764-975a-a919-f1f3-a5543d096b13@redhat.com \
    --to=thuth@redhat.com \
    --cc=hpa@zytor.com \
    --cc=hpoussin@reactos.org \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefanha@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 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 NNTP newsgroup(s).