Bug 1264149 - [RFE] ip link does not show query_rss state in vf link description
[RFE] ip link does not show query_rss state in vf link description
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute (Show other bugs)
7.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Timothy Redaelli
Jaroslav Aster
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-17 11:44 EDT by Jaroslav Aster
Modified: 2017-08-01 17:32 EDT (History)
7 users (show)

See Also:
Fixed In Version: iproute-3.10.0-75.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 17:32:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jaroslav Aster 2015-09-17 11:44:39 EDT
Description of problem:

ip link does not show query_rss state in vf link description. I do not have any change to figure out what is the state of query_rss on vf.

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

iproute-3.10.0-53.el7

How reproducible:

100%

Steps to Reproduce:

# ip -d link show enp3s0f0
4: enp3s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether 00:1e:67:94:8a:a0 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode none 
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 2 MAC a2:27:12:d3:4c:ac, spoof checking on, link-state auto
    vf 3 MAC ae:ea:c5:a7:9c:95, spoof checking on, link-state auto
    vf 4 MAC d6:42:42:d1:45:98, spoof checking on, link-state auto

# ip -d link show enp3s0f0
4: enp3s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether 00:1e:67:94:8a:a0 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode none 
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 2 MAC a2:27:12:d3:4c:ac, spoof checking on, link-state auto
    vf 3 MAC ae:ea:c5:a7:9c:95, spoof checking on, link-state auto
    vf 4 MAC d6:42:42:d1:45:98, spoof checking on, link-state auto

# ip link set enp3s0f0 vf 0 query_rss off

# ip -d link show enp3s0f0
4: enp3s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether 00:1e:67:94:8a:a0 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode none 
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 2 MAC a2:27:12:d3:4c:ac, spoof checking on, link-state auto
    vf 3 MAC ae:ea:c5:a7:9c:95, spoof checking on, link-state auto
    vf 4 MAC d6:42:42:d1:45:98, spoof checking on, link-state auto

Actual results:

Not see query_rss state.

Expected results:

See query_rss state.

Additional info:
Comment 2 Phil Sutter 2016-06-10 13:19:54 EDT
Patches sent upstream: https://www.mail-archive.com/netdev@vger.kernel.org/msg112491.html
Comment 5 Phil Sutter 2016-09-07 12:30:12 EDT
Upstream still has not accepted my patches - delaying for RHEL7.4 then.
Comment 6 Phil Sutter 2016-12-02 02:49:02 EST
This took forever, but here are the patches to backport:

commit ff9463e048a55d1262869ef6f6897c44c11fe094
Author: Phil Sutter <phil@nwl.cc>
Date:   Tue Nov 8 22:29:11 2016 +0100

    ipaddress: Simplify vf_info parsing
    
    Commit 7b8179c780a1a ("iproute2: Add new command to ip link to
    enable/disable VF spoof check") tried to add support for
    IFLA_VF_SPOOFCHK in a backwards-compatible manner, but aparently overdid
    it: parse_rtattr_nested() handles missing attributes perfectly fine in
    that it will leave the relevant field unassigned so calling code can
    just compare against NULL. There is no need to layback from the previous
    (IFLA_VF_TX_RATE) attribute to the next to check if IFLA_VF_SPOOFCHK is
    present or not. To the contrary, it establishes a potentially incorrect
    assumption of these two attributes directly following each other which
    may not be the case (although up to now, kernel aligns them this way).
    
    This patch cleans up the code to adhere to the common way of checking
    for attribute existence. It has been tested to return correct results
    regardless of whether the kernel exports IFLA_VF_SPOOFCHK or not.
    
    Signed-off-by: Phil Sutter <phil@nwl.cc>
    Reviewed-by: Greg Rose <grose@lightfleet.com>

commit 4fb4a10e120b16c292c215791decccc47dc14604
Author: Phil Sutter <phil@nwl.cc>
Date:   Mon Nov 14 09:29:54 2016 +0100

    ipaddress: Print IFLA_VF_QUERY_RSS_EN setting
    
    Signed-off-by: Phil Sutter <phil@nwl.cc>
Comment 9 Timothy Redaelli 2017-02-09 12:59:15 EST
Backported commits from upstream:

commit ff9463e048a55d1262869ef6f6897c44c11fe094
Author: Phil Sutter <phil@nwl.cc>
Date:   Tue Nov 8 22:29:11 2016 +0100

    ipaddress: Simplify vf_info parsing
    
    Commit 7b8179c780a1a ("iproute2: Add new command to ip link to
    enable/disable VF spoof check") tried to add support for
    IFLA_VF_SPOOFCHK in a backwards-compatible manner, but aparently overdid
    it: parse_rtattr_nested() handles missing attributes perfectly fine in
    that it will leave the relevant field unassigned so calling code can
    just compare against NULL. There is no need to layback from the previous
    (IFLA_VF_TX_RATE) attribute to the next to check if IFLA_VF_SPOOFCHK is
    present or not. To the contrary, it establishes a potentially incorrect
    assumption of these two attributes directly following each other which
    may not be the case (although up to now, kernel aligns them this way).
    
    This patch cleans up the code to adhere to the common way of checking
    for attribute existence. It has been tested to return correct results
    regardless of whether the kernel exports IFLA_VF_SPOOFCHK or not.
    
    Signed-off-by: Phil Sutter <phil@nwl.cc>
    Reviewed-by: Greg Rose <grose@lightfleet.com>

commit 4fb4a10e120b16c292c215791decccc47dc14604
Author: Phil Sutter <phil@nwl.cc>
Date:   Mon Nov 14 09:29:54 2016 +0100

    ipaddress: Print IFLA_VF_QUERY_RSS_EN setting
    
    Signed-off-by: Phil Sutter <phil@nwl.cc>

commit fd4ca03935b13789a3e5f01eeda1395ed6cb3b2a
Author: Julien Fortin <julien@cumulusnetworks.com>
Date:   Fri Dec 16 17:36:05 2016 +0100

    ip: vfinfo: remove code duplication for IFLA_VF_RSS_QUERY_EN
    
    Fixes: 4fb4a10e120b1 ("ipaddress: Print IFLA_VF_QUERY_RSS_EN setting”)
    
    Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
    Acked-by: Phil Sutter <phil@nwl.cc>
Comment 12 errata-xmlrpc 2017-08-01 17:32:13 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2171

Note You need to log in before you can comment on or make changes to this bug.