From: Laurent Vivier <lvivier@redhat.com>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [RFC] tcp: Replace TCP buffer structure by an iovec array
Date: Wed, 13 Mar 2024 15:42:27 +0100 [thread overview]
Message-ID: <8e56f30b-cdcc-4276-acbe-9fc87fa51a7e@redhat.com> (raw)
In-Reply-To: <20240313123725.7a37f311@elisabeth>
On 3/13/24 12:37, Stefano Brivio wrote:
> On Mon, 11 Mar 2024 14:33:56 +0100
> Laurent Vivier <lvivier@redhat.com> wrote:
>
...
>> diff --git a/tcp.c b/tcp.c
>> index d5eedf4d0138..5c8488108ef7 100644
>> --- a/tcp.c
>> +++ b/tcp.c
>> @@ -318,39 +318,7 @@
...
>> -#define MSS4 ROUND_DOWN(USHRT_MAX - sizeof(struct tcp4_l2_head), 4)
>> -#define MSS6 ROUND_DOWN(USHRT_MAX - sizeof(struct tcp6_l2_head), 4)
>>
>> +#define MSS (USHRT_MAX - sizeof(struct tcphdr))
>
> We can't exceed USHRT_MAX at Layer-2 level, though, so the MSS for IPv4
> should now be:
>
> #define MSS4 ROUND_DOWN(USHRT_MAX - sizeof(struct ethhdr) -
> sizeof(struct iphdr) -
> sizeof(struct tcphdr),
> 4)
>
> ...and similar for IPv6.
Is there a specification that limits the MSS?
Or is it only a compatibility problem with the network stack implementation?
At headers level the only limitation we have is the length field size in the IP header
that is a 16bit (it's why I put "USHRT_MAX - sizeof(struct tcphdr)").
Thanks,
Laurent
next prev parent reply other threads:[~2024-03-13 14:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 13:33 [RFC] tcp: Replace TCP buffer structure by an iovec array Laurent Vivier
2024-03-12 22:56 ` Stefano Brivio
2024-03-13 11:37 ` Stefano Brivio
2024-03-13 14:42 ` Laurent Vivier [this message]
2024-03-13 15:27 ` Stefano Brivio
2024-03-13 15:20 ` Laurent Vivier
2024-03-13 16:58 ` Stefano Brivio
2024-03-14 14:07 ` Laurent Vivier
2024-03-14 15:47 ` Stefano Brivio
2024-03-14 15:54 ` Laurent Vivier
2024-03-14 16:26 ` Stefano Brivio
2024-03-15 0:46 ` David Gibson
2024-03-14 4:22 ` David Gibson
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=8e56f30b-cdcc-4276-acbe-9fc87fa51a7e@redhat.com \
--to=lvivier@redhat.com \
--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).