1. 15 May, 2020 8 commits
    • Dan Murphy's avatar
      dt-bindings: dp83867: Convert DP83867 to yaml · 74ac28f1
      Dan Murphy authored
      Convert the dp83867 binding to yaml.
      Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74ac28f1
    • Dan Murphy's avatar
      dt-bindings: net: dp83869: Update licensing info · e90b651e
      Dan Murphy authored
      Add BSD 2 Clause to the licensing.
      
      CC: Rob Herring <robh@kernel.org>
      Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e90b651e
    • Luo bin's avatar
      hinic: update huawei ethernet driver maintainer · 3f044d26
      Luo bin authored
      update huawei ethernet driver maintainer from aviad to Bin luo
      Signed-off-by: default avatarLuo bin <luobin9@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f044d26
    • Luo bin's avatar
      hinic: add set_ringparam ethtool_ops support · bcab6782
      Luo bin authored
      support to change TX/RX queue depth with ethtool -G
      Signed-off-by: default avatarLuo bin <luobin9@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bcab6782
    • Jakub Kicinski's avatar
      devlink: refactor end checks in devlink_nl_cmd_region_read_dumpit · 5a46b062
      Jakub Kicinski authored
      Clean up after recent fixes, move address calculations
      around and change the variable init, so that we can have
      just one start_offset == end_offset check.
      
      Make the check a little stricter to preserve the -EINVAL
      error if requested start offset is larger than the region
      itself.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a46b062
    • David S. Miller's avatar
      Merge branch 'am65-cpsw-add-taprio-EST-offload-support' · c7ad3657
      David S. Miller authored
      Murali Karicheri says:
      
      ====================
      am65-cpsw: add taprio/EST offload support
      
      AM65 CPSW h/w supports Enhanced Scheduled Traffic (EST – defined
      in P802.1Qbv/D2.2 that later got included in IEEE 802.1Q-2018)
      configuration. EST allows express queue traffic to be scheduled
      (placed) on the wire at specific repeatable time intervals. In
      Linux kernel, EST configuration is done through tc command and
      the taprio scheduler in the net core implements a software only
      scheduler (SCH_TAPRIO). If the NIC is capable of EST configuration,
      user indicate "flag 2" in the command which is then parsed by
      taprio scheduler in net core and indicate that the command is to
      be offloaded to h/w. taprio then offloads the command to the
      driver by calling ndo_setup_tc() ndo ops. This patch implements
      ndo_setup_tc() as well as other changes required to offload EST
      configuration to CPSW h/w
      
      For more details please refer patch 2/2.
      
      This series is based on original work done by Ivan Khoronzhuk
      <ivan.khoronzhuk@linaro.org> to add taprio offload support to
      AM65 CPSW 2G.
      
      1. Example configuration 3 Gates
      
      ifconfig eth0 down
      ethtool -L eth0 tx 3
      
      ethtool --set-priv-flags eth0 p0-rx-ptype-rrobin off
      
      ifconfig eth0 192.168.2.20
      
      tc qdisc replace dev eth0 parent root handle 100 taprio \
          num_tc 3 \
          map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \
          queues 1@0 1@1 1@2 \
          base-time 0000 \
          sched-entry S 4 125000 \
          sched-entry S 2 125000 \
          sched-entry S 1 250000 \
          flags 2
      
      2. Example configuration 8 Gates
      
      ifconfig eth0 down
      ethtool -L eth0 tx 8
      
      ethtool --set-priv-flags eth0 p0-rx-ptype-rrobin off
      
      ifconfig eth0 192.168.2.20
      
      tc qdisc replace dev eth0 parent root handle 100 taprio \
          num_tc 8 \
          map 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 \
          queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \
          base-time 0000 \
          sched-entry S 80 125000 \
          sched-entry S 40 125000 \
          sched-entry S 20 125000 \
          sched-entry S 10 125000 \
          sched-entry S 08 125000 \
          sched-entry S 04 125000 \
          sched-entry S 02 125000 \
          sched-entry S 01 125000 \
          flags 2
      
      Classify frames to particular priority using skbedit so that they land at
      a specific queue in cpsw h/w which is Gated by the EST gate which opens based
      on the sched-entry.
      
      tc qdisc add dev eth0 clsact
      
      In the below for example an iperf3 session with destination port 5007
      will go through Q7.
      
      tc filter add dev eth0 egress protocol ip prio 1 u32 match ip dport 5007 0xffff action skbedit priority 7
      
      tc filter add dev eth0 egress protocol ip prio 1 u32 match ip dport 5006 0xffff action skbedit priority 6
      tc filter add dev eth0 egress protocol ip prio 1 u32 match ip dport 5005 0xffff action skbedit priority 5
      tc filter add dev eth0 egress protocol ip prio 1 u32 match ip dport 5004 0xffff action skbedit priority 4
      tc filter add dev eth0 egress protocol ip prio 1 u32 match ip dport 5003 0xffff action skbedit priority 3
      tc filter add dev eth0 egress protocol ip prio 1 u32 match ip dport 5002 0xffff action skbedit priority 2
      tc filter add dev eth0 egress protocol ip prio 1 u32 match ip dport 5001 0xffff action skbedit priority 1
      
      iperf3 -c 192.168.2.10 -u -l1470 -b32M -t1 -p 5007
      
      Testing was done by capturing frames at the PC using wireshark and checking for
      the bust interval or cycle time of UDP frames with a specific port number.
      Verified that the distance between first frame of a burst (cycle-time) is 1
      milli second and burst duration is within 125 usec based on the received packet
      timestamp shown in wireshark packet display.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c7ad3657
    • Ivan Khoronzhuk's avatar
      ethernet: ti: am65-cpsw-qos: add TAPRIO offload support · 8127224c
      Ivan Khoronzhuk authored
      AM65 CPSW h/w supports Enhanced Scheduled Traffic (EST – defined
      in P802.1Qbv/D2.2 that later got included in IEEE 802.1Q-2018)
      configuration. EST allows express queue traffic to be scheduled
      (placed) on the wire at specific repeatable time intervals. In
      Linux kernel, EST configuration is done through tc command and
      the taprio scheduler in the net core implements a software only
      scheduler (SCH_TAPRIO). If the NIC is capable of EST configuration,
      user indicate "flag 2" in the command which is then parsed by
      taprio scheduler in net core and indicate that the command is to
      be offloaded to h/w. taprio then offloads the command to the
      driver by calling ndo_setup_tc() ndo ops. This patch implements
      ndo_setup_tc() to offload EST configuration to CPSW h/w.
      
      Currently driver supports only SetGateStates operation. EST
      operates on a repeating time interval generated by the CPTS EST
      function generator. Each Ethernet port has a global EST fetch
      RAM that can be configured as 2 buffers, each of 64 locations
      or one large buffer of 128 locations. In 2 buffer configuration,
      a ping pong mechanism is used to hold the active schedule (oper)
      in one buffer and new (admin) command in the other. Each 22-bit
      fetch command consists of a 14-bit fetch count (14 MSB’s) and an
      8-bit priority fetch allow (8 LSB’s) that will be applied for the
      fetch count time in wireside clocks. Driver process each of the
      sched-entry in the offload command and update the fetch RAM.
      Driver configures duration in sched-entry into the fetch count
      and Gate mask into the priority fetch bits of the RAM. Then
      configures the CPTS EST function generator to activate the
      schedule. Currently driver supports only 2 buffer configuration
      which means driver supports a max cycle time of ~8 msec.
      
      CPSW supports a configurable number of priority queues (up to 8)
      and needs to be switched to this mode from the default round
      robin mode before EST can be offloaded. User configures
      these through ethtool commands (-L for changing number of
      queues and --set-priv-flags to disable round robin mode).
      Driver doesn't enable EST if pf_p0_rx_ptype_rrobin privat flag
      is set. The flag is common for all ports, and so can't be just
      overridden by taprio configuration w/o user involvement.
      Command fails if pf_p0_rx_ptype_rrobin is already set in the
      driver.
      
      Scheds (commands) configuration depends on interface speed so
      driver translates the duration to the fetch count based on
      link speed. Each schedule can be constructed with several
      command entries in fetch RAM  depending on interval. For example
      if each sched has timer interval < ~130us on 1000 Mb link then
      each sched consumes one command and have 1:1 mapping. When
      Ethernet link goes down, driver purge the configuration if link
      is down for more than 1 second.
      
      The patch allows to update the timer and scheds memory only if it's
      really needed, and skip cases required the user to stop timer by
      configuring only shceds memory.
      Signed-off-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8127224c
    • Ivan Khoronzhuk's avatar
      ethernet: ti: am65-cpts: add routines to support taprio offload · ec008fa2
      Ivan Khoronzhuk authored
      TAPRIO/EST offload support in CPSW2G requires EST scheduler
      function enabled in CPTS. So this patch add a function to
      set cycle time for EST scheduler.  It also add a function for
      getting time in ns of PHC clock for taprio qdisc configuration.
      Mostly to verify if timer update is needed or to get actual
      state of oper/admin schedule.
      Signed-off-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec008fa2
  2. 14 May, 2020 20 commits
  3. 13 May, 2020 12 commits