[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Driver question
From: |
address@hidden |
Subject: |
Re: [lwip-users] Driver question |
Date: |
Thu, 29 Nov 2018 20:22:18 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 29.11.2018 10:37, Ivan Warren wrote:
Hi,
I am writing an ethernet driver for my system and I was wondering :
Is there a way to indicate for inbound packets that more than one packet
was received ?
No, currently not.
Can I cram more than a single frame in a single pbuf, or do I have to
split out each packet, put them into pbufs and call netif->input()
repeatedly ? (or send a pbuf queue to netif->input() ?)
No, that doesn't work. The input packets expect one packet at a time. If
you're concerned about input speed (allocations, queue size), you might
be able to use tcpip_callbackmsg_new and tcpip_callbackmsg_trycallback.
And would that be advantageous ?
I'm asking because when running iperf, it seems that the TCP layer is
acknowledging *EVERY* datagram it receives (wich contain a payload) -
which may be superfluous (which *may* be because the TCP stack isn't
aware there are more coming !)
That, however, would not be changed by using tcpip_callbackmsg_*(). The
stack currently doesn't check that.
However, iperf should only ACK every 2nd segment unless there is
something wrong...
Simon