]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlx4_core: calculate log_num_mtt based on total system memory
authorWei Lin Guay <wei.lin.guay@oracle.com>
Fri, 22 Sep 2017 20:49:52 +0000 (22:49 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 27 Sep 2017 00:40:04 +0000 (17:40 -0700)
commit5566e1f97eae778182115d796ce4107199172aba
treed0bedd63ab791eb1fb6957fd57b7913cd4151097
parentb0dbd314cc1f580668279dd45b754dcd9df6c992
mlx4_core: calculate log_num_mtt based on total system memory

The SR-IOV shared-port mechanism has a limitation that all the resources
and qp contexts are proxied through the PF. In order to reflect the
supported mtt entries, the log_num_mtt must be calculated based on the host
system memory rather than the privileged domain system memory. Thus, this
patch performs a Xen specific call to obtain the total memory during the PF
driver loading and uses that info to determine the size of the mtt table.

Orabug: 26526968

Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Reviewed-by: Avinash Repaka <avinash.repaka@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
drivers/net/ethernet/mellanox/mlx4/main.c