Linux HAM/Amateur Radio development
 help / color / mirror / Atom feed
* AX.25 Kernel - problem - ax25_sendmsg returns EMSGSIZE !
@ 2007-10-07 19:58 Tihomir Heidelberg - 9a4gl
  2007-10-08  8:29 ` Hamish Moffatt
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Tihomir Heidelberg - 9a4gl @ 2007-10-07 19:58 UTC (permalink / raw)
  To: linux-hams

Hi ax25 developers,

Using kernel 2.6.21.6 here. If you write to AX.25 socket bytes more then
MTU, write will return -1 and errno will be set to 90 (EMSGSIZE =
[Message too long]).

This happend in net/ax25/af_ax25.c in function ax25_sendmsg at:

        if (len > ax25->ax25_dev->dev->mtu) {
                err = -EMSGSIZE;
                goto out;
        }

Old kernels, 2.2.x and 2.4.x accepted write with data length larger then
MTU and for SOCK_SEQPACKET sockets the ax25_output function did the
fragmentation job.

According to "man 2 write", write should return number of bytes written.
I think that:

1. ax25_sendmsg should accept data larger then mtu and pass the data to
ax25_output.
2. ax25_output should do fragmentation and queue frames into device queue.
3. ax25_output should stop fragmenting when device queue is full
4. ax25_output should return number of bytes queued on device
5. ax25_sendmsg should return number of bytes accepted for xmiting

Also, as I see, currently ax25 stack is not checking if dev_queue_xmit
fails. Does this means that AX.25 kernel can loose some frames when
device queue is full ?

By the way, this problem is having OpenBCM V1.07b3, very popular BBS
software (http://dnx274.dyndns.org/baybox/) which writes as much data as
it prepared.

73 de Tihomir Heidelberg, 9a4gl(_a_t_)hamradio(d_o_t)hr



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2008-02-12 11:20 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-07 19:58 AX.25 Kernel - problem - ax25_sendmsg returns EMSGSIZE ! Tihomir Heidelberg - 9a4gl
2007-10-08  8:29 ` Hamish Moffatt
2007-10-08 11:10   ` Tihomir Heidelberg - 9a4gl
2007-10-08 13:44     ` Hamish Moffatt
2007-10-08 14:53       ` Tihomir Heidelberg - 9a4gl
2007-10-08 15:51         ` Dave Platt
2007-10-08 19:38           ` Tihomir Heidelberg - 9a4gl
2007-10-08 22:36         ` Hamish Moffatt
2007-10-08 23:10           ` Dave Platt
2007-10-09  0:43             ` Chris Kantarjiev
2007-10-09  0:59               ` Dave Platt
2007-10-09  6:47               ` Tihomir Heidelberg - 9a4gl
2008-02-12 10:40       ` [BUG] [AX25] in libax25 Bernard Pidoux F6BVP
2008-02-12 11:20         ` Matti Aarnio
2007-10-08  8:41 ` AX.25 Kernel - problem - ax25_sendmsg returns EMSGSIZE ! Hamish Moffatt
2007-10-08 10:45 ` Ralf Baechle DL5RB
2007-10-08 12:25   ` Tihomir Heidelberg - 9a4gl
2007-10-08 16:55   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox