]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_buffers: Remove assumption about pool order
authorIdo Schimmel <idosch@mellanox.com>
Mon, 22 Apr 2019 12:08:50 +0000 (12:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Apr 2019 05:09:32 +0000 (22:09 -0700)
commiteee9c7b1e3897dd8bf7c034d77043eb1636ad5fd
treeff7f99281f33bca561c3ba4e604a05f3654fc71b
parentd32c8d2f64680d68f0af536c4ab918c5c0baf348
mlxsw: spectrum_buffers: Remove assumption about pool order

The code currently assumes that ingress pools have lower indices than
egress pools. This makes it impossible to add more ingress pools
without breaking user configuration that relies on a certain pool index
to correspond to an egress pool.

Remove such assumptions from the code, so that more ingress pools could
be added by subsequent patches.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c