diff options
author | Selvin Xavier <selvin.xavier@broadcom.com> | 2018-01-11 19:52:07 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-01-17 17:56:17 +0300 |
commit | ccd9d0d3dffcd783a1a626337146b79f4c4ee53d (patch) | |
tree | c66fe0f589c47c2be9cd927538f4763203a0ab76 /drivers/infiniband/hw/bnxt_re/bnxt_re.h | |
parent | f20d429511affab6a2a9129f46042f43e6ffe396 (diff) | |
download | linux-ccd9d0d3dffcd783a1a626337146b79f4c4ee53d.tar.xz |
RDMA/bnxt_re: Enable RoCE on virtual functions
RoCE can be used by virtual functions (VFs) as well. Adding
code changes to allow resource reservation, initialization
and avail the resources to the RDMA applications running on
those VFs.
Currently, fifty percent of the total available resources
are reserved for PF and remaining are equally divided among
active VFs.
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/bnxt_re/bnxt_re.h')
-rw-r--r-- | drivers/infiniband/hw/bnxt_re/bnxt_re.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/bnxt_re.h b/drivers/infiniband/hw/bnxt_re/bnxt_re.h index ecbac91b2e14..b604277ed0dd 100644 --- a/drivers/infiniband/hw/bnxt_re/bnxt_re.h +++ b/drivers/infiniband/hw/bnxt_re/bnxt_re.h @@ -57,6 +57,19 @@ #define BNXT_RE_MAX_MRW_COUNT (64 * 1024) #define BNXT_RE_MAX_SRQC_COUNT (64 * 1024) #define BNXT_RE_MAX_CQ_COUNT (64 * 1024) +#define BNXT_RE_MAX_MRW_COUNT_64K (64 * 1024) +#define BNXT_RE_MAX_MRW_COUNT_256K (256 * 1024) + +/* Number of MRs to reserve for PF, leaving remainder for VFs */ +#define BNXT_RE_RESVD_MR_FOR_PF (32 * 1024) +#define BNXT_RE_MAX_GID_PER_VF 128 + +/* + * Percentage of resources of each type reserved for PF. + * Remaining resources are divided equally among VFs. + * [0, 100] + */ +#define BNXT_RE_PCT_RSVD_FOR_PF 50 #define BNXT_RE_UD_QP_HW_STALL 0x400000 @@ -145,6 +158,8 @@ struct bnxt_re_dev { struct bnxt_re_ah *sqp_ah; struct bnxt_re_sqp_entries sqp_tbl[1024]; atomic_t nq_alloc_cnt; + u32 is_virtfn; + u32 num_vfs; }; #define to_bnxt_re_dev(ptr, member) \ |