Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance and fix for softnet_data parser #3561

Merged
merged 0 commits into from
Oct 27, 2022

Conversation

remijouannet
Copy link
Contributor

Hello,

enhance and fix for softnet_data parser

  • the offset for cpu_collision, received_rps, flow_limit_count was not correct

torvalds/linux@7d58e65 introduce two new columns, softnet_backlog_len and index

  • the code example in the note was wrong, is_packet_drops is a proprety not a function
  • additional documentation and links about softnet_data structure and history
  • additional unit tests

All Pull Requests:

Check all that apply:

  • [Y] Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • [N] Is this PR to correct an issue?
  • [Y] Is this PR an enhancement?

Complete Description of Additions/Changes:

Add your description here

Copy link
Contributor

@xiangce xiangce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @remijouannet, Thank you very much for contributing to insights-core. Besides the following comments, Could you please also fix the flake8 errors to make the pipeline pass?
Please check the flake8 errors here

Thanks.

insights/parsers/softnet_stat.py Outdated Show resolved Hide resolved
insights/parsers/softnet_stat.py Outdated Show resolved Hide resolved
insights/tests/parsers/test_softnet_stat.py Outdated Show resolved Hide resolved
insights/parsers/softnet_stat.py Outdated Show resolved Hide resolved
insights/parsers/softnet_stat.py Outdated Show resolved Hide resolved
insights/parsers/softnet_stat.py Outdated Show resolved Hide resolved
insights/parsers/softnet_stat.py Outdated Show resolved Hide resolved
insights/parsers/softnet_stat.py Outdated Show resolved Hide resolved
insights/parsers/softnet_stat.py Outdated Show resolved Hide resolved
insights/tests/parsers/test_softnet_stat.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ryan-blakley ryan-blakley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@xiangce xiangce merged commit 88f32d2 into RedHatInsights:master Oct 27, 2022
xiangce pushed a commit that referenced this pull request Oct 27, 2022
* Signed-off-by: remi <[email protected]>

enhance and fix for softnet_data parser
* the offset for cpu_collision, received_rps, flow_limit_count was not
correct
*
torvalds/linux@7d58e65
introduce two new columns, softnet_backlog_len and index
* the code example in the note was wrong, is_packet_drops is a proprety
  not a function
* additional documentation and links about softnet_data structure and
  history
* additional unit tests

* fix flake8 and docstring

Signed-off-by: remi <[email protected]>

* removed linux block of docstring

Signed-off-by: remi <[email protected]>

* fix doc string, deal with 9,10,11,13 columns, show None instead of 0 when
does not exist

Signed-off-by: remi <[email protected]>

* less 0 in softnet_test

Signed-off-by: remi <[email protected]>

* fix E222 error

Signed-off-by: remi <[email protected]>

* add doctest to test_softnet_stat.py

Signed-off-by: remi <[email protected]>
(cherry picked from commit 88f32d2)
@remijouannet remijouannet deleted the fix-softnet branch October 27, 2022 15:09
remijouannet added a commit to remijouannet/procfs that referenced this pull request Nov 4, 2022
…ort for 9,10,11 and 13 columns, unitest has also more case
remijouannet added a commit to remijouannet/procfs that referenced this pull request Nov 7, 2022
…ort for 9,10,11 and 13 columns, unitest has also more case

Signed-off-by: remi <[email protected]>
SuperQ pushed a commit to prometheus/procfs that referenced this pull request Dec 18, 2022
* handle more column from softnet_data
    * add CPUCollision for linux 2.6
    * add ReceivedRps and FlowLimitCount for linux >4.17
    * add SoftnetBacklogLen and Index for linux 5.10 torvalds/linux@7d58e65
    * add Width so anyone can choose to use Index instead of line index, see
    * the commit torvalds/linux@7d58e65
* following the merge of RedHatInsights/insights-core#3561, adding support for 9,10,11 and 13 columns, unitest has also more case

Signed-off-by: remi <[email protected]>
jritter pushed a commit to jritter/procfs that referenced this pull request Jul 15, 2024
* handle more column from softnet_data
    * add CPUCollision for linux 2.6
    * add ReceivedRps and FlowLimitCount for linux >4.17
    * add SoftnetBacklogLen and Index for linux 5.10 torvalds/linux@7d58e65
    * add Width so anyone can choose to use Index instead of line index, see
    * the commit torvalds/linux@7d58e65
* following the merge of RedHatInsights/insights-core#3561, adding support for 9,10,11 and 13 columns, unitest has also more case

Signed-off-by: remi <[email protected]>
xiangce pushed a commit that referenced this pull request Sep 6, 2024
* Signed-off-by: remi <[email protected]>

enhance and fix for softnet_data parser
* the offset for cpu_collision, received_rps, flow_limit_count was not
correct
*
torvalds/linux@7d58e65
introduce two new columns, softnet_backlog_len and index
* the code example in the note was wrong, is_packet_drops is a proprety
  not a function
* additional documentation and links about softnet_data structure and
  history
* additional unit tests

* fix flake8 and docstring

Signed-off-by: remi <[email protected]>

* removed linux block of docstring

Signed-off-by: remi <[email protected]>

* fix doc string, deal with 9,10,11,13 columns, show None instead of 0 when
does not exist

Signed-off-by: remi <[email protected]>

* less 0 in softnet_test

Signed-off-by: remi <[email protected]>

* fix E222 error

Signed-off-by: remi <[email protected]>

* add doctest to test_softnet_stat.py

Signed-off-by: remi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants