OSDN Git Service

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)
commit6ef4889fc0b3aa6ab928e7565935ac6f762cee6e
tree1f72a34e7582403b181ac15865dbb2a282991005
parentb723748750ece7d844cdf2f52c01d37f83387208
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: 22a677661f56 ("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