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

[Bug]: fib/test_fib.py::test_fib::test_hash[ipv4] failing due to check_balancing for ip-protocol varying field #16147

Open
arista-nwolfe opened this issue Dec 18, 2024 · 0 comments · May be fixed by #16188

Comments

@arista-nwolfe
Copy link
Contributor

arista-nwolfe commented Dec 18, 2024

Issue Description

The fib/test_fib.py::test_fib::test_hash[ipv4] test checks the ECMP and LAG hashing of 5 different fields:
'src-ip', 'dst-ip', 'src-port', 'dst-port', 'ip-proto'

The ip-proto field is only 8-bits wide so can only have 256 unique values (some of which we need to exclude for special cases).
For this reason even though the test is sending 8000 packets we only end up with ~256 unique packets which are re-sent many times, so if hashing is a little off on these ~256 buckets then we'll get a big deviation from the expected hashing.

The test expects no ECMP or LAG hash to exceed 25% deviation but we see some do:

type         port(s)           exp_cnt        act_cnt        diff(%)
ECMP         [0, 1]                333            268         -19.6%
LAG          0                     134            109        -18.66%
LAG          1                     134            159         18.66%
ECMP         [2, 3]                333            517          55.1%
LAG          2                     258            260          0.58%
LAG          3                     258            257         -0.58%
ECMP         [4, 5]                333            214         -35.8%
LAG          4                     107            131         22.43%
LAG          5                     107             83        -22.43%
ECMP         [6, 7]                333            448          34.4%
LAG          6                     224            192        -14.29%
LAG          7                     224            256         14.29%
ECMP         [8, 9]                333            143     -57.099999999999994%
LAG          8                      71             89         24.48%
LAG          9                      71             54        -24.48%
ECMP         [10, 11]              333            425     27.500000000000004%
LAG          10                    212            193     -9.180000000000001%
LAG          11                    212            232     9.180000000000001%
ECMP         [16, 17]              333            317          -4.9%
LAG          16                    158            156         -1.58%
LAG          17                    158            161          1.58%
ECMP         [13, 14]              333            479          43.7%
LAG          13                    239            257          7.31%
LAG          14                    239            222         -7.31%
ECMP         [12]                  333            225         -32.5%
ECMP         [15]                  333            453          35.9%
ECMP         [18]                  333            106         -68.2%
ECMP         [19]                  333            443          32.9%
ECMP         [20]                  333            256     -23.200000000000003%
ECMP         [21]                  333            485          45.5%
ECMP         [22]                  333            275         -17.5%
ECMP         [23]                  333            423     26.900000000000002%
ECMP         [24]                  333            137         -58.9%
ECMP         [25]                  333            407          22.1%
ECMP         [26]                  333            200         -40.0%
ECMP         [27]                  333            507          52.1%
ECMP         [28]                  333            268         -19.6%
ECMP         [29]                  333            419          25.7%
ECMP         [30]                  333            159     -52.300000000000004%
ECMP         [31]                  333            426     27.800000000000004%

Results you see

ip-proto hashing test goes outside of the 25% deviation threshold on some ports

Results you expected to see

ip-proto might need the threshold relaxed a little due to it's 8-bit entropy limitation.

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant