02 Aug, 2023

2 commits


27 May, 2023

1 commit


26 May, 2023

1 commit


22 Mar, 2023

1 commit


21 Mar, 2023

1 commit


20 Mar, 2023

1 commit


08 Mar, 2023

33 commits

  • Add disabled parameter to support disable the preemption configuration
    on stmmac.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • Add disabled parameter to support disable the preemption configuration
    on ENETC.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • Add disabled parameter to disable preemption on VSC9959.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • Add a parameter to disable the preemption and clean the configuration.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • Fixes: 499eab27dcfe ("virtio: trans: only kick backend when starving")
    Signed-off-by: Hou Zhiqiang

    Hou Zhiqiang
     
  • The FPE parameters should be configured once the fpe_configure() is
    called. FPE will not enabled before preemption verification.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • The preemption verification is not working when enabled lldp
    verification. Make fpe_cfg->enable always enabled after configure the
    preemption can fix this issue.

    Another issue is that preemption status can't be inactive after link
    down. Disable the preemption once link is down.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • The preemption will not be disabled when link down, this patch fix that
    issue.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • The preemption status may not equal to active status when preemption
    verification enabled. This patch enable the status once preemption is
    enabled even if it's not active.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • Signed-off-by: Hou Zhiqiang

    Hou Zhiqiang
     
  • Too much frontend to backend virtqueue notification impacts the
    performance. To reduce the virtqueue notification, only kick
    backend when starving.

    Signed-off-by: Hou Zhiqiang

    Hou Zhiqiang
     
  • Signed-off-by: Hou Zhiqiang

    Hou Zhiqiang
     
  • Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • When not specified in device tree, rx phy-mac delay compensation value should be 0.

    fixes: 9d00b3fe64f2c3774779860a84f06fd6631ff0e3

    Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • Reducing the RX and TX ring size was introduced to improve CPU load with avb module
    loaded. But, this affects the best effort bandwidth when the module is not inserted
    (especially TX bandwidth)

    iperf results with current ring sizes:

    root@imx8mp-lpddr4-evk:~# iperf3 -c 192.168.1.60
    Connecting to host 192.168.1.60, port 5201
    [ 5] local 192.168.1.100 port 34108 connected to 192.168.1.60 port 5201
    [ ID] Interval Transfer Bitrate Retr Cwnd
    [ 5] 0.00-1.00 sec 14.7 MBytes 123 Mbits/sec 0 119 KBytes
    [ 5] 1.00-2.00 sec 14.4 MBytes 121 Mbits/sec 0 119 KBytes

    iperf results with new parameters:

    TX bandwidth:

    root@imx8mp-lpddr4-evk:~# iperf3 -c 192.164.1.102 -t 5
    Connecting to host 192.164.1.102, port 5201
    [ 5] local 192.164.1.162 port 42646 connected to 192.164.1.102 port 5201
    [ ID] Interval Transfer Bitrate Retr Cwnd
    [ 5] 0.00-1.00 sec 112 MBytes 940 Mbits/sec 0 576 KBytes
    [ 5] 1.00-2.00 sec 109 MBytes 914 Mbits/sec 0 576 KBytes
    [ 5] 2.00-3.00 sec 110 MBytes 919 Mbits/sec 0 576 KBytes
    [ 5] 3.00-4.00 sec 109 MBytes 919 Mbits/sec 0 576 KBytes

    RX bandwidth:

    root@imx8mp-lpddr4-evk:~# iperf3 -c 192.164.1.102 -t 5 -R
    Connecting to host 192.164.1.102, port 5201
    Reverse mode, remote host 192.164.1.102 is sending
    [ 5] local 192.164.1.162 port 44888 connected to 192.164.1.102 port 5201
    [ ID] Interval Transfer Bitrate
    [ 5] 0.00-1.00 sec 112 MBytes 941 Mbits/sec
    [ 5] 1.00-2.00 sec 112 MBytes 941 Mbits/sec
    [ 5] 2.00-3.00 sec 112 MBytes 942 Mbits/sec
    [ 5] 3.00-4.00 sec 112 MBytes 941 Mbits/sec
    [ 5] 4.00-5.00 sec 112 MBytes 941 Mbits/sec

    Also, the default coalescing settings were not adjusted to the new ring size: use
    custom values for AVB_SUPPORT.

    fixes: "75267d9e net: fec: avb: Improve CPU load under heavy AVB network load"

    Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • Prior to the Fixes: commit, the initialization code went through the
    same fec_enet_set_coalesce() function as used by ethtool, and that
    function correctly checks whether the current variant has support for
    irq coalescing.

    Now that the initialization code instead calls fec_enet_itr_coal_set()
    directly, that call needs to be guarded by a check for the
    FEC_QUIRK_HAS_COALESCE bit.

    Fixes: df727d4547de (net: fec: don't reset irq coalesce settings to defaults on "ip link up")
    Reported-by: Greg Ungerer
    Signed-off-by: Rasmus Villemoes
    Reviewed-by: Florian Fainelli
    Link: https://lore.kernel.org/r/20221205204604.869853-1-linux@rasmusvillemoes.dk
    Signed-off-by: Jakub Kicinski

    Rasmus Villemoes
     
  • Currently, when a FEC device is brought up, the irq coalesce settings
    are reset to their default values (1000us, 200 frames). That's
    unexpected, and breaks for example use of an appropriate .link file to
    make systemd-udev apply the desired
    settings (https://www.freedesktop.org/software/systemd/man/systemd.link.html),
    or any other method that would do a one-time setup during early boot.

    Refactor the code so that fec_restart() instead uses
    fec_enet_itr_coal_set(), which simply applies the settings that are
    stored in the private data, and initialize that private data with the
    default values.

    Signed-off-by: Rasmus Villemoes
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller
    (cherry picked from commit df727d4547de568302b0ed15b0d4e8a469bdb456)

    Rasmus Villemoes
     
  • fec_main.c:3942:25: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    3942 | if (skb)
    | ^~
    fec_main.c:3947:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
    3947 | txq->tx_skbuff[i] = NULL;
    |

    Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • We have two IS1 filters of the OCELOT_VCAP_KEY_ANY key type (the one with
    "action vlan pop" and the one with "action vlan modify") and one of the
    OCELOT_VCAP_KEY_IPV4 key type (the one with "action skbedit priority").
    But we have no IS1 filter with the OCELOT_VCAP_KEY_ETYPE key type, and
    there was an uncaught breakage there.

    To increase test coverage, convert one of the OCELOT_VCAP_KEY_ANY
    filters to OCELOT_VCAP_KEY_ETYPE, by making the filter also match on the
    MAC SA of the traffic sent by mausezahn, $h1_mac.

    Signed-off-by: Vladimir Oltean
    Link: https://lore.kernel.org/r/20230205192409.1796428-2-vladimir.oltean@nxp.com
    Signed-off-by: Paolo Abeni

    Vladimir Oltean
     
  • Alternative short title: don't instruct the hardware to match on
    EtherType with "protocol 802.1Q" flower filters. It doesn't work for the
    reasons detailed below.

    With a command such as the following:

    tc filter add dev $swp1 ingress chain $(IS1 2) pref 3 \
    protocol 802.1Q flower skip_sw vlan_id 200 src_mac $h1_mac \
    action vlan modify id 300 \
    action goto chain $(IS2 0 0)

    the created filter is set by ocelot_flower_parse_key() to be of type
    OCELOT_VCAP_KEY_ETYPE, and etype is set to {value=0x8100, mask=0xffff}.
    This gets propagated all the way to is1_entry_set() which commits it to
    hardware (the VCAP_IS1_HK_ETYPE field of the key). Compare this to the
    case where src_mac isn't specified - the key type is OCELOT_VCAP_KEY_ANY,
    and is1_entry_set() doesn't populate VCAP_IS1_HK_ETYPE.

    The problem is that for VLAN-tagged frames, the hardware interprets the
    ETYPE field as holding the encapsulated VLAN protocol. So the above
    filter will only match those packets which have an encapsulated protocol
    of 0x8100, rather than all packets with VLAN ID 200 and the given src_mac.

    The reason why this is allowed to occur is because, although we have a
    block of code in ocelot_flower_parse_key() which sets "match_protocol"
    to false when VLAN keys are present, that code executes too late.
    There is another block of code, which executes for Ethernet addresses,
    and has a "goto finished_key_parsing" and skips the VLAN header parsing.
    By skipping it, "match_protocol" remains with the value it was
    initialized with, i.e. "true", and "proto" is set to f->common.protocol,
    or 0x8100.

    The concept of ignoring some keys rather than erroring out when they are
    present but can't be offloaded is dubious in itself, but is present
    since the initial commit fe3490e6107e ("net: mscc: ocelot: Hardware
    ofload for tc flower filter"), and it's outside of the scope of this
    patch to change that.

    The problem was introduced when the driver started to interpret the
    flower filter's protocol, and populate the VCAP filter's ETYPE field
    based on it.

    To fix this, it is sufficient to move the code that parses the VLAN keys
    earlier than the "goto finished_key_parsing" instruction. This will
    ensure that if we have a flower filter with both VLAN and Ethernet
    address keys, it won't match on ETYPE 0x8100, because the VLAN key
    parsing sets "match_protocol = false".

    Fixes: 86b956de119c ("net: mscc: ocelot: support matching on EtherType")
    Signed-off-by: Vladimir Oltean
    Signed-off-by: Xiaoliang Yang

    Vladimir Oltean
     
  • To avoid Linux busfreq to crash multicore virtio backend running on other
    Cores.

    Signed-off-by: Jiafei Pan

    Jiafei Pan
     
  • To avoid Linux busfreq to crash multicore virtio backend running on other
    Cores.

    Signed-off-by: Jiafei Pan

    Jiafei Pan
     
  • Signed-off-by: Hou Zhiqiang

    Hou Zhiqiang
     
  • This fixes the following issue:

    [ 24.802178] Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000ffffd8fd8974
    [ 24.802194] Mem abort info:
    [ 24.802196] ESR = 0x9600000f
    [ 24.802198] EC = 0x25: DABT (current EL), IL = 32 bits
    [ 24.802202] SET = 0, FnV = 0
    [ 24.802204] EA = 0, S1PTW = 0
    [ 24.802205] FSC = 0x0f: level 3 permission fault
    [ 24.802208] Data abort info:
    [ 24.802209] ISV = 0, ISS = 0x0000000f
    [ 24.802211] CM = 0, WnR = 0
    ......
    [ 24.802243] Hardware name: NXP i.MX93 11X11 EVK board - Baremetal (DT)
    [ 24.802246] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [ 24.802250] pc : ipi_baremetal_ioctl+0x4/0x28
    [ 24.802263] lr : __arm64_sys_ioctl+0xac/0xf0
    [ 24.802271] sp : ffff80000b6f3de0
    [ 24.802272] x29: ffff80000b6f3de0 x28: ffff00001a47f000 x27: 0000000000000000
    [ 24.802279] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
    [ 24.802285] x23: 0000000000000004 x22: 0000ffffd8fd8974 x21: ffff00000587e780
    [ 24.802291] x20: ffff00000587e780 x19: 0000000000000001 x18: 0000000000000000
    [ 24.802297] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
    [ 24.802302] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
    [ 24.802308] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000
    [ 24.802314] x8 : 0000000000000000 x7 : 0000000000000001 x6 : 0000000000000200
    [ 24.802319] x5 : 0000000000000004 x4 : 0000000000000001 x3 : ffff80000854de28
    [ 24.802325] x2 : 0000ffffd8fd8974 x1 : 0000000000000001 x0 : ffff00000587e780
    [ 24.802332] Call trace:
    [ 24.802334] ipi_baremetal_ioctl+0x4/0x28
    [ 24.802338] invoke_syscall+0x44/0x100
    [ 24.802345] el0_svc_common.constprop.3+0xcc/0xf0
    [ 24.802350] do_el0_svc+0x24/0x88
    [ 24.802354] el0_svc+0x20/0x60
    [ 24.802360] el0t_64_sync_handler+0x90/0xb8
    [ 24.802364] el0t_64_sync+0x180/0x184
    [ 24.802373] Code: d2800000 d50323bf d65f03c0 7100043f (f9400040)
    [ 24.802379] ---[ end trace 0000000000000002 ]---

    Signed-off-by: Tao Yang

    Tao Yang
     
  • This would avoid inheriting any previously set (from included dts{i} files)
    assigned-clock-rates in the node.

    fixes: 310333596893ad3c2d11126d972e2bff15f5b068

    Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • The GPT timers used for avb media clock recovery (and avb hw timer) have as constraint on rate only when
    using the external clock as counter clock (then the frequency should be < 1/4 peripheral clock).
    For SoCs that can root the peripheral clock directly from the audio pll, use the pll frequency as-is
    for better precision for media clock recovery sampling.

    The TPM timer used for i.MX93 have no constraint on bus clock domain and counter clock domain, so use the
    audio pll as counter clock without any division also.

    Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • - Multiply the numerator and denomerator of the fractional part of the audio pll to have
    better granularity of audio pll adjustement when changing the numerator part on the fly.
    - Keep mfd < 2**21 to avoid u32 value overflow on multiplication in recalc_rate() function while using do_div()

    Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • Signed-off-by: Hou Zhiqiang

    Hou Zhiqiang
     
  • Signed-off-by: Hou Zhiqiang

    Hou Zhiqiang