Bug 1950393

Summary: [DPDK-20.11] SRIOV testpmd failed to come up when Host in running under 8.2 Z
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Jean-Tsung Hsiao <jhsiao>
Component: DPDKAssignee: Flavio Leitner <fleitner>
DPDK sub component: sriov QA Contact: Jean-Tsung Hsiao <jhsiao>
Status: NEW --- Docs Contact:
Severity: high    
Priority: high CC: brault, ctrautma, jhsiao, linville, rkhan, tredaelli
Version: RHEL 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jean-Tsung Hsiao 2021-04-16 14:11:37 UTC
Description of problem: [DPDK-20.11] SRIOV testpmd failed to come up when Host in running under 8.2 Z

[root@localhost ~]# sh dpdk-testpmd-1q-2pmd.sh
EAL: Detected 5 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-2048kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL:   Invalid NUMA socket, default to 0
EAL:   using IOMMU type 8 (No-IOMMU)
EAL: Probe PCI driver: net_iavf (8086:1889) device: 0000:00:03.0 (socket 0)
EAL:   Invalid NUMA socket, default to 0
EAL: Probe PCI driver: net_iavf (8086:1889) device: 0000:00:09.0 (socket 0)
EAL: No legacy callbacks, legacy socket not created
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_0>: n=179456, size=2176, socket=0
testpmd: preferred mempool ops selected: ring_mp_mc
Configuring Port 0 (socket 0)
iavf_init_rss(): RSS is enabled by PF by default
iavf_configure_queues(): RXDID[1] is not supported, request default RXDID[1] in Queue[0]

Port 0: link state change event

Port 0: link state change event
iavf_execute_vf_cmd(): No response or return failure (-64) for cmd 14
iavf_config_promisc(): fail to execute command CONFIG_PROMISCUOUS_MODE
Failed to disable promiscuous mode for device (port 0): Resource temporarily unavailable
Error during restoring configuration for device (port 0): Resource temporarily unavailable
Fail to start port 0
Configuring Port 1 (socket 0)
iavf_init_rss(): RSS is enabled by PF by default
iavf_configure_queues(): RXDID[1] is not supported, request default RXDID[1] in Queue[0]

Port 1: link state change event

Port 1: link state change event
iavf_execute_vf_cmd(): No response or return failure (-64) for cmd 14
iavf_config_promisc(): fail to execute command CONFIG_PROMISCUOUS_MODE
Failed to disable promiscuous mode for device (port 1): Resource temporarily unavailable
Error during restoring configuration for device (port 1): Resource temporarily unavailable
Fail to start port 1
Please stop the ports first
Done
iavf_execute_vf_cmd(): No response or return failure (-64) for cmd 14
iavf_config_promisc(): fail to execute command CONFIG_PROMISCUOUS_MODE
Error during enabling promiscuous mode for port 0: Resource temporarily unavailable - ignore
iavf_execute_vf_cmd(): No response or return failure (-64) for cmd 14
iavf_config_promisc(): fail to execute command CONFIG_PROMISCUOUS_MODE
Error during enabling promiscuous mode for port 1: Resource temporarily unavailable - ignore
testpmd> quit

Stopping port 0...
Stopping ports...
Done

Stopping port 1...
Stopping ports...
Done

Shutting down port 0...
Closing ports...
Port 0 is closed
Done

Shutting down port 1...
Closing ports...
Port 1 is closed
Done

Bye...
[root@localhost ~]# rpm -q dpdk
dpdk-20.11-3.el8.x86_64
[root@localhost ~]# uname -r
4.18.0-283.el8.dt3.x86_64
[root@localhost ~]# 

*** Host ***
[root@wsfd-advnetlab10 images]# uname -r
4.18.0-193.19.1.el8_2.x86_64
[root@wsfd-advnetlab10 images]#

Version-Release number of selected component (if applicable):


How reproducible: reproducible


Steps to Reproduce:
1. See the description above
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jean-Tsung Hsiao 2021-04-16 14:16:39 UTC
NOTE: When Host ran under 8.4 the same SRIOV guest came up successfully.

Comment 2 Timothy Redaelli 2021-04-22 14:41:27 UTC
Hi,

I checked the logs and dmesg and it seems the problem is that RHEL 8.2 kernels doesn't have, at least, the following commit:

commit 39b06fd4b56087d96f1f5559995e56c1038021b2
Author: Jonathan Toppins <jtoppins>
Date:   Thu Jun 11 18:55:50 2020 -0400

    [netdrv] ice: Add VF promiscuous support
    
    Message-id: <e75f8848065a0f86804dadb6f5f5e0c99f4b95cc.1591891905.git.jtoppins>
    Patchwork-id: 320024
    Patchwork-instance: patchwork
    O-Subject: [PATCH RHEL-8.3 03/17] ice: Add VF promiscuous support
    Bugzilla: 1781405
    RH-Acked-by: Jarod Wilson <jarod>
    RH-Acked-by: Tony Camuso <tcamuso>
    RH-Acked-by: Ivan Vecera <ivecera>
    RH-Acked-by: John Linville <linville>
    
    Implement promiscuous support for VF VSIs. Behaviour of promiscuous support
    is based on VF trust as well as the, introduced, vf-true-promisc flag.
    
    A trusted VF with vf-true-promisc disabled will be the default VSI, which
    means that all traffic without a matching destination MAC address in the
    device's internal switch will be forwarded to this VF VSI.
    
    A trusted VF with vf-true-promisc enabled will go into "true promiscuous
    mode". This amounts to the VF receiving all ingress and egress traffic
    that hits the device's internal switch.
    
    An untrusted VF will only receive traffic destined for that VF.
    
    The vf-true-promisc-support flag cannot be toggled while any VF is in
    promiscuous mode. This flag should be set prior to loading the iavf driver
    or spawning VF(s).
    
    Signed-off-by: Brett Creeley <brett.creeley>
    Tested-by: Andrew Bowers <andrewx.bowers>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher>
    (cherry picked from commit 01b5e89aab498dad5a38d04a71beca2b562d9449)
    Bugzilla: 1781405
    Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=29271836
    Tested: build only, provided to partner for testing
    Signed-off-by: Jonathan Toppins <jtoppins>
    Signed-off-by: Frantisek Hrbata <fhrbata>


I also tried to build DPDK 20.11 (that is used on the guest via SR-IOV) on RHEL 8.2 buildroot (instead of 8.4), to be sure it's not an #ifdef that may be disabled at build-time and it fails in the same way since DPDK tries to use VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE that was added in 39b06fd4b560 ("[netdrv] ice: Add VF promiscuous support").

Jonathan (as maintainer of kernel ice module) do you agree? what can we do?

Thank you

Comment 4 Jonathan Toppins 2021-04-23 05:16:37 UTC
(In reply to Timothy Redaelli from comment #2)
> I also tried to build DPDK 20.11 (that is used on the guest via SR-IOV) on
> RHEL 8.2 buildroot (instead of 8.4), to be sure it's not an #ifdef that may
> be disabled at build-time and it fails in the same way since DPDK tries to
> use VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE that was added in 39b06fd4b560
> ("[netdrv] ice: Add VF promiscuous support").
> 
> Jonathan (as maintainer of kernel ice module) do you agree? what can we do?

That is correct this was not available in the RHEL-8.2 time frame. This patch was part of a larger series (see bug bz1781405) and more work would need to be done to make sure only this patch is needed and not additional patches from the series.

I also am not sure this falls into the category of a bug fix, for z-stream purposes, in the kernel as this was specifically a feature enhancement that we did in RHEL-8.3. For DPDK to work is this feature specifically required? Do we expect to support a VM running RHEL-8.4 on top of a RHEL-8.2 bare metal kernel that never supported the feature?