Files
Linux/include/linux
Logan Gunthorpe 5f1b1f065c NTB: Introduce functions to calculate multi-port resource index
When using multi-ports each port uses resources (dbs, msgs, mws, etc)
on every other port. Creating a mapping for these resources such that
each port has a corresponding resource on every other port is a bit
tricky.

Introduce the ntb_peer_resource_idx() function for this purpose.
It returns the peer resource number that will correspond with the
local peer index on the remote peer.

Also, introduce ntb_peer_highest_mw_idx() which will use
ntb_peer_resource_idx() but return the MW index starting with the
highest index and working down.

Signed-off-by: Logan Gunthorpe <[email protected]>
Cc: Dave Jiang <[email protected]>
Cc: Allen Hubbe <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
2019-06-13 08:59:58 -04:00
..
…
…
…
…
…
…
…
…
…
…
…
2019-05-02 10:37:55 +09:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-04-15 18:14:01 -04:00
…
…
…
…
…
2019-05-14 19:52:50 -07:00
…
…
…
…
…
2019-04-23 01:50:43 +02:00
…
…
…
2019-04-09 17:05:46 -07:00
…
…
…
2019-05-07 08:39:02 -06:00
…
…
…
…
…
…
2019-04-19 11:26:48 -07:00
…
…
…
…
…
2019-05-09 15:25:13 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-04-22 09:48:12 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-05-01 07:47:37 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-04-08 22:56:14 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-04-19 14:07:40 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-05-14 09:47:51 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-05-07 14:31:03 +02:00
…
…
…
…
…
…
…
…
…
…
…
2019-05-14 19:52:51 -07:00
…
…
…
…
…
2019-05-14 19:52:48 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-05-08 22:14:36 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-05-16 15:51:55 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-04-06 10:48:35 -06:00
…
…
…
…
2019-05-01 08:38:47 -06:00
…
2019-04-30 12:37:51 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-05-15 17:35:54 +01:00
2019-04-09 15:14:49 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…