public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "ariga masahiro" <ariga@link-lab.co.jp>
To: "Gary Thomas" <gary@mlbassoc.com>,
	"Alok Singh" <alok.singh@broadcom.com>,
	        "Andrew Lunn" <andrew@lunn.ch>
Cc: <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Can't Connect,TCP CHECKSUM INCORRECT
Date: Thu, 08 Nov 2007 08:23:00 -0000	[thread overview]
Message-ID: <001001c821e0$8d1edc60$1c0110ac@ariga> (raw)
In-Reply-To: <002101c821aa$8ea9d1b0$1c0110ac@ariga>

Hello,

Please read this mail with next consent.
I never doubt anything of eCos source code.
I just like to find out suffering points because of hardware oddity and
my bad concoction.I beseech you to help me find that suffering points.
And I mail this if my discovery have any merit for you to pinpoint that
suffering points.I am not good at TCP/IP.My opinion is greatly loaded
with conjectures.

I traced tcp_output function.
It looks to me, at tcp_output's next points, append option part.
line 688-691
 if (optlen) {
  bcopy(opt, th + 1, optlen);
  th->th_off = (sizeof (struct tcphdr) + optlen) >> 2;
 }
Although peer sent 8 bytes option,optlen was 4.

Also it looks to me, in generating SYN-ACK packet, at next switch sentence,
case (TH_SYN|TH_ACK) context should be executed.
But it all passed out these block, never entered if sentence(line 445) 
block.
At that time tp->t_flags was 0xA1,flags was 0x12.

line 445-510
  /*
  * Send `CC-family' options if our side wants to use them (TF_REQ_CC),
  * options are allowed (!TF_NOOPT) and it's not a RST.
   */
  if ((tp->t_flags & (TF_REQ_CC|TF_NOOPT)) == TF_REQ_CC &&
       (flags & TH_RST) == 0) {
  switch (flags & (TH_SYN|TH_ACK)) {
  /*
   * This is a normal ACK, send CC if we received CC before
   * from our peer.
   */
  case TH_ACK:
   if (!(tp->t_flags & TF_RCVD_CC))
    break;
   /*FALLTHROUGH*/

  /*
   * We can only get here in T/TCP's SYN_SENT* state, when
   * we're a sending a non-SYN segment without waiting for
   * the ACK of our SYN.  A check above assures that we only
   * do this if our peer understands T/TCP.
   */
  case 0:
   opt[optlen++] = TCPOPT_NOP;
   opt[optlen++] = TCPOPT_NOP;
   opt[optlen++] = TCPOPT_CC;
   opt[optlen++] = TCPOLEN_CC;
   *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send);

   optlen += 4;
   break;

  /*
   * This is our initial SYN, check whether we have to use
   * CC or CC.new.
   */
  case TH_SYN:
   opt[optlen++] = TCPOPT_NOP;
   opt[optlen++] = TCPOPT_NOP;
   opt[optlen++] = tp->t_flags & TF_SENDCCNEW ?
      TCPOPT_CCNEW : TCPOPT_CC;
   opt[optlen++] = TCPOLEN_CC;
   *(u_int32_t *)&opt[optlen] = htonl(tp->cc_send);
    optlen += 4;
   break;

  /*
   * This is a SYN,ACK; send CC and CC.echo if we received
   * CC from our peer.
   */
  case (TH_SYN|TH_ACK):
   if (tp->t_flags & TF_RCVD_CC) {
    opt[optlen++] = TCPOPT_NOP;
    opt[optlen++] = TCPOPT_NOP;
    opt[optlen++] = TCPOPT_CC;
    opt[optlen++] = TCPOLEN_CC;
    *(u_int32_t *)&opt[optlen] =
     htonl(tp->cc_send);
    optlen += 4;
    opt[optlen++] = TCPOPT_NOP;
    opt[optlen++] = TCPOPT_NOP;
    opt[optlen++] = TCPOPT_CCECHO;
    opt[optlen++] = TCPOLEN_CC;
    *(u_int32_t *)&opt[optlen] =
     htonl(tp->cc_recv);
    optlen += 4;
   }
   break;
  }
  }

Possibly I am wrong,anyway I inform you on the risk of showing ignarance.

I sincerely beseech your help.

Masahiro Ariga



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2007-11-08  8:23 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14  5:37 [ECOS] Building error on CVS checkout sources ariga masahiro
2007-09-14  8:22 ` [ECOS] " Andrew Lunn
2007-09-14  9:38   ` [ECOS] Virtual Vector Configuration Stefan Sommerfeld
2007-09-14 10:17     ` Nick Garnett
2007-10-15  5:59   ` [ECOS] What functions should I call in ethernet drv ? ariga masahiro
2007-10-15 11:20     ` Gary Thomas
2007-10-16  3:04       ` ariga masahiro
2007-10-16 11:08         ` Gary Thomas
2007-10-17  7:41           ` ariga masahiro
2007-10-17 11:32             ` Gary Thomas
2007-10-18  7:17               ` ariga masahiro
     [not found]               ` <000c01c81151$9add59c0$1c0110ac@ariga>
2007-10-18 11:12                 ` Gary Thomas
2007-10-19  4:56                   ` ariga masahiro
2007-10-19  9:55                     ` Gary Thomas
2007-10-20  6:19                       ` ariga masahiro
2007-10-23  8:23                       ` ariga masahiro
2007-10-23  8:27                         ` Alok Singh
2007-10-23  9:05                           ` ariga masahiro
2007-10-25  2:05                           ` ariga masahiro
2007-10-30  2:41                             ` [ECOS] Can't Connect,TCP CHECKSUM INCORRECT ariga masahiro
2007-10-30  3:02                               ` Andrew Lunn
2007-10-30  4:17                               ` [ECOS] " Grant Edwards
2007-10-30  8:51                                 ` Alok Singh
2007-11-06  7:14                               ` [ECOS] " ariga masahiro
2007-11-06  7:58                                 ` Alok Singh
2007-11-06  8:30                                   ` ariga masahiro
2007-11-06  8:35                                     ` Andrew Lunn
2007-11-06 23:47                                       ` ariga masahiro
2007-11-07  1:05                                         ` ariga masahiro
2007-11-07  7:15                                           ` ariga masahiro
2007-11-07  8:24                                             ` ariga masahiro
2007-11-07 11:55                                               ` Alok Singh
2007-11-08  1:56                                               ` ariga masahiro
2007-11-08  8:23                                                 ` ariga masahiro [this message]
2007-11-09  1:25                                                   ` ariga masahiro
2007-11-13  1:13                                                     ` ariga masahiro
2007-11-16  7:40                                                       ` ariga masahiro
2007-11-08  9:13                                                 ` Alok Singh
2008-01-07  1:36                                       ` [ECOS] Wrongfully compiled code ariga masahiro
2007-10-17  8:45           ` [ECOS] What functions should I call in ethernet drv ? ariga masahiro

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='001001c821e0$8d1edc60$1c0110ac@ariga' \
    --to=ariga@link-lab.co.jp \
    --cc=alok.singh@broadcom.com \
    --cc=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=gary@mlbassoc.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 read-only IMAP folder(s) and NNTP newsgroup(s).