1. 21 Sep, 2016 1 commit
  2. 19 Jun, 2016 1 commit
    • Paul Sokolovsky's avatar
      extmod/modlwip: Store a chain of incoming pbufs, instead of only one. · 5071ceea
      Paul Sokolovsky authored
      Storing a chain of pbuf was an original design of @pfalcon's lwIP socket
      module. The problem with storing just one, like modlwip does is that
      "peer closed connection" notification is completely asynchronous and out of
      band. So, there may be following sequence of actions:
      
      1. pbuf #1 arrives, and stored in a socket.
      2. pbuf #2 arrives, and rejected, which causes lwIP to put it into a
      queue to re-deliver later.
      3. "Peer closed connection" is signaled, and socket is set at such status.
      4. pbuf #1 is processed.
      5. There's no stored pbufs in teh socket, and socket status is "peer closed
      connection", so EOF is returned to a client.
      6. pbuf #2 gets redelivered.
      
      Apparently, there's no easy workaround for this, except to queue all
      incoming pbufs in a socket. This may lead to increased memory pressure,
      as number of pending packets would be regulated only by TCP/IP flow
      control, whereas with previous setup lwIP had a global overlook of number
      packets waiting for redelivery and could regulate them centrally.
      5071ceea
  3. 18 Jun, 2016 1 commit
  4. 15 May, 2016 1 commit
    • Paul Sokolovsky's avatar
      extmod/modlwip: Rework how Python accept callback is called. · afce978a
      Paul Sokolovsky authored
      Calling it from lwIP accept callback will lead incorrect functioning
      and/or packet leaks if Python callback has any networking calls, due
      to lwIP non-reentrancy. So, instead schedule "poll" callback to do
      that, which will be called by lwIP when it does not perform networking
      activities. "Poll" callback is called infrequently though (docs say
      every 0.5s by default), so for better performance, lwIP needs to be
      patched to call poll callback soon after accept callback, but when
      current packet is already processed.
      afce978a
  5. 12 May, 2016 1 commit
  6. 03 May, 2016 1 commit
  7. 26 Apr, 2016 3 commits
  8. 25 Apr, 2016 1 commit
  9. 17 Apr, 2016 1 commit
  10. 16 Apr, 2016 2 commits
  11. 14 Apr, 2016 1 commit
  12. 13 Apr, 2016 2 commits
  13. 10 Apr, 2016 1 commit
    • Paul Sokolovsky's avatar
      extmod/modlwip: Fix for loss of data in unaccepted incoming sockets. · 70632100
      Paul Sokolovsky authored
      When lwIP creates a incoming connection socket of a listen socket, it
      sets its recv callback to one which discards incoming data. We set
      proper callback only in accept() call, when we allocate Python-level
      socket where we can queue incoming data. So, in lwIP accept callback
      be sure to set recv callback to one which tells lwIP to not discard
      incoming data.
      70632100
  14. 25 Mar, 2016 5 commits
  15. 12 Mar, 2016 3 commits
  16. 11 Mar, 2016 1 commit
  17. 09 Mar, 2016 8 commits
  18. 08 Mar, 2016 3 commits
  19. 30 Dec, 2015 3 commits