Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 2224248

Summary: create dpdk tap interface failed with myeth1(rxq:1 txq:5 lsc interrupt mode:false) configure error: Operation not permitted
Product: Red Hat Enterprise Linux Fast Datapath Reporter: mhou <mhou>
Component: openvswitchAssignee: Timothy Redaelli <tredaelli>
openvswitch sub component: ovs-dpdk QA Contact: mhou <mhou>
Status: CLOSED EOL Docs Contact:
Severity: high    
Priority: unspecified CC: ctrautma, jhsiao, ktraynor
Version: RHEL 9.0   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-10-08 17:49:14 UTC 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 mhou 2023-07-20 09:18:15 UTC
Description of problem:


Version-Release number of selected component (if applicable):
openvswitch3.1-3.1.0-35.el9fdp.x86_64
openvswitch3.1-3.1.0-33.el9fdp.x86_64

How reproducible: 100%


Steps to Reproduce:
1. create net/tap device
# ovs-vsctl --no-wait set Open_vSwitch . other_config:vhost-iommu-support=true
# ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true

# ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
# ovs-vsctl add-port ovsbr0 myeth1 -- set Interface myeth1 type=dpdk options:dpdk-devargs="net_tap1,iface=myeth1"

ovs-vsctl: Error detected while setting up 'myeth1': could not add network device myeth1 to ofproto (Invalid argument).  See ovs-vswitchd log for details.

2. disable selinux and change user to root then re-run same test
# setenforce 0
# getenforce 
Permissive

# cat /etc/sysconfig/openvswitch 
### Configuration options for openvswitch
#
# Enable core files.
# This option should be set to "yes" or "no".  The default is "yes".
# --force-corefiles=yes
#
# Set "nice" priority at which to run ovsdb-server:
# --ovsdb-server-priority=-10
#
# Set "nice" priority at which to run ovsdb-vswitchd:
# --ovs-vswitchd-priority=-10
#
# Pass or not --mlockall option to ovs-vswitchd.
# This option should be set to "yes" or "no".  The default is "yes".
# Enabling this option can avoid networking interruptions due to
# system memory pressure in extraordinary situations, such as multiple
# concurrent VM import operations.
# --mlockall=yes
#
# Use valgrind:
#   --ovs-vswitchd-wrapper=valgrind
#   --ovsdb-server-wrapper=valgrind
#
# Specify additional options, for example to start with debug logs:
#   --ovs-vswitchd-options='-vconsole:dbg -vfile:dbg'
#   --ovsdb-server-options='-vconsole:dbg -vfile:dbg'
#
OPTIONS=""

# Uncomment and set the OVS User/Group value
#OVS_USER_ID="openvswitch:hugetlbfs"
OVS_USER_ID="root:root"

# systemctl restart openvswitch
# ovs-vsctl del-port myeth1
# ovs-vsctl add-port ovsbr0 myeth1 -- set Interface myeth1 type=dpdk options:dpdk-devargs="net_tap1,iface=myeth1"
ovs-vsctl: Error detected while setting up 'myeth1': could not add network device myeth1 to ofproto (Invalid argument).  See ovs-vswitchd log for details.
ovs-vsctl: The default log directory is "/var/log/openvswitch".

