[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #59651] tcp_write() without TCP_WRITE_FLAG_COPY
From: |
Oleg Kobrin |
Subject: |
[lwip-devel] [bug #59651] tcp_write() without TCP_WRITE_FLAG_COPY |
Date: |
Thu, 10 Dec 2020 09:54:18 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 |
URL:
<https://savannah.nongnu.org/bugs/?59651>
Summary: tcp_write() without TCP_WRITE_FLAG_COPY
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: kiabrin
Submitted on: Чт 10 дек 2020 14:54:16
Category: IPv4
Severity: 3 - Normal
Item Group: Change Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: git head
_______________________________________________________
Details:
Debugging the code I found the problem.
Consider you have large output traffic, including one large buffer, which is
used statically.
You can use double buffering to avoid modification of this buffer while it is
not sent.
In call to tcp_write() you are using no TCP_WRITE_FLAG_COPY. But the
pcb->snd_buf is decreased, and after some time you experiense data loss as you
cannot write more data.
Obviousely, tcp_write() without TCP_WRITE_FLAG_COPY should not decrease
snd_buf, as no buffer space are used. But the problem is we cannot just add
if (apiflags & TCP_WRITE_FLAG_COPY)
before
pcb->snd_buf -= len;
as tcp_output() depends on this value. If where is a way to determine if nexp
pbuf in unsent queue is PBUF_ROM type and not to increase snd_buf value, maybe
it sould work?
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?59651>
_______________________________________________
Сообщение отправлено по Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #59651] tcp_write() without TCP_WRITE_FLAG_COPY,
Oleg Kobrin <=