All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Platt <dplatt@radagast.org>
To: 'Linux-Hams' <linux-hams@vger.kernel.org>
Subject: Re: standard_window_size.
Date: Tue, 09 Dec 2008 13:52:07 -0800	[thread overview]
Message-ID: <493EE887.8090805@radagast.org> (raw)
In-Reply-To: <325AA1D57A4349FDB3F232F90C474007@arkalmus.com>

Bob Donnell wrote:
> There is no provision in the AX.25 protocol for the negotiation of
> connected-mode window size, only for the AX.25 version supported by the
> connection.  The receiving window size is (or at least should be) assumed to
> be 7.  Of course, not all TNC's support connected mode, and not all of those
> that do actually have enough buffer space to support 7 frames - but neither
> type would be considered AX.25 compliant either.

It appears to me that parameter negotiation was added in AX.25
version 2.2.  The station which is initiating negotiation (which
can take place at any time) sends an XID command frame.  The station
receiving it sends back an XID response frame... or, if it's running
AX.25 versions prior to 2.2, it sends back an FRMR reject frame, and
the peer which sent the XID command frame abandons the attempt to
negotiate and uses a default set of parameters.

The XID negotiation can apparently set the half/full-duplex modes,
selective-rejection modes, modulo-8 or modulo-128 modes, I field
length, window size receive, acknowledgement timer (T1), and
retries.

The details are on pages 24-25 and 37-38 of the AX.25 2.2 spec at TAPR.

I don't know whether the Linux kernel AX.25 implementation is up to
AX.25 2.2 or whether it's a prior version.  Ditto for "hard" TNCs.

> Part of the problem with [2] in the kernel is that the T1 timer operation is
> very decoupled from when the transmission is actually made.  It's one of the
> reasons I suggested that at the very least, the on-air data rate needs to be
> known so that the time required to actually transmit the data can be added
> to the T1 timer value, for each packet.

That would certainly help... although, as you say, the underlying problem
is that the timer management and packet transmission are decoupled.  If
the network layer assumes that actual air transmission starts when the link
layer is told to transmit it, it'll be wrong much of the time (especially
on a congested channel).  Adding the transmission time to the timer value
will help reduce the magnitude of the problem but won't eliminate it.

I imagine that the only way to really fix this particular problem would
be have the link layer send back a positive "OK, packet N sent" when it
has actually been transmitted.  Unfortunately, the KISS protocol
has no such acknowledgment capability... there is no feedback or flow
control at all in either direction.

Either a per-packet handshake from the KISS termination (TNC), or
some way of polling the packet buffer, would be required.

> 	In hardware TNCs, there's one T1 timer per connection - not per
> packet.
> 	The T1 timer is started when the transmission is complete.  This
> makes T1 independent of number of frames sent to the receiving station.

Right you are, thanks for the correction.  The spec says that T1 is to be
started at the end of the transmission of a packet, if it's not already
running... and if it is running, it's to be restarted.  This is in effect
the same thing as what you wrote.

> One assumption that should be made when people are configuring AX.25 to use
> more than 1 or 2 frames is that if retries are happening due to poor paths
> or busy channels, they shouldn't be using a setup that causes long
> transmissions.  If only 2 stations are on the channel, and the bit error
> rate is such that sending 7 frames of 256 bytes only results in retries less
> than 5% of the time, then using the maximum settings is justified.  If you
> can't get 95% of each block of transmissions through without retries, using
> fewer frames of smaller size is a performance tuning option that is
> required.  No matter what the reason.

I agree with you in the case of AX.25 prior to the introduction of the
SREJ frame (which I think came in with 2.2), since a single lost or
corrupted packet will require that packet, plus all subsequent ones in
the window to be retransmitted.

With the use of SREJ, I believe one can afford to run large windows
over a somewhat noisier link, as you can recover from a lost or
corrupted packet in the middle of the window by sending an SREJ naming
that one packet.  The sender needs only retransmit that one packet,
and may immediately continue sending other (not-yet-transmitted) packets
within the range allowed by the window.

> One of the best features I recall from the MSYS PBBS software was that it
> adaptively adjusted T1 value, packet size and number of frames, based on the
> retry rate it had on each connected link it was sending data to.  This
> allowed it to be self-adaptable to the channel baud rate, much along the
> lines of how TCP adjusts its window size and retry timer to match the
> channel. 

Nice!

I suspect that a large part of the difficulty with AX.25 is that it
was derived from a protocol which was largely intended to work on
point-to-point links with rather low error rates.  Dealing with a
shared medium with high noise/collision/corruption rates wasn't
really engineered in from the beginning.

73,

	Dave AE6EO




  reply	other threads:[~2008-12-09 21:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-01 20:32 standard_window_size John Ronan
2008-12-01 22:47 ` standard_window_size John Ronan
2008-12-02 21:50   ` standard_window_size Bent
2008-12-02 23:12     ` standard_window_size Bob Donnell
2008-12-03  0:59       ` standard_window_size cathrynham
2008-12-03 21:06       ` standard_window_size John Ronan
2008-12-03 22:33         ` standard_window_size John Ronan
2008-12-09  8:34           ` standard_window_size John Ronan
2008-12-09 18:11             ` standard_window_size Dave Platt
2008-12-09 19:42               ` standard_window_size Bob Donnell
2008-12-09 21:52                 ` Dave Platt [this message]
2008-12-11  8:49                 ` standard_window_size John Ronan
2008-12-11 19:08                   ` standard_window_size Bob Donnell

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=493EE887.8090805@radagast.org \
    --to=dplatt@radagast.org \
    --cc=linux-hams@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.