Actual results:
check ovs-vswitchd.log got a loop message as below:
2023-07-20T09:15:55.842Z|01749|dpdk|INFO|Device with port_id=2 already stopped
2023-07-20T09:15:55.852Z|01750|netdev_dpdk|INFO|Device 'net_tap1,iface=myeth1' has been removed and detached
2023-07-20T09:15:55.853Z|01751|netdev_dpdk|INFO|Device 'net_tap1,iface=myeth1' attached to DPDK
2023-07-20T09:15:55.853Z|01752|dpdk|INFO|Device with port_id=2 already stopped
2023-07-20T09:15:55.853Z|01753|dpdk|ERR|tap_dev_configure(): net_tap1: number of rx queues 1 must be equal to number of tx queues 3
2023-07-20T09:15:55.853Z|01754|dpdk|ERR|Port2 dev_configure = -1
2023-07-20T09:15:55.853Z|01755|netdev_dpdk|WARN|Interface myeth1 eth_dev setup error Operation not permitted
2023-07-20T09:15:55.854Z|01756|netdev_dpdk|ERR|Interface myeth1(rxq:1 txq:3 lsc interrupt mode:false) configure error: Operation not permitted
2023-07-20T09:15:55.854Z|01757|dpif_netdev|ERR|Failed to set interface myeth1 new configuration
2023-07-20T09:15:55.854Z|01758|dpdk|INFO|Device with port_id=2 already stopped
2023-07-20T09:15:55.865Z|01759|netdev_dpdk|INFO|Device 'net_tap1,iface=myeth1' has been removed and detached
2023-07-20T09:15:55.867Z|01760|netdev_dpdk|INFO|Device 'net_tap1,iface=myeth1' attached to DPDK
2023-07-20T09:15:55.867Z|01761|dpdk|INFO|Device with port_id=2 already stopped
2023-07-20T09:15:55.868Z|01762|dpdk|ERR|tap_dev_configure(): net_tap1: number of rx queues 1 must be equal to number of tx queues 3
2023-07-20T09:15:55.868Z|01763|dpdk|ERR|Port2 dev_configure = -1
2023-07-20T09:15:55.868Z|01764|netdev_dpdk|WARN|Interface myeth1 eth_dev setup error Operation not permitted
2023-07-20T09:15:55.868Z|01765|netdev_dpdk|ERR|Interface myeth1(rxq:1 txq:3 lsc interrupt mode:false) configure error: Operation not permitted
2023-07-20T09:15:55.868Z|01766|dpif_netdev|ERR|Failed to set interface myeth1 new configuration
2023-07-20T09:15:55.868Z|01767|dpdk|INFO|Device with port_id=2 already stopped
2023-07-20T09:15:55.876Z|01768|netdev_dpdk|INFO|Device 'net_tap1,iface=myeth1' has been removed and detached
2023-07-20T09:15:55.878Z|01769|netdev_dpdk|INFO|Device 'net_tap1,iface=myeth1' attached to DPDK
2023-07-20T09:15:55.878Z|01770|dpdk|INFO|Device with port_id=2 already stopped
2023-07-20T09:15:55.878Z|01771|dpdk|ERR|tap_dev_configure(): net_tap1: number of rx queues 1 must be equal to number of tx queues 3
2023-07-20T09:15:55.878Z|01772|dpdk|ERR|Port2 dev_configure = -1
2023-07-20T09:15:55.878Z|01773|netdev_dpdk|WARN|Interface myeth1 eth_dev setup error Operation not permitted
2023-07-20T09:15:55.878Z|01774|netdev_dpdk|ERR|Interface myeth1(rxq:1 txq:3 lsc interrupt mode:false) configure error: Operation not permitted
2023-07-20T09:15:55.878Z|01775|dpif_netdev|ERR|Failed to set interface myeth1 new configuration
2023-07-20T09:15:55.878Z|01776|dpdk|INFO|Device with port_id=2 already stopped
2023-07-20T09:15:55.888Z|01777|netdev_dpdk|INFO|Device 'net_tap1,iface=myeth1' has been removed and detached
2023-07-20T09:15:55.891Z|01778|netdev_dpdk|INFO|Device 'net_tap1,iface=myeth1' attached to DPDK
2023-07-20T09:15:55.891Z|01779|dpdk|INFO|Device with port_id=2 already stopped
2023-07-20T09:15:55.892Z|01780|dpdk|ERR|tap_dev_configure(): net_tap1: number of rx queues 1 must be equal to number of tx queues 3
2023-07-20T09:15:55.892Z|01781|dpdk|ERR|Port2 dev_configure = -1
2023-07-20T09:15:55.892Z|01782|netdev_dpdk|WARN|Interface myeth1 eth_dev setup error Operation not permitted
2023-07-20T09:15:55.892Z|01783|netdev_dpdk|ERR|Interface myeth1(rxq:1 txq:3 lsc interrupt mode:false) configure error: Operation not permitted
2023-07-20T09:15:55.892Z|01784|dpif_netdev|ERR|Failed to set interface myeth1 new configuration
2023-07-20T09:15:55.892Z|01785|dpdk|INFO|Device with port_id=2 already stopped


Expected results:
net tap device should be created as well

Additional info:

Comment 1 mhou 2023-07-20 09:36:54 UTC
This issue still existed on openvswitch3.1-3.1.0-2. But can't be reproduced on openvswitch2.17-2.17.0-4.el9fdp.x86_64.rpm. Here is a simple reproduced.

