mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 11:11:26 +02:00
RDMA/bnxt_re: Add data structures for RoCE mirror support
Added data structures required for supporting mirroring on RoCE device. Signed-off-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com> Reviewed-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/20250822040801.776196-3-kalesh-anakkur.purayil@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
217156bb70
commit
8f47f12db5
|
|
@ -172,6 +172,7 @@ struct bnxt_re_dev {
|
|||
struct list_head list;
|
||||
unsigned long flags;
|
||||
#define BNXT_RE_FLAG_NETDEV_REGISTERED 0
|
||||
#define BNXT_RE_FLAG_STATS_CTX3_ALLOC 1
|
||||
#define BNXT_RE_FLAG_HAVE_L2_REF 3
|
||||
#define BNXT_RE_FLAG_RCFW_CHANNEL_EN 4
|
||||
#define BNXT_RE_FLAG_QOS_WORK_REG 5
|
||||
|
|
@ -227,6 +228,10 @@ struct bnxt_re_dev {
|
|||
struct workqueue_struct *dcb_wq;
|
||||
struct dentry *cc_config;
|
||||
struct bnxt_re_dbg_cc_config_params *cc_config_params;
|
||||
/* RoCE mirror */
|
||||
u16 mirror_vnic_id;
|
||||
union ib_gid ugid;
|
||||
u32 ugid_index;
|
||||
};
|
||||
|
||||
#define to_bnxt_re_dev(ptr, member) \
|
||||
|
|
|
|||
|
|
@ -164,6 +164,11 @@ struct bnxt_re_user_mmap_entry {
|
|||
u8 mmap_flag;
|
||||
};
|
||||
|
||||
struct bnxt_re_flow {
|
||||
struct ib_flow ib_flow;
|
||||
struct bnxt_re_dev *rdev;
|
||||
};
|
||||
|
||||
static inline u16 bnxt_re_get_swqe_size(int nsge)
|
||||
{
|
||||
return sizeof(struct sq_send_hdr) + nsge * sizeof(struct sq_sge);
|
||||
|
|
|
|||
|
|
@ -345,6 +345,7 @@ struct bnxt_qplib_qp {
|
|||
u32 msn_tbl_sz;
|
||||
bool is_host_msn_tbl;
|
||||
u8 tos_dscp;
|
||||
u32 ugid_index;
|
||||
};
|
||||
|
||||
#define BNXT_RE_MAX_MSG_SIZE 0x80000000
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ struct bnxt_qplib_rcfw {
|
|||
atomic_t timeout_send;
|
||||
/* cached from chip cctx for quick reference in slow path */
|
||||
u16 max_timeout;
|
||||
bool roce_mirror;
|
||||
};
|
||||
|
||||
struct bnxt_qplib_cmdqmsg {
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ struct bnxt_qplib_drv_modes {
|
|||
bool db_push;
|
||||
bool dbr_pacing;
|
||||
u32 toggle_bits;
|
||||
u8 roce_mirror;
|
||||
};
|
||||
|
||||
enum bnxt_re_toggle_modes {
|
||||
|
|
@ -582,6 +583,11 @@ static inline u8 bnxt_qplib_dbr_pacing_en(struct bnxt_qplib_chip_ctx *cctx)
|
|||
return cctx->modes.dbr_pacing;
|
||||
}
|
||||
|
||||
static inline u8 bnxt_qplib_roce_mirror_supported(struct bnxt_qplib_chip_ctx *cctx)
|
||||
{
|
||||
return cctx->modes.roce_mirror;
|
||||
}
|
||||
|
||||
static inline bool _is_alloc_mr_unified(u16 dev_cap_flags)
|
||||
{
|
||||
return dev_cap_flags & CREQ_QUERY_FUNC_RESP_SB_MR_REGISTER_ALLOC;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user