08 Mar, 2023

6 commits

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

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • 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
     
  • Signed-off-by: Tao Yang

    Tao Yang
     
  • Add virtio performance evaluation driver and userspace tools

    Signed-off-by: Hou Zhiqiang
    Signed-off-by: Jiafei Pan

    Jiafei Pan
     
  • Add hypervisor-less backend support, so frontend notify backend by
    using triggering some interrupt in case of mmio write operation.

    Signed-off-by: Hou Zhiqiang
    Signed-off-by: Jiafei Pan

    Jiafei Pan
     

08 Feb, 2023

34 commits

  • Based on "99.4.2 Determining that the link partner supports preemption"
    of IEEE 802.3-2018, the felix driver need to support lldp verify
    feature.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • The ethtool module has added a preemption reset API, the dsa driver also
    needs to add this API to support reset preemption driver.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • The preemption should not be active until the lldp verify ensure that
    preemption is enabled on remote port. That needs a reset function to
    reset the preemption to make the preemption active. The user space
    application will use this API.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • In "99.4.2 Determining that the link partner supports preemption" of
    IEEE 802.3-2018, it defines that the preemption needs LLDP exchange to
    verify the preemption status of link partner. This patch adds lldp
    verify parameter and modify some parameter to fit this feature.

    User space command example:
    $ethtool --set-frame-preemption swp0 lldp-verify on \
    preemptible-queues-mask 0x02 min-frag-size 124

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • All callers of taprio_offload_get() and taprio_offload_free() prior to
    the blamed commit are conditionally compiled based on CONFIG_NET_SCH_TAPRIO.

    felix_vsc9959.c is different; it provides vsc9959_qos_port_tas_set()
    even when taprio is compiled out.

    Provide shim definitions for the functions exported by taprio so that
    felix_vsc9959.c is able to compile. vsc9959_qos_port_tas_set() in that
    case is dead code anyway, and ocelot_port->taprio remains NULL, which is
    fine for the rest of the logic.

    Fixes: 467a1c1c8c ("net: dsa: felix: keep reference on entire tc-taprio config")
    Reported-by: Colin Foster
    Signed-off-by: Vladimir Oltean
    Tested-by: Colin Foster
    Acked-by: Vinicius Costa Gomes
    Link: https://lore.kernel.org/r/20220704190241.1288847-1-vladimir.oltean@nxp.com
    Signed-off-by: Jakub Kicinski
    Signed-off-by: Xiaoliang Yang

    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
    Cc: Thomas Gleixner
    Signed-off-by: Vladimir Oltean
    Reviewed-by: Vincenzo Frascino # for the vDSO parts
    Signed-off-by: Jakub Kicinski

    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: Vladimir Oltean
    Signed-off-by: Jakub Kicinski

    Vladimir Oltean
     
  • Signed-off-by: Biwen Li

    Biwen Li
     
  • Signed-off-by: Biwen Li

    Biwen Li
     
  • Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • - Reduce the FEC_TX/RX ring buffer size to improve cache locality for
    tx/rx queues access
    - Remove unnecessary checks in critical rx/tx paths
    - Update rx/tx stats once all descriptors has been processed.
    - Reorder rx/tx queue structs to make frequently accessed members
    spatially close to enhance cache locality hits

    Signed-off-by: Marouen Ghodhbane

    Marouen Ghodhbane
     
  • AVB needs to change the Idle Slope depending on how many AVTP streams
    are configured on class A or class B queues.

    Signed-off-by: Marouen Ghodhbane

    Cosmin Chenaru
     
  • Add a fec public function to get the detailed properties
    of the available tx queues.

    Signed-off-by: Marouen Ghodhbane

    Seb Laveze
     
  • - FEC driver changes for avb hybrid mode support
    - added CONFIG_FIXED_PHY for phyless connection between
    imx6 FEC and SJA1105 host port
    - Disabled use of phy to mac latency compensation
    for packets from/to bridge stack (timestamped by the
    hw switch) and endpoint stack (direct connection mac to mac and
    loopback at host port)

    Signed-off-by: Marouen Ghodhbane

    Laurent Brando
     
  • - Integrate FEC driver transmit with AVB transmit layer.
    When AVB is enabled all packets transmitted through the regular
    network stack are put in a best effort queue and transmitted based on
    802.1Qat QoS algorithm.

    Modified tx avb interface (to workaround tx errata):
    Change the avb transmit interface to workaround an ethernet tx errata
    (where the hardware may stop transmit with packets pending, if it
    previously saw a "not ready" descriptor). A new function is added
    to trigger the actual transmit (for devices affected by errata).
    Typically the qos scheduler will wait for the last packet, in a
    scheduling period to be posted, before calling the new function.
    This assures the hardware can only see "ready" descriptors once
    it's started and until the next scheduling period.
    For a device not affected by the errata, transmit is still triggered
    for each packet (and calling the new funcion has no effect).

    - Also, setting the set FTYPE flag for all frames (AVTP and best effort)
    on AVB capable boards on fec_enet_start_xmit_avb

    Signed-off-by: Marouen Ghodhbane

    Sebastien Laveze
     
  • - Rx buffers are allocated and released by the AVB module.
    - Packets are consumed by AVB module by polling, and regular traffic
    is dequeued in napi.
    - If network buffer allocation fails, just re-use the buffer being
    processed (effectively dropping the received packet).

    Signed-off-by: Marouen Ghodhbane

    Sebastien Laveze
     
  • Signed-off-by: Marouen Ghodhbane

    Sebastien Laveze
     
  • Sebastien Laveze
     
  • Add AVB interface to FEC driver:
    - Compile option to enable/disable interface.
    - AVB module will register/unregister with FEC driver.
    - AVB descriptors definition
    - Tx/Rx ring size export and reduction for AVB
    * Increase rx ring buffer size to handle line rate small packets at
    Gbps (given that we are polling the ring buffer every 125us).
    - dynamic link speed support
    * provide phy link speed to AVB module
    - phy settings backup
    * When closing the FEC interface save the phy advertising settings
    and re-apply them when the interface is re-opened afterwards. Actually
    it would make more sens not to do a phy_disconnect on the ndo_close...

    Signed-off-by: Marouen Ghodhbane

    Sebastien Laveze
     
  • Return the rpmsg buffer MTU for sending message, so rpmsg users
    can split a long message in several sub rpmsg buffers.

    Signed-off-by: Arnaud Pouliquen
    Acked-by: Suman Anna
    Reviewed-by: Mathieu Poirier
    Reviewed-by: Bjorn Andersson

    Arnaud Pouliquen
     
  • Create one QMan portal for every cpu core, the driver will
    use the related portal on the core that assigned by "fsl,cpuid"

    1. For Ethercat performance, we can add the following setting in bootargs:
    a. isolcpus=x-y, linux won't schedule tasks to core x to y (0, 1, 2 ...)
    b. ethercat_cpus=x-y, core x to y are reserved for Ethercat QMan portal,
    ethernet QMan portal won't be on these cores, x or y is 0, 1, 2 ...
    for example: ethercat_cpus=0,1-3

    2. About ethercat_port environment variable for uboot:
    In the following command, we can set three groups of devices, every group
    contains one master and one backup device, and related cpu core id that
    QMan Portal is bound to. cpu id can be 0, 1, 2, 3, etc.

    group1: master is fm1-mac3, backup is fm1-mac5, and cpu id is 3
    group2: master is fm1-mac2, backup is fm1-mac4, and cpu id is 2
    group3: master is fm1-mac1, none backup device, and cpu id is 1

    command example:
    setenv ethercat_port "fm1-mac3,fm1-mac5,3;fm1-mac2,fm1-mac4,2;fm1-mac1,,1";

    Signed-off-by: hongbo.wang

    hongbo.wang
     
  • Signed-off-by: yangyn
    Signed-off-by: hongbo.wang

    yangyn
     
  • Preempt_set and preempt_get are new functions of ethtool ops, which
    is to set preempt queues according to 802.1qbu and 802.3br. Add them
    on slave ports of DSA framework, so that DSA devices can support to
    set preempt queues.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • ethtool is gaining support for using netlink as transport for its
    messages, being an alternative to ioctl() calls.

    Frame preemption, being new, makes a good target for being added to
    the list of features that are also supported via the netlink
    transport.

    Signed-off-by: Vinicius Costa Gomes

    Vinicius Costa Gomes
     
  • Frame preemption (described in IEEE 802.3br-2016) defines the concept
    of preemptible and express queues. It allows traffic from express
    queues to "interrupt" traffic from preemptible queues, which are
    "resumed" after the express traffic has finished transmitting.

    Frame preemption can only be used when both the local device and the
    link partner support it.

    A new ethtool command was added to support the configuration
    parameters.

    Signed-off-by: Vinicius Costa Gomes

    Vinicius Costa Gomes
     
  • This patch support to map PCP to different Cos queues by using tsntool
    netlink to set it.

    Signed-off-by: Xiaoliang Yang

    Xiaoliang Yang
     
  • An interesting possibility offered by the new thread NAPI code is to
    fine-tune the affinities and priorities of different NAPI instances. In a
    real-time networking context, this makes it possible to ensure packets
    received in a high-priority queue are always processed, and with low
    latency.

    However, the way the NAPI threads are named does not really expose which
    one is responsible for a given queue. Assigning a more explicit name to
    NAPI instances can make that determination much easier.

    Signed-off-by: Yannick Vignon

    Yannick Vignon
     
  • This feature can be test in the following case:
    Customer swp0 swp1 ISP

    Customer will send and receive packets with single VLAN tag(CTAG),
    ISP will send and receive packets with double VLAN tag(STAG and CTAG).
    This refers to "4.3.3 Provider Bridges and Q-in-Q Operation" in
    VSC99599_1_00_TS.pdf.

    The related test commands:
    1.
    devlink dev param set pci/0000:00:00.5 name qinq_port_bitmap \
    value 2 cmode runtime
    2.
    ip link add dev br0 type bridge vlan_protocol 802.1ad
    ip link set dev swp0 master br0
    ip link set dev swp1 master br0
    ip link set dev br0 type bridge vlan_filtering 1
    3.
    bridge vlan del dev swp0 vid 1 pvid
    bridge vlan add dev swp0 vid 100 pvid untagged
    bridge vlan add dev swp1 vid 100
    Result:
    Customer(tpid:8100 vid:111) -> swp0 -> swp1 -> ISP(STAG \
    tpid:88A8 vid:100, CTAG tpid:8100 vid:111)
    ISP(tpid:88A8 vid:100 tpid:8100 vid:222) -> swp1 -> swp0 ->\
    Customer(tpid:8100 vid:222)

    Signed-off-by: hongbo.wang
    Signed-off-by: Xiaoliang Yang

    hongbo.wang
     
  • the following command will be supported:

    Set bridge's vlan protocol:
    ip link set br0 type bridge vlan_protocol 802.1ad
    Add VLAN:
    ip link add link swp1 name swp1.100 type vlan protocol 802.1ad id 100
    Delete VLAN:
    ip link del link swp1 name swp1.100

    Signed-off-by: hongbo.wang
    Signed-off-by: Xiaoliang Yang

    hongbo.wang
     
  • Like the following command, it will enable IS1 key match for QinQ packet:

    tc filter add dev swp0 ingress \
    protocol 802.1ad flower \
    vlan_id 111 vlan_prio 1 vlan_ethtype 802.1q \
    cvlan_id 222 cvlan_prio 2 cvlan_ethtype ipv4 \
    action vlan pop

    Signed-off-by: hongbo.wang
    Signed-off-by: Xiaoliang Yang

    hongbo.wang
     
  • Signed-off-by: Yi Zhao
    Signed-off-by: Liu Gang
    Signed-off-by: Jianchao Wang
    Signed-off-by: Changming Huang

    Liu Gang
     
  • Signed-off-by: Xiaobo Xie

    Xiaobo Xie
     
  • The license was wrong by mistake, this commit updates the license to
    GPL-2.0 and removes the author name from file for maintaining
    confidentiality as this code is NXP owned.

    Signed-off-by: Kshitiz Varshney

    Kshitiz Varshney
     
  • The license was wrong by mistake, this commit updates the license to
    GPL-2.0 and removes the author name from file for maintaining
    confidentiality as this code is NXP owned.

    Signed-off-by: Kshitiz Varshney

    Kshitiz Varshney