1. 27 7月, 2022 3 次提交
  2. 19 7月, 2022 3 次提交
  3. 18 7月, 2022 1 次提交
  4. 16 7月, 2022 1 次提交
  5. 15 7月, 2022 1 次提交
  6. 12 7月, 2022 1 次提交
  7. 07 7月, 2022 1 次提交
  8. 06 7月, 2022 1 次提交
  9. 02 7月, 2022 10 次提交
  10. 01 7月, 2022 6 次提交
    • V
      time64.h: consolidate uses of PSEC_PER_NSEC · 837ced3a
      Vladimir Oltean 提交于
      Time-sensitive networking code needs to work with PTP times expressed in
      nanoseconds, and with packet transmission times expressed in
      picoseconds, since those would be fractional at higher than gigabit
      speed when expressed in nanoseconds.
      
      Convert the existing uses in tc-taprio and the ocelot/felix DSA driver
      to a PSEC_PER_NSEC macro. This macro is placed in include/linux/time64.h
      as opposed to its relatives (PSEC_PER_SEC etc) from include/vdso/time64.h
      because the vDSO library does not (yet) need/use it.
      
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> # for the vDSO parts
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      837ced3a
    • V
      net: dsa: felix: drop oversized frames with tc-taprio instead of hanging the port · 55a515b1
      Vladimir Oltean 提交于
      Currently, sending a packet into a time gate too small for it (or always
      closed) causes the queue system to hold the frame forever. Even worse,
      this frame isn't subject to aging either, because for that to happen, it
      needs to be scheduled for transmission in the first place. But the frame
      will consume buffer memory and frame references while it is forever held
      in the queue system.
      
      Before commit a4ae997a ("net: mscc: ocelot: initialize watermarks to
      sane defaults"), this behavior was somewhat subtle, as the switch had a
      more intricately tuned default watermark configuration out of reset,
      which did not allow any single port and tc to consume the entire switch
      buffer space. Nonetheless, the held frames are still there, and they
      reduce the total backplane capacity of the switch.
      
      However, after the aforementioned commit, the behavior can be very
      clearly seen, since we deliberately allow each {port, tc} to consume the
      entire shared buffer of the switch minus the reservations (and we
      disable all reservations by default). That is to say, we allow a
      permanently closed tc-taprio gate to hang the entire switch.
      
      A careful inspection of the documentation shows that the QSYS:Q_MAX_SDU
      per-port-tc registers serve 2 purposes: one is for guard band calculation
      (when zero, this falls back to QSYS:PORT_MAX_SDU), and the other is to
      enable oversized frame dropping (when non-zero).
      
      Currently the QSYS:Q_MAX_SDU registers are all zero, so oversized frame
      dropping is disabled. The goal of the change is to enable it seamlessly.
      For that, we need to hook into the MTU change, tc-taprio change, and
      port link speed change procedures, since we depend on these variables.
      
      Frames are not dropped on egress due to a queue system oversize
      condition, instead that egress port is simply excluded from the mask of
      valid destination ports for the packet. If there are no destination
      ports at all, the ingress counter that increments is the generic
      "drop_tail" in ethtool -S.
      
      The issue exists in various forms since the tc-taprio offload was introduced.
      
      Fixes: de143c0e ("net: dsa: felix: Configure Time-Aware Scheduler via taprio offload")
      Reported-by: NRichie Pearn <richard.pearn@nxp.com>
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      55a515b1
    • V
      net: dsa: felix: keep QSYS_TAG_CONFIG_INIT_GATE_STATE(0xFF) out of rmw · d68a373b
      Vladimir Oltean 提交于
      In vsc9959_tas_clock_adjust(), the INIT_GATE_STATE field is not changed,
      only the ENABLE field. Similarly for the disabling of the time-aware
      shaper in vsc9959_qos_port_tas_set().
      
      To reflect this, keep the QSYS_TAG_CONFIG_INIT_GATE_STATE_M mask out of
      the read-modify-write procedure to make it clearer what is the intention
      of the code.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      d68a373b
    • V
      net: dsa: felix: keep reference on entire tc-taprio config · 1c9017e4
      Vladimir Oltean 提交于
      In a future change we will need to remember the entire tc-taprio config
      on all ports rather than just the base time, so use the
      taprio_offload_get() helper function to replace ocelot_port->base_time
      with ocelot_port->taprio.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      1c9017e4
    • Y
      net: dsa: rzn1-a5psw: add missing of_node_put() in a5psw_pcs_get() · 5a243894
      Yang Yingliang 提交于
      of_parse_phandle() will increase the refcount of 'pcs_node', so add
      of_node_put() before return from a5psw_pcs_get().
      
      Fixes: 888cdb89 ("net: dsa: rzn1-a5psw: add Renesas RZ/N1 advanced 5 port switch driver")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
      Link: https://lore.kernel.org/r/20220630014153.1888811-1-yangyingliang@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      5a243894
    • V
      net: dsa: felix: fix race between reading PSFP stats and port stats · 58bf4db6
      Vladimir Oltean 提交于
      Both PSFP stats and the port stats read by ocelot_check_stats_work() are
      indirectly read through the same mechanism - write to STAT_CFG:STAT_VIEW,
      read from SYS:STAT:CNT[n].
      
      It's just that for port stats, we write STAT_VIEW with the index of the
      port, and for PSFP stats, we write STAT_VIEW with the filter index.
      
      So if we allow them to run concurrently, ocelot_check_stats_work() may
      change the view from vsc9959_psfp_counters_get(), and vice versa.
      
      Fixes: 7d4b564d ("net: dsa: felix: support psfp filter on vsc9959")
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Link: https://lore.kernel.org/r/20220629183007.3808130-1-vladimir.oltean@nxp.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      58bf4db6
  11. 30 6月, 2022 4 次提交
  12. 29 6月, 2022 7 次提交
  13. 27 6月, 2022 1 次提交