1. Mar 20, 2021
    • Daode Huang's avatar
      net: hinic: remove the repeat word "the" in comment. · e2f84fd1
      Daode Huang authored
      
      
      There is a duplicate "the" in the comment, so delete it.
      
      Signed-off-by: default avatarDaode Huang <huangdaode@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e2f84fd1
    • Daode Huang's avatar
      net: hinic: add a blank line after declarations · 44401b67
      Daode Huang authored
      
      
      There should be a blank line after declarations, so just add it.
      
      Signed-off-by: default avatarDaode Huang <huangdaode@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44401b67
    • Daode Huang's avatar
      net: hinic: Remove unnecessary 'out of memory' message · c199fdb8
      Daode Huang authored
      
      
      This patch removes unnecessary out of memory message in hinic driver,
      fixes the following checkpatch.pl warning:
      "WARNING: Possible unnecessary 'out of memory' message"
      
      Signed-off-by: default avatarDaode Huang <huangdaode@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c199fdb8
    • Sieng Piaw Liew's avatar
      atl1c: use napi_alloc_skb · a9d6df64
      Sieng Piaw Liew authored
      
      
      Using napi_alloc_skb in NAPI context avoids enable/disable IRQs, which
      increases iperf3 result by a few Mbps. Since napi_alloc_skb() uses
      NET_IP_ALIGN, convert other alloc methods to the same padding. Tested
      on Intel Core2 and AMD K10 platforms.
      
      Signed-off-by: default avatarSieng Piaw Liew <liew.s.piaw@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9d6df64
    • Sieng Piaw Liew's avatar
      atl1c: switch to napi_gro_receive · e75a2e02
      Sieng Piaw Liew authored
      
      
      Changing to napi_gro_receive() improves efficiency significantly. Tested
      on Intel Core2-based motherboards and iperf3.
      
      Signed-off-by: default avatarSieng Piaw Liew <liew.s.piaw@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e75a2e02
    • Michael Walle's avatar
      net: phy: at803x: remove at803x_aneg_done() · 5b6b8274
      Michael Walle authored
      Here is what Vladimir says about it:
      
        at803x_aneg_done() keeps the aneg reporting as "not done" even when
        the copper-side link was reported as up, but the in-band autoneg has
        not finished.
      
        That was the _intended_ behavior when that code was introduced, and
        Heiner have said about it [1]:
      
        | That's not nice from the PHY:
        | It signals "link up", and if the system asks the PHY for link details,
        | then it sheepishly says "well, link is *almost* up".
      
        If the specification of phy_aneg_done behavior does not include
        in-band autoneg (and it doesn't), then this piece of code does not
        belong here.
      
        The fact that we can no longer trigger this code from phylib is yet
        another reason why it fails at its intended (and wrong) purpose and
        should be removed.
      
      Removing the SGMII link check, would just keep the call to
      genphy_aneg_done(), which is also the fallback. Thus we can just remove
      at803x_aneg_done() altogether.
      
      [1] https://lore.kernel.org/netdev/fdf0074a-2572-5914-6f3e-77202cbf96de@gmail.com/
      
      
      
      Suggested-by: default avatarVladimir Oltean <olteanv@gmail.com>
      Signed-off-by: default avatarMichael Walle <michael@walle.cc>
      Reviewed-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b6b8274
    • Kurt Kanzenbach's avatar
      taprio: Handle short intervals and large packets · 497cc002
      Kurt Kanzenbach authored
      
      
      When using short intervals e.g. below one millisecond, large packets won't be
      transmitted at all. The software implementations checks whether the packet can
      be fit into the remaining interval. Therefore, it takes the packet length and
      the transmission speed into account. That is correct.
      
      However, for large packets it may be that the transmission time exceeds the
      interval resulting in no packet transmission. The same situation works fine with
      hardware offloading applied.
      
      The problem has been observed with the following schedule and iperf3:
      
      |tc qdisc replace dev lan1 parent root handle 100 taprio \
      |   num_tc 8 \
      |   map 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 \
      |   queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \
      |   base-time $base \
      |   sched-entry S 0x40 500000 \
      |   sched-entry S 0xbf 500000 \
      |   clockid CLOCK_TAI \
      |   flags 0x00
      
      [...]
      
      |root@tsn:~# iperf3 -c 192.168.2.105
      |Connecting to host 192.168.2.105, port 5201
      |[  5] local 192.168.2.121 port 52610 connected to 192.168.2.105 port 5201
      |[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
      |[  5]   0.00-1.00   sec  45.2 KBytes   370 Kbits/sec    0   1.41 KBytes
      |[  5]   1.00-2.00   sec  0.00 Bytes  0.00 bits/sec    0   1.41 KBytes
      
      After debugging, it seems that the packet length stored in the SKB is about
      7000-8000 bytes. Using a 100 Mbit/s link the transmission time is about 600us
      which larger than the interval of 500us.
      
      Therefore, segment the SKB into smaller chunks if the packet is too big. This
      yields similar results than the hardware offload:
      
      |root@tsn:~# iperf3 -c 192.168.2.105
      |Connecting to host 192.168.2.105, port 5201
      |- - - - - - - - - - - - - - - - - - - - - - - - -
      |[ ID] Interval           Transfer     Bitrate         Retr
      |[  5]   0.00-10.00  sec  48.9 MBytes  41.0 Mbits/sec    0             sender
      |[  5]   0.00-10.02  sec  48.7 MBytes  40.7 Mbits/sec                  receiver
      
      Furthermore, the segmentation can be skipped for the full offload case, as the
      driver or the hardware is expected to handle this.
      
      Signed-off-by: default avatarKurt Kanzenbach <kurt@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      497cc002
  2. Mar 19, 2021