Driver question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Driver question

Ivan Warren
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 ?

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() ?)

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 !)

Sorry, these are probably newbie questions....

--Ivan



_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Driver question

goldsimon@gmx.de
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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users