]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_acl_tcam: Position vchunk in a vregion list properly
authorJiri Pirko <jiri@mellanox.com>
Mon, 27 Apr 2020 15:05:47 +0000 (18:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 May 2020 03:41:14 +0000 (20:41 -0700)
commitba7039f7da8c54af9407a2233b8ee48f9428f72c
tree1f72a34e7582403b181ac15865dbb2a282991005
parent2732061e4836d73e58acb3feb40904bec109f33c
mlxsw: spectrum_acl_tcam: Position vchunk in a vregion list properly

Vregion helpers to get min and max priority depend on the correct
ordering of vchunks in the vregion list. However, the current code
always adds new chunk to the end of the list, no matter what the
priority is. Fix this by finding the correct place in the list and put
vchunk there.

Fixes: 0c00692446b4 ("mlxsw: spectrum: Introduce ACL core with simple TCAM implementation")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c