9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9fans@9fans.net
Subject: Re: [9fans] fossil+venti performance question
Date: Sun, 10 May 2015 22:19:56 +0200	[thread overview]
Message-ID: <836e436c5d5dad6e4a07e45ab01ae80b@felloff.net> (raw)
In-Reply-To: <c4cac4ae3086ef46e7cdcd173378c504@brasstown.quanstro.net>

> * the SYN-ACK needs to send the local mss, not echo the remote mss.
> asymmetry is "fine" in the other side, even if ip/tcp.c isn't smart enough to
> keep tx and rx mss seperate.  (scare quotes = untested, there may be
> some performance niggles if the sender is sending legal packets larger than
> tcb->mss.)

that is what it already does as far as i can see. on the server side, we receive a
SYN, put it in limbo and reply with SYN|ACK (sndsynack()) sending our local
mss straight from tcpmtu(), no adjust. at this point heres no connection or tcb as
everything is still in limbo. only once we receive the ACK, tcpincoming() gets called which
pulls the info we got so far (including the mss sent by the client in the SYN pakcet) out of
limbo and sets up a connection with its tcb.

to summarize what happens on the server for incoming connection:

1.a) tcpiput() gets a SYN packet for Listening connection, calls limbo().
1.b) limbo() saves the info (including mss) from SYN in limbo database and calls sndsynack().
1.c) sndsynack() sends SYN|ACK packet with mss option set from tcpmtu() without any adjust.

2.a) tcpiput() gets a ACK packet for Listening connection, calls tcpincoming().
2.b) tcpincoming() looks in limbo, finds lp. and makes new connection.
3.c) initialize our connections tcb->mss.

> * the setting of tcb->mss in tcpincoming is not correct, tcp->mss is
> set by SYN, not by ACK, and may not be reset.  (see snoopy below.)

you say we shouldnt initialize tcb->mss in 3.c and not use the mss from the
initial SYN to adjust it. i dont understand why not as i dont see where it
would be initialized otherwise. it appears that was what the initial patch
from david was about to fix which made sense to me.

as far as i can see, the procsyn() is unrelated to server side incoming
connections. it only gets called on behalf of a client outgoing connect
when the connection is in Syn_sent state and processes the SYN|ACK that
was generated by the process descibed in 1.c above.

--
cinap



  parent reply	other threads:[~2015-05-10 20:19 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04  9:32 KADOTA Kyohei
2015-05-04 16:10 ` Anthony Sorace
2015-05-04 18:11   ` Aram Hăvărneanu
2015-05-04 18:51     ` David du Colombier
2015-05-05 14:29       ` Sergey Zhilkin
2015-05-05 15:05       ` Charles Forsyth
2015-05-05 15:38         ` David du Colombier
2015-05-05 22:23           ` Charles Forsyth
2015-05-05 22:29             ` cinap_lenrek
2015-05-05 22:33             ` David du Colombier
2015-05-05 22:53               ` Aram Hăvărneanu
2015-05-06 20:55                 ` David du Colombier
2015-05-06 21:17                   ` Charles Forsyth
2015-05-06 21:26                     ` David du Colombier
2015-05-06 21:28                       ` David du Colombier
2015-05-06 22:28                         ` Charles Forsyth
2015-05-07  3:35                           ` erik quanstrom
2015-05-07  6:15                             ` David du Colombier
2015-05-07 13:17                               ` erik quanstrom
2015-05-08 16:13                                 ` David du Colombier
2015-05-08 16:39                                   ` Charles Forsyth
2015-05-08 17:16                                     ` David du Colombier
2015-05-08 19:24                                       ` David du Colombier
2015-05-08 20:03                                         ` Steve Simon
2015-05-08 21:19                                         ` Bakul Shah
2015-05-09 14:43                                           ` erik quanstrom
2015-05-09 17:25                                             ` Lyndon Nerenberg
2015-05-09 17:30                                               ` Devon H. O'Dell
2015-05-09 17:35                                                 ` Lyndon Nerenberg
2015-05-09 21:54                                                   ` Devon H. O'Dell
2015-05-09 18:20                                               ` Bakul Shah
2015-05-09  3:11                                         ` cinap_lenrek
2015-05-09  5:59                                           ` lucio
2015-05-09 16:26                                             ` cinap_lenrek
2015-05-09 16:23                                           ` erik quanstrom
2015-05-10  4:55                                             ` erik quanstrom
2015-05-10  5:07                                               ` erik quanstrom
2015-05-10 17:57                                                 ` David du Colombier
2015-05-10 20:18                                                   ` erik quanstrom
2015-05-10 20:19                                             ` cinap_lenrek [this message]
2015-05-10 20:51                                               ` erik quanstrom
2015-05-10 21:34                                                 ` cinap_lenrek
2015-05-11  1:23                                                   ` erik quanstrom
2015-05-09 16:59                                           ` erik quanstrom
2015-05-06 22:35                         ` Steven Stallion
2015-05-06 23:47                           ` Charles Forsyth
2015-05-07  3:38                       ` erik quanstrom
2015-05-07  3:43                 ` erik quanstrom
2015-05-05 15:07     ` KADOTA Kyohei
2015-05-05 14:47   ` KADOTA Kyohei
2015-05-05 15:46     ` steve
2015-05-05 15:54       ` David du Colombier

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=836e436c5d5dad6e4a07e45ab01ae80b@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9fans@9fans.net \
    /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).