Skip to content

[aclshow] restore PRIO column and sort entries by priority#476

Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom
romankachur-mlnx:aclshow3
Mar 11, 2019
Merged

[aclshow] restore PRIO column and sort entries by priority#476
liat-grozovik merged 1 commit intosonic-net:masterfrom
romankachur-mlnx:aclshow3

Conversation

@romankachur-mlnx
Copy link
Copy Markdown
Contributor

Signed-off-by: Roman Kachur romankac@mellanox.com

- What I did
I reverted PRIO column to aclshow output.
Set sorting of rules to 'first by Table then by Priority',
before it was 'first by Table then by Counter'.
- How I did it
Added PRIO column to aclshow, changes sorting.
- How to verify it
Load acl rules and run aclshow -a
- Previous command output (if the output of a command-line utility has changed)

RULE NAME     TABLE NAME      PACKETS COUNT    BYTES COUNT
------------  ------------  ---------------  -------------
RULE_9        DATAACL                   901            900
RULE_7        DATAACL                   701            700
RULE_4        DATAACL                   401            400
RULE_3        DATAACL                   301            300
RULE_2        DATAACL                   201            200
RULE_1        DATAACL                   101            100
DEFAULT_RULE  DATAACL                     2              1
RULE_05       DATAACL                     0              0
RULE_6        EVERFLOW                  601            600
RULE_08       EVERFLOW                    0              0

- New command output (if the output of a command-line utility has changed)

RULE NAME     TABLE NAME      PRIO    PACKETS COUNT    BYTES COUNT
------------  ------------  ------  ---------------  -------------
RULE_1        DATAACL         9999              101            100
RULE_2        DATAACL         9998              201            200
RULE_3        DATAACL         9997              301            300
RULE_4        DATAACL         9996              401            400
RULE_05       DATAACL         9995                0              0
RULE_7        DATAACL         9993              701            700
RULE_9        DATAACL         9991              901            900
DEFAULT_RULE  DATAACL            1                2              1
RULE_6        EVERFLOW        9994              601            600
RULE_08       EVERFLOW        9992                0              0

-->

Signed-off-by: Roman Kachur <romankac@mellanox.com>
@romankachur-mlnx romankachur-mlnx mentioned this pull request Mar 1, 2019
@jleveque
Copy link
Copy Markdown
Contributor

jleveque commented Mar 1, 2019

If we're doing a primary sort by table name then a secondary sort by priority, does it make more sense to move the table name column to the far left, followed by the priority column, then rule name, etc?


### acl display header
ACL_HEADER = ["RULE NAME", "TABLE NAME", "PACKETS COUNT", "BYTES COUNT"]
ACL_HEADER = ["RULE NAME", "TABLE NAME", "PRIO", "PACKETS COUNT", "BYTES COUNT"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe use the full word, PRIORITY? It's only 4 more chars.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Priority label was "PRIO" long before my changes
#442
This time I just reverted this label, as it was before.

@liat-grozovik liat-grozovik merged commit a7a512f into sonic-net:master Mar 11, 2019
yxieca pushed a commit that referenced this pull request Mar 19, 2019
Signed-off-by: Roman Kachur <romankac@mellanox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants