Bug 1637437

Summary: Add support for hardware specific counters to TC actions
Product: Red Hat Enterprise Linux 7 Reporter: Eelco Chaudron <echaudro>
Component: iprouteAssignee: Andrea Claudi <aclaudi>
Status: CLOSED ERRATA QA Contact: Li Shuang <shuali>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.7CC: aclaudi, atragler, jiji, qe-baseos-security, rkhan, shuali
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: iproute-4.11.0-30.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1637440 (view as bug list) Environment:
Last Closed: 2020-09-29 20:28:24 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:
Bug Depends On: 1636891    
Bug Blocks:    
Attachments:
Description Flags
iproute-4.11.0-25.el7_7.2.x86_64.log
none
iproute-4.11.0-27.el7.x86_64.log
none
iproute-4.11.0-28.el7.x86_64.log
none
iproute-4.11.0-30.el7.x86_64.log none

Description Eelco Chaudron 2018-10-09 09:27:54 UTC
We need to include the following commit in our iproute package to support the new HW specific TC flower counters:

commit 5ac138324e31c75edc65c69cedcf699fb624c113
Author: Eelco Chaudron <echaudro>
Date:   Tue Oct 2 03:27:18 2018 -0400

    tc_util: Add support for showing TCA_STATS_BASIC_HW statistics
    
    Add support for showing hardware specific counters to easy
    troubleshooting hardware offload.
    
    $ tc -s filter show dev enp3s0np0 parent ffff:
    filter protocol ip pref 1 flower chain 0
    filter protocol ip pref 1 flower chain 0 handle 0x1
      eth_type ipv4
      dst_ip 2.0.0.0
      src_ip 1.0.0.0
      ip_flags nofrag
      in_hw
            action order 1: mirred (Egress Redirect to device eth1) stolen
            index 1 ref 1 bind 1 installed 0 sec used 0 sec
            Action statistics:
            Sent 534884742 bytes 8915697 pkt (dropped 0, overlimits 0 requeues 0)
            Sent software 187542 bytes 4077 pkt
            Sent hardware 534697200 bytes 8911620 pkt
            backlog 0b 0p requeues 0
            cookie 89173e6a44447001becfd486bda17e29
    
    Signed-off-by: Eelco Chaudron <echaudro>
    Signed-off-by: David Ahern <dsahern>

This BZ is dependant on https://bugzilla.redhat.com/show_bug.cgi?id=1636891

Comment 2 Andrea Claudi 2019-06-06 14:01:34 UTC
Since this issue is not critical, I'm moving it to RHEL-7.8.

Comment 3 Andrea Claudi 2019-12-05 16:26:26 UTC
This is already fixed in rhel-8. Eelco, do you need this in rhel-7, too?

Comment 4 Eelco Chaudron 2019-12-06 08:07:42 UTC
As most OSP installations are still on RHEL7 I think we still need this in 7.

Comment 5 Andrea Claudi 2019-12-06 16:19:51 UTC
Thanks Eelco. Moving this to rhel-7.9.

Comment 6 Li Shuang 2019-12-11 02:59:27 UTC
Hi,

Could you help to give some test advice? I have tested 'Bug 1636891 - Add hardware specific counters to TC actions' with upstream iproute before, and doing it again with iproute rpm provides by RHEL is enough for this BZ?

Thanks,
Shuang

Comment 7 Eelco Chaudron 2019-12-12 01:57:20 UTC
(In reply to Li Shuang from comment #6)
> Hi,
> 
> Could you help to give some test advice? I have tested 'Bug 1636891 - Add
> hardware specific counters to TC actions' with upstream iproute before, and
> doing it again with iproute rpm provides by RHEL is enough for this BZ?

Hi Shuang,

Yes just testing the same with the rhel RPM should be enough

Comment 13 Li Shuang 2020-05-18 05:07:27 UTC
Created attachment 1689511 [details]
iproute-4.11.0-25.el7_7.2.x86_64.log

Comment 14 Li Shuang 2020-05-18 05:07:46 UTC
Created attachment 1689512 [details]
iproute-4.11.0-27.el7.x86_64.log

Comment 15 Li Shuang 2020-05-18 05:10:27 UTC
Reproduced with iproute-4.11.0-25.el7_7.2.x86_64:
[01:00:53][switch]$ tc -s filter show dev eth0 ingress
filter protocol arp pref 1 flower chain 0 
filter protocol arp pref 1 flower chain 0 handle 0x1 
  eth_type arp
  in_hw
	action order 1: mirred (Egress Redirect to device eth1) stolen
 	index 1 ref 1 bind 1 installed 10 sec used 1 sec
 	Action statistics:
	Sent 60 bytes 1 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

filter protocol arp pref 2 flower chain 0 
filter protocol arp pref 2 flower chain 0 handle 0x1 
  eth_type arp
  in_hw
	action order 1: mirred (Egress Redirect to device eth1) stolen
 	index 3 ref 1 bind 1 installed 9 sec used 9 sec
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

filter protocol ip pref 3 flower chain 0 
filter protocol ip pref 3 flower chain 0 handle 0x1 
  eth_type ipv4
  skip_sw
  in_hw
	action order 1: mirred (Egress Redirect to device eth1) stolen
 	index 5 ref 1 bind 1 installed 8 sec used 6 sec
 	Action statistics:
	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

[01:00:54][switch]$ tc -s filter show dev eth1 ingress
filter protocol arp pref 1 flower chain 0 
filter protocol arp pref 1 flower chain 0 handle 0x1 
  eth_type arp
  in_hw
	action order 1: mirred (Egress Redirect to device eth0) stolen
 	index 2 ref 1 bind 1 installed 10 sec used 1 sec
 	Action statistics:
	Sent 60 bytes 1 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

filter protocol arp pref 2 flower chain 0 
filter protocol arp pref 2 flower chain 0 handle 0x1 
  eth_type arp
  in_hw
	action order 1: mirred (Egress Redirect to device eth0) stolen
 	index 4 ref 1 bind 1 installed 9 sec used 9 sec
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

filter protocol ip pref 3 flower chain 0 
filter protocol ip pref 3 flower chain 0 handle 0x1 
  eth_type ipv4
  skip_sw
  in_hw
	action order 1: mirred (Egress Redirect to device eth0) stolen
 	index 6 ref 1 bind 1 installed 8 sec used 6 sec
 	Action statistics:
	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 


Verified with iproute-4.11.0-27.el7.x86_64:
[01:04:46][switch]$ tc -s filter show dev eth0 ingress
filter protocol arp pref 1 flower chain 0 
filter protocol arp pref 1 flower chain 0 handle 0x1 
  eth_type arp
  in_hw
	action order 1: mirred (Egress Redirect to device eth1) stolen
 	index 1 ref 1 bind 1 installed 10 sec used 1 sec
 	Action statistics:
	Sent 60 bytes 1 pkt (dropped 0, overlimits 0 requeues 0) 	Sent software 0 bytes 0 pkt	Sent hardware 60 bytes 1 pkt
	backlog 0b 0p requeues 0 

filter protocol arp pref 2 flower chain 0 
filter protocol arp pref 2 flower chain 0 handle 0x1 
  eth_type arp
  in_hw
	action order 1: mirred (Egress Redirect to device eth1) stolen
 	index 3 ref 1 bind 1 installed 9 sec used 9 sec
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

filter protocol ip pref 3 flower chain 0 
filter protocol ip pref 3 flower chain 0 handle 0x1 
  eth_type ipv4
  skip_sw
  in_hw
	action order 1: mirred (Egress Redirect to device eth1) stolen
 	index 5 ref 1 bind 1 installed 8 sec used 6 sec
 	Action statistics:
	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 	Sent software 0 bytes 0 pkt	Sent hardware 294 bytes 3 pkt
	backlog 0b 0p requeues 0 

[01:04:46][switch]$ tc -s filter show dev eth1 ingress
filter protocol arp pref 1 flower chain 0 
filter protocol arp pref 1 flower chain 0 handle 0x1 
  eth_type arp
  in_hw
	action order 1: mirred (Egress Redirect to device eth0) stolen
 	index 2 ref 1 bind 1 installed 10 sec used 1 sec
 	Action statistics:
	Sent 60 bytes 1 pkt (dropped 0, overlimits 0 requeues 0) 	Sent software 0 bytes 0 pkt	Sent hardware 60 bytes 1 pkt
	backlog 0b 0p requeues 0 

filter protocol arp pref 2 flower chain 0 
filter protocol arp pref 2 flower chain 0 handle 0x1 
  eth_type arp
  in_hw
	action order 1: mirred (Egress Redirect to device eth0) stolen
 	index 4 ref 1 bind 1 installed 9 sec used 9 sec
 	Action statistics:
	Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
	backlog 0b 0p requeues 0 

filter protocol ip pref 3 flower chain 0 
filter protocol ip pref 3 flower chain 0 handle 0x1 
  eth_type ipv4
  skip_sw
  in_hw
	action order 1: mirred (Egress Redirect to device eth0) stolen
 	index 6 ref 1 bind 1 installed 8 sec used 6 sec
 	Action statistics:
	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 	Sent software 0 bytes 0 pkt	Sent hardware 294 bytes 3 pkt
	backlog 0b 0p requeues 0

Comment 16 Li Shuang 2020-05-18 05:13:19 UTC
(In reply to Li Shuang from comment #15)
> Verified with iproute-4.11.0-27.el7.x86_64:
> [01:04:46][switch]$ tc -s filter show dev eth0 ingress
...
> filter protocol ip pref 3 flower chain 0 
> filter protocol ip pref 3 flower chain 0 handle 0x1 
>   eth_type ipv4
>   skip_sw
>   in_hw
> 	action order 1: mirred (Egress Redirect to device eth1) stolen
>  	index 5 ref 1 bind 1 installed 8 sec used 6 sec
>  	Action statistics:
> 	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 	Sent software 0
> bytes 0 pkt	Sent hardware 294 bytes 3 pkt
> 	backlog 0b 0p requeues 0 
> 
> [01:04:46][switch]$ tc -s filter show dev eth1 ingress
...
> filter protocol ip pref 3 flower chain 0 
> filter protocol ip pref 3 flower chain 0 handle 0x1 
>   eth_type ipv4
>   skip_sw
>   in_hw
> 	action order 1: mirred (Egress Redirect to device eth0) stolen
>  	index 6 ref 1 bind 1 installed 8 sec used 6 sec
>  	Action statistics:
> 	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 	Sent software 0
> bytes 0 pkt	Sent hardware 294 bytes 3 pkt
> 	backlog 0b 0p requeues 0

Hi  Andrea,

I noticed that the hardware specific counters was added but it seems not the expected format (all of three counters are in the same line), do you think it's okay?

Thanks,
Shuang

Comment 17 Li Shuang 2020-06-02 02:19:14 UTC
Since the output format of tc filter show (Comment#15) is not the expected one (Comment#0), so mark it as Failed QA.

Comment 18 Andrea Claudi 2020-06-08 13:52:56 UTC
Output misses two newlines, fixed in iproute-4.11.0-30.el8.

Comment 20 Li Shuang 2020-06-10 12:03:53 UTC
Created attachment 1696478 [details]
iproute-4.11.0-28.el7.x86_64.log

Comment 21 Li Shuang 2020-06-10 12:04:15 UTC
Created attachment 1696479 [details]
iproute-4.11.0-30.el7.x86_64.log

Comment 22 Li Shuang 2020-06-10 12:07:41 UTC
Reproduced with iproute-4.11.0-28.el7.x86_64:
[04:52:53][switch]$ tc -s filter show dev eth7 ingress
...
filter protocol ip pref 3 flower chain 0 
filter protocol ip pref 3 flower chain 0 handle 0x1 
  eth_type ipv4
  skip_sw
  in_hw
	action order 1: mirred (Egress Redirect to device eth8) stolen
 	index 5 ref 1 bind 1 installed 7 sec used 5 sec
 	Action statistics:
	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 	Sent software 0 bytes 0 pkt	Sent hardware 294 bytes 3 pkt
	backlog 0b 0p requeues 0 

[04:52:53][switch]$ tc -s filter show dev eth8 ingress
...
filter protocol ip pref 3 flower chain 0 
filter protocol ip pref 3 flower chain 0 handle 0x1 
  eth_type ipv4
  skip_sw
  in_hw
	action order 1: mirred (Egress Redirect to device eth7) stolen
 	index 6 ref 1 bind 1 installed 7 sec used 5 sec
 	Action statistics:
	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 	Sent software 0 bytes 0 pkt	Sent hardware 294 bytes 3 pkt
	backlog 0b 0p requeues 0 


Verified with iproute-4.11.0-30.el7.x86_64:
[05:01:22][switch]$ tc -s filter show dev eth7 ingress
...
filter protocol ip pref 3 flower chain 0 
filter protocol ip pref 3 flower chain 0 handle 0x1 
  eth_type ipv4
  skip_sw
  in_hw
	action order 1: mirred (Egress Redirect to device eth8) stolen
 	index 5 ref 1 bind 1 installed 7 sec used 5 sec
 	Action statistics:
	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 
	Sent software 0 bytes 0 pkt
	Sent hardware 294 bytes 3 pkt
	backlog 0b 0p requeues 0 

[05:01:22][switch]$ tc -s filter show dev eth8 ingress
...
filter protocol ip pref 3 flower chain 0 
filter protocol ip pref 3 flower chain 0 handle 0x1 
  eth_type ipv4
  skip_sw
  in_hw
	action order 1: mirred (Egress Redirect to device eth7) stolen
 	index 6 ref 1 bind 1 installed 7 sec used 5 sec
 	Action statistics:
	Sent 294 bytes 3 pkt (dropped 0, overlimits 0 requeues 0) 
	Sent software 0 bytes 0 pkt
	Sent hardware 294 bytes 3 pkt
	backlog 0b 0p requeues 0 

So set it to Verified.

Comment 24 errata-xmlrpc 2020-09-29 20:28:24 UTC
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 (iproute bug fix and enhancement update), 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-2020:3999