]> git.baikalelectronics.ru Git - kernel.git/commit
be2net: use max-TXQs limit too while provisioning VF queue pairs
authorSuresh Reddy <suresh.reddy@broadcom.com>
Mon, 6 Jun 2016 11:22:08 +0000 (07:22 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jun 2016 23:18:19 +0000 (16:18 -0700)
commit8490ab4853235ba65e14e61074202fc5bae2fa5e
tree223b328f8568682b2367a17968a82768dad261fa
parent0e2bc9d1ba7f11d37c8edf98295edda9ab9aac1b
be2net: use max-TXQs limit too while provisioning VF queue pairs

When the PF driver provisions resources for VFs, it currently only looks
at max RSS queues available to calculate the number of VF queue pairs.
This logic breaks when there are less number of TX-queues than RSS-queues.
This patch fixes this problem by using the max-TXQs available in the
PF-pool in the calculations. As a part of this change the
be_calculate_vf_qs() routine is renamed as be_calculate_vf_res() and the
code that calculates limits on other related resources is moved here to
contain all resource calculation code inside one routine.

Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
Signed-off-by: Sathya Perla <sathya.perla@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_cmds.h
drivers/net/ethernet/emulex/benet/be_main.c