]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'mlxsw-Add-support-for-non-equal-cost-multi-path'
authorDavid S. Miller <davem@davemloft.net>
Mon, 23 Oct 2017 04:23:07 +0000 (05:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Oct 2017 04:23:07 +0000 (05:23 +0100)
commitaa3be976d73b5acdd4fed3becfe4c2ae87d9826c
tree5167d1dd8df3d461cc7e0d1f5e9717b9eb765e0b
parent351b56e39b31720a5f6e4dd3bb4885dc8660cb1c
parent74f7b3fa5cce18cd354fe3e7b7a890d3ecdd52a7
Merge branch 'mlxsw-Add-support-for-non-equal-cost-multi-path'

Jiri Pirko says:

====================
mlxsw: Add support for non-equal-cost multi-path

Ido says:

In the device, nexthops are stored as adjacency entries in an array
called the KVD linear (KVDL). When a multi-path route is hit the
packet's headers are hashed and then converted to an index into KVDL
based on the adjacency group's size and base index.

Up until now the driver ignored the `weight` parameter for multi-path
routes and allocated only one adjacency entry for each nexthop with a
limit of 32 nexthops in a group. This set makes the driver take the
`weight` parameter into account when allocating adjacency entries.

First patch teaches dpipe to show the size of the adjacency group, so
that users will be able to determine the actual weight of each nexthop.
The second patch refactors the KVDL allocator, making it more receptive
towards the addition of another partition later in the set.

Patches 3-5 introduce small changes towards the actual change in the
sixth patch that populates the adjacency entries according to their
relative weight.

Last two patches finally add another partition to the KVDL, which allows
us to allocate more than 32 entries per-group and thus support more
nexthops and also provide higher accuracy with regards to the requested
weights.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>