# cat tap.sh 
#!/bin/bash
#ovs-vsctl --no-wait set Open_vSwitch . other_config:vhost-iommu-support=true
set -x
ovs-vsctl list bridge 2>/dev/null | grep name | awk '{
	system("ovs-vsctl --if-exist del-br "$3" &>/dev/null")
}'
sleep 1
systemctl stop openvswitch &>/dev/null
sleep 1
rm -rf /etc/openvswitch/*.db
sleep 1
rm -rf /var/lib/openvswitch/*
sleep 1
systemctl restart openvswitch
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true

ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
ovs-vsctl add-port ovsbr0 myeth1 -- set Interface myeth1 type=dpdk options:dpdk-devargs="net_tap1,iface=myeth1"

# sh tap.sh 
+ awk '{
	system("ovs-vsctl --if-exist del-br "$3" &>/dev/null")
}'
+ grep name
+ ovs-vsctl list bridge
+ sleep 1
+ systemctl stop openvswitch
+ sleep 1
+ rm -rf /etc/openvswitch/conf.db
+ sleep 1
+ rm -rf /var/lib/openvswitch/pki
+ sleep 1
+ systemctl restart openvswitch
+ ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
+ ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
+ ovs-vsctl add-port ovsbr0 myeth1 -- set Interface myeth1 type=dpdk options:dpdk-devargs=net_tap1,iface=myeth1
[root@hp-dl388g10-03 ovs_bond_function]# ovs-vsctl show
e2d39037-c1f5-4bc7-bf19-b3a57b5bf5e6
    Bridge ovsbr0
        datapath_type: netdev
        Port myeth1
            Interface myeth1
                type: dpdk
                options: {dpdk-devargs="net_tap1,iface=myeth1"}
        Port ovsbr0
            Interface ovsbr0
                type: internal
    ovs_version: "2.17.1"

Comment 2 mhou 2023-07-20 10:01:51 UTC
Test on openvswitch2.17-2.17.0-94, and It can also work as well.
# sh tap.sh 
+ awk '{
	system("ovs-vsctl --if-exist del-br "$3" &>/dev/null")
}'
+ grep name
+ ovs-vsctl list bridge
+ sleep 1
+ systemctl stop openvswitch
+ sleep 1
+ rm -rf /etc/openvswitch/conf.db
+ sleep 1
+ rm -rf /var/lib/openvswitch/pki
+ sleep 1
+ systemctl restart openvswitch
+ ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
+ ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
+ ovs-vsctl add-port ovsbr0 myeth1 -- set Interface myeth1 type=dpdk options:dpdk-devargs=net_tap1,iface=myeth1
[root@hp-dl388g10-03 ovs_bond_function]# ovs-vsctl show
e2d39037-c1f5-4bc7-bf19-b3a57b5bf5e6
    Bridge ovsbr0
        datapath_type: netdev
        Port myeth1
            Interface myeth1
                type: dpdk
                options: {dpdk-devargs="net_tap1,iface=myeth1"}
        Port ovsbr0
            Interface ovsbr0
                type: internal
    ovs_version: "2.17.1"
[root@hp-dl388g10-03 ovs_bond_function]# sh tap.sh 
+ ovs-vsctl list bridge
+ grep name
+ awk '{
	system("ovs-vsctl --if-exist del-br "$3" &>/dev/null")
}'
+ sleep 1
+ systemctl stop openvswitch
+ sleep 1
+ rm -rf /etc/openvswitch/conf.db
+ sleep 1
+ rm -rf /var/lib/openvswitch/pki
+ sleep 1
+ systemctl restart openvswitch
+ ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
+ ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
+ ovs-vsctl add-port ovsbr0 myeth1 -- set Interface myeth1 type=dpdk options:dpdk-devargs=net_tap1,iface=myeth1

# ovs-vsctl show
d6f3f113-3d41-4f8e-ad3c-5b81fd50ce1a
    Bridge ovsbr0
        datapath_type: netdev
        Port myeth1
            Interface myeth1
                type: dpdk
                options: {dpdk-devargs="net_tap1,iface=myeth1"}
        Port ovsbr0
            Interface ovsbr0
                type: internal
    ovs_version: "2.17.8"

Comment 3 ovs-bot 2024-10-08 17:49:14 UTC
This bug did not meet the criteria for automatic migration and is being closed.
If the issue remains, please open a new ticket in https://issues.redhat.com/browse/FDP