net: openvswitch: fix race on port output

Bug #2020606 reported by William Tu
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-bluefield (Ubuntu)

Bug Description

fix race on port output

* Explain the bug(s)

there is a race condition on port output

* brief explanation of fixes

We found that upstream linux has the same issue and fix

commit 066b86787fa3d97b7aefb5ac0a99a22dad2d15f8
Author: Felix Huettner <email address hidden>
Date: Wed Apr 5 07:53:41 2023 +0000

    net: openvswitch: fix race on port output

    assume the following setup on a single machine:
    1. An openvswitch instance with one bridge and default flows
    2. two network namespaces "server" and "client"
    3. two ovs interfaces "server" and "client" on the bridge
    4. for each ovs interface a veth pair with a matching name and 32 rx and
       tx queues
    5. move the ends of the veth pairs to the respective network namespaces
    6. assign ip addresses to each of the veth ends in the namespaces (needs
       to be the same subnet)
    7. start some http server on the server network namespace
    8. test if a client in the client namespace can reach the http server
    Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action")
    Co-developed-by: Luca Czesla <email address hidden>
    Signed-off-by: Luca Czesla <email address hidden>
    Signed-off-by: Felix Huettner <email address hidden>
    Reviewed-by: Eric Dumazet <email address hidden>
    Reviewed-by: Simon Horman <email address hidden>
    Signed-off-by: Jakub Kicinski <email address hidden>

* How to test
After configuring QoS on BF-3:
Disable all priorities
Set priorities [0, 0, 0, 0, 0, 0, 0, 0]
Remove all policies
Remove all traffic classes
Add policy (policy_name=ND_traffic, traffic_type=RDMA, priority=5, port=20000, dscp=None)
Add policy (policy_name=TCP_traffic, traffic_type=TCP, priority=4, port=26000, dscp=None)
Add traffic class two prio TC with prio_list=[5, 4], min_bw=76, algorithm=ETS
Enable QOS on adapter SLOT 5 Port 1
Restart driver (detach VFs -> restart with devcon -> attach VFs)

BF-3 sometimes stops responding. need to run it multiple times!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.