Skip to content
  1. Apr 17, 2021
    • Ederson de Souza's avatar
      igc: enable auxiliary PHC functions for the i225 · 87938851
      Ederson de Souza authored
      
      
      The i225 device offers a number of special PTP Hardware Clock features on
      the Software Defined Pins (SDPs) - much like i210, which is used as
      inspiration for this patch. It enables two possible functions, namely
      time stamping external events and periodic output signals.
      
      The assignment of PHC functions to the four SDP can be freely chosen by
      the user.
      
      For the external events time stamping, when the SDP (configured as input
      by user) level changes, an interrupt is generated and the kernel
      Precision Time Protocol (PTP) is informed.
      
      For the periodic output signals, the i225 is configured to generate them
      (so the SDP level will change periodically) and the driver also has to
      keep updating the time of the next level change. However, this work is
      not necessary for some frequencies as the i225 takes care of them
      (namely, anything with a half-cycle of 500ms, 250ms, 125ms or < 70ms).
      
      While i225 allows up to four timers to be used to source the time used
      on the external events or output signals, this patch uses only one of
      those timers. Main reason is to keep it simple, as it's not clear how
      these extra timers would be exposed to users. Note that currently a NIC
      can expose a single PTP device.
      
      Signed-off-by: default avatarEderson de Souza <ederson.desouza@intel.com>
      Tested-by: default avatarDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      87938851
    • Ederson de Souza's avatar
      igc: Enable internal i225 PPS · 64433e5b
      Ederson de Souza authored
      
      
      The i225 device can produce one interrupt on the full second, much
      like i210 - from where this patch is inspired.
      
      This patch sets up the full second interruption on the i225 and when
      receiving it, it sends a PPS event to PTP (Precision Time Protocol)
      kernel subsystem.
      
      The PTP subsystem exposes the PPS events via ioctl and sysfs, and one
      can use the `testptp` tool (tools/testing/selftests/ptp) to check that
      the events are being generated.
      
      Signed-off-by: default avatarEderson de Souza <ederson.desouza@intel.com>
      Tested-by: default avatarDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      64433e5b
    • Grzegorz Siwik's avatar
      igb: Add double-check MTA_REGISTER for i210 and i211 · 1d3cb90c
      Grzegorz Siwik authored
      
      
      Add new function which checks MTA_REGISTER if its filled correctly.
      If not then writes again to same register.
      There is possibility that i210 and i211 could not accept
      MTA_REGISTER settings, specially when you add and remove
      many of multicast addresses in short time.
      Without this patch there is possibility that multicast settings will be
      not always set correctly in hardware.
      
      Signed-off-by: default avatarGrzegorz Siwik <grzegorz.siwik@intel.com>
      Tested-by: default avatarDave Switzer <david.switzer@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      1d3cb90c
    • Ederson de Souza's avatar
      igb: Redistribute memory for transmit packet buffers when in Qav mode · 26b67f5a
      Ederson de Souza authored
      
      
      i210 has a total of 24KB of transmit packet buffer. When in Qav mode,
      this buffer is divided into four pieces, one for each Tx queue.
      Currently, 8KB are given to each of the two SR queues and 4KB are given
      to each of the two SP queues.
      
      However, it was noticed that such distribution can make best effort
      traffic (which would usually go to the SP queues when Qav is enabled, as
      the SR queues would be used by ETF or CBS qdiscs for TSN-aware traffic)
      perform poorly. Using iperf3 to measure, one could see the performance
      of best effort traffic drop by nearly a third (from 935Mbps to 578Mbps),
      with no TSN traffic competing.
      
      This patch redistributes the 24KB to each queue equally: 6KB each. On
      tests, there was no notable performance reduction of best effort traffic
      performance when there was no TSN traffic competing.
      
      Below, more details about the data collected:
      
      All experiments were run using the following qdisc setup:
      
      qdisc taprio 100: root refcnt 9 tc 4 map 3 3 3 2 3 0 0 3 3 3 3 3 3 3 3 3
          queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1
          clockid TAI base-time 0 cycle-time 10000000 cycle-time-extension 0
          index 0 cmd S gatemask 0xf interval 10000000
      
      qdisc etf 8045: parent 100:1 clockid TAI delta 1000000 offload on
          deadline_mode off skip_sock_check off
      
      TSN traffic, when enabled, had this characteristics:
       Packet size: 1500 bytes
       Transmission interval: 125us
      
      ----------------------------------
      Without this patch:
      ----------------------------------
      - TCP data:
          - No TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.35 GBytes   578 Mbits/sec    0
      
          - With TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.07 GBytes   460 Mbits/sec    1
      
      - TCP data limiting iperf3 buffer size to 4K:
          - No TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.35 GBytes   579 Mbits/sec    0
      
          - With TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.08 GBytes   462 Mbits/sec    0
      
      - TCP data limiting iperf3 buffer size to 192 bytes (smallest size without
       serious performance degradation):
          - No TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.34 GBytes   577 Mbits/sec    0
      
          - With TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.07 GBytes   461 Mbits/sec    1
      
      - UDP data at 1000Mbit/sec:
          - No TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
              [  5]   0.00-20.00  sec  1.36 GBytes   586 Mbits/sec  0.000 ms  0/1011407 (0%)
      
          - With TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
              [  5]   0.00-20.00  sec  1.05 GBytes   451 Mbits/sec  0.000 ms  0/778672 (0%)
      
      ----------------------------------
      With this patch:
      ----------------------------------
      
      - TCP data:
          - No TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  2.17 GBytes   932 Mbits/sec    0
      
          - With TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.50 GBytes   646 Mbits/sec    1
      
      - TCP data limiting iperf3 buffer size to 4K:
          - No TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  2.17 GBytes   931 Mbits/sec    0
      
          - With TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.50 GBytes   645 Mbits/sec    0
      
      - TCP data limiting iperf3 buffer size to 192 bytes (smallest size without
       serious performance degradation):
          - No TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  2.17 GBytes   932 Mbits/sec    1
      
          - With TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Retr
              [  5]   0.00-20.00  sec  1.50 GBytes   645 Mbits/sec    0
      
      - UDP data at 1000Mbit/sec:
          - No TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
              [  5]   0.00-20.00  sec  2.23 GBytes   956 Mbits/sec  0.000 ms  0/1650226 (0%)
      
          - With TSN traffic:
              [ ID] Interval           Transfer     Bitrate         Jitter    Lost/Total Datagrams
              [  5]   0.00-20.00  sec  1.51 GBytes   649 Mbits/sec  0.000 ms  0/1120264 (0%)
      
      Signed-off-by: default avatarEderson de Souza <ederson.desouza@intel.com>
      Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      26b67f5a
  2. Apr 16, 2021
  3. Apr 15, 2021