Skip to content
Snippets Groups Projects
  1. Jan 21, 2016
    • Alessandro Rubini's avatar
      4eb6e859
    • Alessandro Rubini's avatar
      net: let the caller allocate queue size · 01ae0747
      Alessandro Rubini authored
      
      I also change the prototype of the socket creation so the compile can
      warn me where the locally-allocated socket must be changed.
      
      The size saving is not huge, but this allows later creation of further
      sockets with a smaller overhead (e.g.: the syslog socket that sends only
      has no queue, and the snmp socket needs a very small buffer).
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      01ae0747
    • Alessandro Rubini's avatar
      net: swap data in rx queue: header and payload are better consecutive · b0c2a74c
      Alessandro Rubini authored
      
      This has no effect, but greatly simplifies the later vlan-based operation.
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      b0c2a74c
    • Alessandro Rubini's avatar
      net: bugfix for rx of big frames · 06c21dd3
      Alessandro Rubini authored
      
      The misbehavior can be reproduced  with
      
         ping -s 422 192.168.16.200
      
      now, the first frame is fully stored to the queue:
      
         copy_out: head 368 avail 512 len 2
         copy_out: head 370 avail 510 len 14
         copy_out: head 384 avail 496 len 24
         copy_out: head 408 avail 472 len 450
      
      but it is retrieved only partially:
      
         copy_in: tail 368 avail 22 len 2
         copy_in: tail 370 avail 24 len 14
         copy_in: tail 384 avail 38 len 24
         copy_in: tail 408 avail 62 len 400
      
      The tail of the frame remains in the queue, and is
      not correctly removed. So we have:
      
          update_rx_queues: queue for socket full; [avail 462 required 490]
      
      (because 50 bytes are lost there). And the next rx frame,
      the tail of the previous one is considered size, then truncated
      to the payload buffer size (here 400 for icmp), so we never realign:
      
         copy_out: head 346 avail 462 len 2
         copy_out: head 348 avail 460 len 14
         copy_out: head 362 avail 446 len 24
         copy_out: head 386 avail 422 len 84
         Q: Size 84 head 470 Smac 0:4:25:12:34:56
         update_rx_queues: saved packet to queue [avail 338 n 1 size 124]
         copy_in: tail 296 avail 338 len 2
         copy_in: tail 298 avail 340 len 14
         copy_in: tail 312 avail 354 len 24
         copy_in: tail 336 avail 378 len 400
      
      So the available space in the 512-big queue explodes (and ping gets no
      replies):
      
         copy_in: tail 120 avail 1326 len 400
      
      In the caller I got one reply and nothing more, not even the short pings:
      
         68 bytes from 192.168.16.200: icmp_req=1 ttl=63 (truncated)
         5 packets transmitted, 1 received, 80% packet loss, time 4009ms
      
      With this commit everything flows
      
         68 bytes from 192.168.16.200: icmp_req=1 ttl=63 (truncated)
         68 bytes from 192.168.16.200: icmp_req=2 ttl=63 (truncated)
         68 bytes from 192.168.16.200: icmp_req=3 ttl=63 (truncated)
      
         64 bytes from 192.168.16.200: icmp_req=1 ttl=63 time=2.02 ms
         64 bytes from 192.168.16.200: icmp_req=2 ttl=63 time=1.61 ms
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      06c21dd3
    • Alessandro Rubini's avatar
      dev/minic: tx_frame: size refers to payload only. · 6bbea580
      Alessandro Rubini authored
      
      Several advantages:
       - normal practice: you send a buffer pointer and its own len
       - rx values is already fixed, earlier the wrong result was wrongly used
       - this detaches us from the header length. Transparent vlan ahead...
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      6bbea580
    • Alessandro Rubini's avatar
      e9ca75d4
  2. Jan 20, 2016
  3. Oct 30, 2015
  4. Oct 27, 2015
  5. Oct 13, 2015
  6. Sep 07, 2015
  7. Sep 01, 2015
  8. Jul 26, 2015
    • Alessandro Rubini's avatar
      wr_sockaddr_t: remove field if_name (it had no effect) · 223c36c5
      Alessandro Rubini authored
      
      The function wrpc_get_port_state() still receives two arguments, because
      it is being called by ppsi, and I'd better not change the API in small
      steps in there.
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      223c36c5
    • Alessandro Rubini's avatar
      ptpd_netif.h: remove prototypes and comment for unexisting code · 3a58720e
      Alessandro Rubini authored
      
      The function are not there:
      
       * ptpd_netif_poll()
            it never existed
      
       * ptpd_netif_select()
            nobody called it, and it only returned 0
      
       * ptpd_netif_locking_enable()
       * ptpd_netif_locking_disable()
       * ptpd_netif_locking_poll()
       * ptpd_netif_adjust_counters()
       * ptpd_netif_adjust_phase()
       * ptpd_netif_adjust_in_progress()
       * ptpd_netif_enable_timing_output()
       * ptpd_netif_enable_phase_tracking()
       * ptpd_netif_read_calibration_data()
            they were part of ptp-noposix-wrappers.c, removed in January 2015.
            The features are now part of the wr_ops in ppsi.
      
       * ptpd_netif_get_ifName()
            same (ptp-noposix-wrappers.c), it returned a constant name, and
            ppsi does it differently because based on arch-wrs/arch-wrpc
      
       * ptpd_netif_calibrating_enable()
       * ptpd_netif_calibrating_disable()
       * ptpd_netif_extsrc_detection()
            same, but in addition they were already doing nothing when removed
      
       * ptpd_netif_calibrating_poll()
       * ptpd_netif_calibration_pattern_enable()
       * ptpd_netif_calibration_pattern_disable()
            same, but they wer not actually used since calibration was gone
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      3a58720e
    • Alessandro Rubini's avatar
      general cleanup of wrong prototypes · be2bd234
      Alessandro Rubini authored
      
      I added -Wstrict-prototypes, that used to be included in -Wall settings
      but is not.  Actually, I think it should be an error to not specify an
      argument list by now.  If any, -traditional is there for old timers.
      
      Fortunately no bug was exposed by the missing prototypes.
      
      Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
      be2bd234
  9. Jul 24, 2015
  10. Jun 30, 2015
  11. Feb 12, 2014
  12. Feb 11, 2014
  13. Dec 16, 2013
  14. Nov 07, 2013