Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #28854

Re: High packet rate ethernet with LwIP

From Tauno Voipio <tauno.voipio@notused.fi.invalid>
Newsgroups comp.arch.embedded
Subject Re: High packet rate ethernet with LwIP
Date 2019-09-23 18:55 +0300
Organization A noiseless patient Spider
Message-ID <qmaptn$h7m$1@dont-email.me> (permalink)
References <nnd$46f32a8f$5fab99bf@bacadb246ebd9154> <f75aoe97bvj84fdfhp80376p9k1o1vm55v@4ax.com> <nnd$385a4f2f$5a6cc64f@f248034e4c3a4bf9> <wN1iF.558078$6H5.556331@fx45.iad>

Show all headers | View raw


On 23.9.19 14:13, Richard Damon wrote:
> On 9/23/19 4:37 AM, Stef wrote:
>> On 2019-09-20 upsidedown@downunder.com wrote in comp.arch.embedded:
>>> Have you looked at the Ethernet traffic with e.g. Wireshark ? Look for
>>> TCP retransmissions. If each serial line pumps data at 2 Mbit/s
>>> without any flow control, a TCP retransmission will upset the Ethernet
>>> traffic for a while, possibly overflowing buffers. Anyway, if retrials
>>> are expected, the gross (ethernet) speed must be several times larger
>>> than the net data rate.
>>
>> No, not done that yet, but indeed something I need to do.
>>
>>> Is it possible to use UDP and accept that some packets may be lost ?
>>> Include a serial number in each frame and the receiver can detect
>>> missing packets (that have failed CRC test) and mark the missing data
>>> accordingly. This way the net speed can be much closer to the raw data
>>> rate.
>>
>> That is something that came to my mind just after posting the question.
>> Would UDP be a better match for this application? The whole TCP
>> retransmission and timers may be the mechanisms causing the problem.
>> I think the standard TCP timeouts ar far too slow for this kind of
>> thing? Think I saw a 250 ms timer tick in the LwIP docs?
>>
>> Missing packets may not be a problem. It is measurement data and if
>> any re-transmit takes over 40 ms there is no point anyway, there is
>> already new data. On a much slower rate, some control connection does
>> have to be reliable. So that could use TCP (if is does not disturb
>> the parallel UDP flow in LwIP) or use UDP as well and implement the
>> retries in the application.
>>
>>
> 
> If occasional missing packets aren't an issue, but timely delivery is,
> then TCP isn't really the right choice. TCP is designed to get packets
> there eventually (if possible), at the expense of possible delays. It is
> also generally tuned for a long path (and thus the long delays for
> re-transmission).


TCP will get the octets (bytes) there in the correct order, but
it is explicitly specified that it does not transfer the packet
boundaries. Many TCP stacks transfer the data in the same size
chunks the user gives them for transport, but it is allowed to
re-package the octet stream in any way the routers under way feel
fit.

UDP does not need any more checksumming, the Ethernet, IP and UDP
layers have already taken care of that, discarding bad datagrams.
There are good reasons to add packet sequence numbering to the
datagrams sent, to track possibly discarded datagrams.

-- 

-TV

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-20 18:27 +0200
  Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-20 21:20 +0300
    Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 10:37 +0200
      Re: High packet rate ethernet with LwIP Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-09-23 14:08 +0300
      Re: High packet rate ethernet with LwIP Richard Damon <Richard@Damon-Family.org> - 2019-09-23 07:13 -0400
        Re: High packet rate ethernet with LwIP Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-09-23 18:55 +0300
      Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-23 14:04 +0200
        Re: High packet rate ethernet with LwIP Dimiter_Popoff <dp@tgi-sci.com> - 2019-09-23 17:03 +0300
          Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-23 18:37 +0200
            Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-24 14:22 +0200
              Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-25 07:55 +0300
                Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-25 09:51 +0200
                Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 16:03 +0200
                Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 11:59 +0200
                Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 13:16 +0200
              Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-25 09:42 +0200
                Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 13:41 +0200
                Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-25 14:10 +0200
                Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-25 15:22 +0200
      Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-23 22:26 +0300
        Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 22:16 +0200
          Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-23 23:08 +0200
  Re: High packet rate ethernet with LwIP Joe Chisolm <jchisolm6@earthlink.net> - 2019-09-20 13:44 -0500
    Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 10:46 +0200
  Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-21 19:00 +0200
    Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-22 00:01 +0300
      Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-22 09:06 +0200
        Re: High packet rate ethernet with LwIP upsidedown@downunder.com - 2019-09-22 11:29 +0300
          Re: High packet rate ethernet with LwIP David Brown <david.brown@hesbynett.no> - 2019-09-22 23:24 +0200
        Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 11:10 +0200
    Re: High packet rate ethernet with LwIP Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> - 2019-09-23 11:03 +0200

csiph-web