Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1542653

Summary: Add mlx_5 dpdk to OVS encounter "net_mlx5: cannot set port 1 MTU to 1500: Permission denied
Product: Red Hat Enterprise Linux 7 Reporter: Jean-Tsung Hsiao <jhsiao>
Component: openvswitchAssignee: Open vSwitch development team <ovs-team>
Status: CLOSED DUPLICATE QA Contact: ovs-qe
Severity: high Docs Contact:
Priority: high    
Version: 7.5CC: atragler, ctrautma, jhsiao, kzhang, moshele, rcain
Target Milestone: rc   
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: 2018-02-07 14:09:56 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 Jean-Tsung Hsiao 2018-02-06 17:58:15 UTC
Description of problem: Add mlx_5 dpdk to OVS encounter "net_mlx5: cannot set port 1 MTU to 1500: Permission denied

NOTE: Selinux was set to Permissive before adding mlx_5 dpdk to OVS. Below is the log. So, This is not a Selinux issue.

2018-02-06T17:36:54.957Z|00001|vlog|INFO|opened log file /var/log/openvswitch/ovs-vswitchd.log
2018-02-06T17:36:54.966Z|00002|ovs_numa|INFO|Discovered 24 CPU cores on NUMA node 0
2018-02-06T17:36:54.966Z|00003|ovs_numa|INFO|Discovered 24 CPU cores on NUMA node 1
2018-02-06T17:36:54.966Z|00004|ovs_numa|INFO|Discovered 2 NUMA nodes and 48 CPU cores
2018-02-06T17:36:54.966Z|00005|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connecting...
2018-02-06T17:36:54.966Z|00006|reconnect|INFO|unix:/var/run/openvswitch/db.sock: connected
2018-02-06T17:36:54.967Z|00007|dpdk|INFO|DPDK Enabled - initializing...
2018-02-06T17:36:54.967Z|00008|dpdk|INFO|No vhost-sock-dir provided - defaulting to /var/run/openvswitch
2018-02-06T17:36:54.967Z|00009|dpdk|INFO|IOMMU support for vhost-user-client disabled.
2018-02-06T17:36:54.967Z|00010|dpdk|INFO|EAL ARGS: ovs-vswitchd -c 0x000000000010 --socket-mem 4096,4096
2018-02-06T17:36:54.971Z|00011|dpdk|INFO|EAL: Detected 48 lcore(s)
2018-02-06T17:36:55.036Z|00012|dpdk|INFO|EAL: Probing VFIO support...
2018-02-06T17:37:01.528Z|00013|dpdk|INFO|EAL: PCI device 0000:04:00.0 on NUMA socket 0
2018-02-06T17:37:01.528Z|00014|dpdk|INFO|EAL:   probe driver: 15b3:1017 net_mlx5
2018-02-06T17:37:01.529Z|00015|dpdk|INFO|PMD: net_mlx5: PCI information matches, using device "mlx5_0" (SR-IOV: false)
2018-02-06T17:37:01.532Z|00016|dpdk|INFO|PMD: net_mlx5: 1 port(s) detected
2018-02-06T17:37:01.536Z|00017|dpdk|INFO|PMD: net_mlx5: Enhanced MPS is enabled
2018-02-06T17:37:01.536Z|00018|dpdk|INFO|PMD: net_mlx5: port 1 MAC address is ec:0d:9a:a0:1d:f4
2018-02-06T17:37:01.537Z|00019|dpdk|INFO|EAL: PCI device 0000:04:00.1 on NUMA socket 0
2018-02-06T17:37:01.537Z|00020|dpdk|INFO|EAL:   probe driver: 15b3:1017 net_mlx5
2018-02-06T17:37:01.538Z|00021|dpdk|INFO|PMD: net_mlx5: PCI information matches, using device "mlx5_1" (SR-IOV: false)
2018-02-06T17:37:01.541Z|00022|dpdk|INFO|PMD: net_mlx5: 1 port(s) detected
2018-02-06T17:37:01.544Z|00023|dpdk|INFO|PMD: net_mlx5: Enhanced MPS is enabled
2018-02-06T17:37:01.545Z|00024|dpdk|INFO|PMD: net_mlx5: port 1 MAC address is ec:0d:9a:a0:1d:f5
2018-02-06T17:37:01.546Z|00025|dpdk|INFO|EAL: PCI device 0000:06:00.0 on NUMA socket 0
2018-02-06T17:37:01.546Z|00026|dpdk|INFO|EAL:   probe driver: 8086:10fb net_ixgbe
2018-02-06T17:37:01.546Z|00027|dpdk|INFO|EAL: PCI device 0000:06:00.1 on NUMA socket 0
2018-02-06T17:37:01.546Z|00028|dpdk|INFO|EAL:   probe driver: 8086:10fb net_ixgbe
2018-02-06T17:37:01.546Z|00029|dpdk|INFO|EAL: PCI device 0000:82:00.0 on NUMA socket 1
2018-02-06T17:37:01.546Z|00030|dpdk|INFO|EAL:   probe driver: 8086:1572 net_i40e
2018-02-06T17:37:01.546Z|00031|dpdk|INFO|EAL: PCI device 0000:82:00.1 on NUMA socket 1
2018-02-06T17:37:01.546Z|00032|dpdk|INFO|EAL:   probe driver: 8086:1572 net_i40e
2018-02-06T17:37:01.549Z|00033|dpdk|INFO|DPDK Enabled - initialized
2018-02-06T17:37:01.552Z|00034|bridge|INFO|ovs-vswitchd (Open vSwitch) 2.9.0
2018-02-06T17:37:01.552Z|00035|timeval|WARN|Unreasonably long 6586ms poll interval (7ms user, 6473ms system)
2018-02-06T17:37:01.552Z|00036|timeval|WARN|faults: 16697 minor, 0 major
2018-02-06T17:37:01.552Z|00037|timeval|WARN|disk: 0 reads, 8 writes
2018-02-06T17:37:01.552Z|00038|timeval|WARN|context switches: 97 voluntary, 11 involuntary
2018-02-06T17:37:01.552Z|00039|coverage|INFO|Event coverage, avg rate over last: 5 seconds, last minute, last hour,  hash=3aee121f:
2018-02-06T17:37:01.552Z|00040|coverage|INFO|bridge_reconfigure         0.2/sec     0.017/sec        0.0003/sec   total: 1
2018-02-06T17:37:01.552Z|00041|coverage|INFO|cmap_expand                1.6/sec     0.133/sec        0.0022/sec   total: 8
2018-02-06T17:37:01.552Z|00042|coverage|INFO|miniflow_malloc            2.2/sec     0.183/sec        0.0031/sec   total: 11
2018-02-06T17:37:01.552Z|00043|coverage|INFO|hmap_pathological          0.2/sec     0.017/sec        0.0003/sec   total: 1
2018-02-06T17:37:01.552Z|00044|coverage|INFO|hmap_expand               76.0/sec     6.333/sec        0.1056/sec   total: 380
2018-02-06T17:37:01.552Z|00045|coverage|INFO|txn_unchanged              0.6/sec     0.050/sec        0.0008/sec   total: 3
2018-02-06T17:37:01.552Z|00046|coverage|INFO|poll_create_node           8.0/sec     0.667/sec        0.0111/sec   total: 40
2018-02-06T17:37:01.552Z|00047|coverage|INFO|seq_change                11.2/sec     0.933/sec        0.0156/sec   total: 56
2018-02-06T17:37:01.552Z|00048|coverage|INFO|pstream_open               0.2/sec     0.017/sec        0.0003/sec   total: 1
2018-02-06T17:37:01.552Z|00049|coverage|INFO|stream_open                0.2/sec     0.017/sec        0.0003/sec   total: 1
2018-02-06T17:37:01.552Z|00050|coverage|INFO|util_xalloc              1474.0/sec   122.833/sec        2.0472/sec   total: 7370
2018-02-06T17:37:01.552Z|00051|coverage|INFO|netdev_get_hwaddr          0.4/sec     0.033/sec        0.0006/sec   total: 2
2018-02-06T17:37:01.552Z|00052|coverage|INFO|netlink_received           0.6/sec     0.050/sec        0.0008/sec   total: 3
2018-02-06T17:37:01.552Z|00053|coverage|INFO|netlink_sent               0.2/sec     0.017/sec        0.0003/sec   total: 1
2018-02-06T17:37:01.552Z|00054|coverage|INFO|90 events never hit
2018-02-06T17:37:06.591Z|00055|poll_loop|INFO|wakeup due to [POLLIN] on fd 11 (<->/var/run/openvswitch/db.sock) at lib/stream-fd.c:157 (55% CPU usage)
2018-02-06T17:37:06.591Z|00056|memory|INFO|44036 kB peak resident set size after 11.6 seconds
2018-02-06T17:37:06.591Z|00057|poll_loop|INFO|wakeup due to [POLLIN] on fd 11 (<->/var/run/openvswitch/db.sock) at lib/stream-fd.c:157 (55% CPU usage)
2018-02-06T17:37:06.598Z|00058|poll_loop|INFO|wakeup due to [POLLIN] on fd 11 (<->/var/run/openvswitch/db.sock) at lib/stream-fd.c:157 (55% CPU usage)
2018-02-06T17:37:06.603Z|00059|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports recirculation
2018-02-06T17:37:06.603Z|00060|ofproto_dpif|INFO|netdev@ovs-netdev: VLAN header stack length probed as 1
2018-02-06T17:37:06.603Z|00061|ofproto_dpif|INFO|netdev@ovs-netdev: MPLS label stack length probed as 3
2018-02-06T17:37:06.603Z|00062|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports truncate action
2018-02-06T17:37:06.603Z|00063|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports unique flow ids
2018-02-06T17:37:06.603Z|00064|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports clone action
2018-02-06T17:37:06.603Z|00065|ofproto_dpif|INFO|netdev@ovs-netdev: Max sample nesting level probed as 10
2018-02-06T17:37:06.603Z|00066|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports eventmask in conntrack action
2018-02-06T17:37:06.603Z|00067|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports ct_state
2018-02-06T17:37:06.603Z|00068|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports ct_zone
2018-02-06T17:37:06.603Z|00069|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports ct_mark
2018-02-06T17:37:06.603Z|00070|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports ct_label
2018-02-06T17:37:06.603Z|00071|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports ct_state_nat
2018-02-06T17:37:06.603Z|00072|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports ct_orig_tuple
2018-02-06T17:37:06.603Z|00073|ofproto_dpif|INFO|netdev@ovs-netdev: Datapath supports ct_orig_tuple6
2018-02-06T17:37:06.756Z|00074|bridge|INFO|bridge ovsbr0: added interface ovsbr0 on port 65534
2018-02-06T17:37:06.771Z|00075|bridge|INFO|bridge ovsbr0: using datapath ID 0000deadbf5dcd48
2018-02-06T17:37:06.771Z|00076|connmgr|INFO|ovsbr0: added service controller "punix:/var/run/openvswitch/ovsbr0.mgmt"
2018-02-06T17:37:06.898Z|00077|poll_loop|INFO|wakeup due to [POLLIN] on fd 10 (NETLINK_ROUTE<->NETLINK_ROUTE) at lib/netlink-socket.c:1331 (55% CPU usage)
2018-02-06T17:37:06.901Z|00078|poll_loop|INFO|wakeup due to [POLLIN] on fd 11 (<->/var/run/openvswitch/db.sock) at lib/stream-fd.c:157 (55% CPU usage)
2018-02-06T17:37:06.901Z|00079|poll_loop|INFO|wakeup due to 0-ms timeout at vswitchd/bridge.c:2898 (55% CPU usage)
2018-02-06T17:37:06.902Z|00080|poll_loop|INFO|wakeup due to [POLLIN] on fd 27 (FIFO pipe:[87888]) at vswitchd/bridge.c:385 (55% CPU usage)
2018-02-06T17:37:06.903Z|00081|poll_loop|INFO|wakeup due to [POLLIN] on fd 27 (FIFO pipe:[87888]) at vswitchd/bridge.c:385 (55% CPU usage)
2018-02-06T17:37:06.905Z|00082|poll_loop|INFO|wakeup due to [POLLIN] on fd 11 (<->/var/run/openvswitch/db.sock) at lib/stream-fd.c:157 (55% CPU usage)
2018-02-06T17:37:06.910Z|00083|dpif_netdev|INFO|PMD thread on numa_id: 0, core id: 46 created.
2018-02-06T17:37:06.914Z|00084|dpif_netdev|INFO|PMD thread on numa_id: 0, core id: 22 created.
2018-02-06T17:37:06.915Z|00085|dpif_netdev|INFO|There are 2 pmd threads on numa node 0
2018-02-06T17:37:06.925Z|00086|dpdk|INFO|PMD: net_mlx5: 0x55b49801fec0: TX queues number update: 0 -> 3
2018-02-06T17:37:06.925Z|00087|dpdk|INFO|PMD: net_mlx5: 0x55b49801fec0: RX queues number update: 0 -> 1
2018-02-06T17:37:06.925Z|00088|dpdk|WARN|PMD: net_mlx5: cannot set port 1 MTU to 1500: Permission denied
2018-02-06T17:37:06.925Z|00089|netdev_dpdk|ERR|Interface dpdk-10 MTU (1500) setup error: Permission denied
2018-02-06T17:37:06.925Z|00090|netdev_dpdk|ERR|Interface dpdk-10(rxq:1 txq:3) configure error: Permission denied
2018-02-06T17:37:06.925Z|00091|dpif_netdev|ERR|Failed to set interface dpdk-10 new configuration
2018-02-06T17:37:06.925Z|00092|bridge|WARN|could not add network device dpdk-10 to ofproto (No such device)
2018-02-06T17:37:06.928Z|00093|poll_loop|INFO|wakeup due to [POLLIN] on fd 11 (<->/var/run/openvswitch/db.sock) at lib/stream-fd.c:157 (55% CPU usage)
2018-02-06T17:37:06.933Z|00094|dpif_netdev|INFO|Core 22 on numa node 0 assigned port 'dpdk-10' rx queue 0 (measured processing cycles 0).
2018-02-06T17:37:06.944Z|00095|bridge|INFO|bridge ovsbr0: added interface dpdk-10 on port 10


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

[root@netqe24 ~]# uname -a
Linux netqe24.knqe.lab.eng.bos.redhat.com 3.10.0-837.el7.x86_64 #1 SMP Tue Jan 23 13:31:59 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@netqe24 ~]# rpm -q openvswitch
openvswitch-2.9.0-0.5.20171212git6625e43.el7fdb.x86_64
[root@netqe24 ~]# rpm -qa | grep selinux
libselinux-2.5-12.el7.x86_64
openstack-selinux-0.8.12-0.20171204232656.7e9ef4a.el7ost.noarch
selinux-policy-targeted-3.13.1-187.el7.noarch
libselinux-utils-2.5-12.el7.x86_64
libselinux-python-2.5-12.el7.x86_64
selinux-policy-3.13.1-187.el7.noarch
container-selinux-2.36-1.gitff95335.el7.noarch
libselinux-devel-2.5-12.el7.x86_64
[root@netqe24 ~]# getenforce
Permissive

How reproducible: reproducible


Steps to Reproduce:
1. Add mlx5 to a OVS dpdk bridge
2. 
3.

Actual results:
2018-02-06T17:37:06.925Z|00088|dpdk|WARN|PMD: net_mlx5: cannot set port 1 MTU to 1500: Permission denied
2018-02-06T17:37:06.925Z|00089|netdev_dpdk|ERR|Interface dpdk-10 MTU (1500) setup error: Permission denied
2018-02-06T17:37:06.925Z|00090|netdev_dpdk|ERR|Interface dpdk-10(rxq:1 txq:3) configure error: Permission denied



Expected results: Should be successful.


Additional info:

Comment 2 Jean-Tsung Hsiao 2018-02-06 19:05:41 UTC
Hi Aaron,

Attached below is the script.

Thanks!

Jean

=============================

{{{### script to add mlx5 dpdk interfaces to OVS dpdk bridge

##/usr/bin/bash

ovs-vsctl set Open_vSwitch . other_config={}
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true
ovs-vsctl --no-wait set Open_vSwitch .
other_config:dpdk-lcore-mask=0x000000000010
ovs-vsctl --no-wait set Open_vSwitch .
other_config:dpdk-socket-mem="4096,4096"
sleep 5
systemctl restart openvswitch
sleep 5

ovs-vsctl --if-exists del-br ovsbr0
ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=0x400000400000
ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
ovs-vsctl add-port ovsbr0 dpdk-10 \
    -- set interface dpdk-10 type=dpdk ofport_request=10
options:dpdk-devargs=mlx5_0
ovs-vsctl add-port ovsbr0 dpdk-11 \
    -- set interface dpdk-11 type=dpdk ofport_request=11
options:dpdk-devargs=mlx5_1

ovs-vsctl --timeout 10 set Interface dpdk-10 options:n_rxq=1
ovs-vsctl --timeout 10 set Interface dpdk-11 options:n_rxq=1

ovs-ofctl del-flows ovsbr0
ovs-ofctl add-flow ovsbr0 in_port=10,actions=output:11
ovs-ofctl add-flow ovsbr0 in_port=11,actions=output:10
ovs-ofctl dump-flows ovsbr0

}}}

Comment 3 Jean-Tsung Hsiao 2018-02-07 14:09:56 UTC
Close this as a duplicate of Bug 1537366.

*** This bug has been marked as a duplicate of bug 1537366 ***