-/* Device attributes used in mlx5 PMD */
-struct mlx5_dev_attr {
- uint64_t device_cap_flags_ex;
- int max_qp_wr;
- int max_sge;
- int max_cq;
- int max_qp;
- int max_cqe;
- uint32_t max_pd;
- uint32_t max_mr;
- uint32_t max_srq;
- uint32_t max_srq_wr;
- uint32_t raw_packet_caps;
- uint32_t max_rwq_indirection_table_size;
- uint32_t max_tso;
- uint32_t tso_supported_qpts;
- uint64_t flags;
- uint64_t comp_mask;
- uint32_t sw_parsing_offloads;
- uint32_t min_single_stride_log_num_of_bytes;
- uint32_t max_single_stride_log_num_of_bytes;
- uint32_t min_single_wqe_log_num_of_strides;
- uint32_t max_single_wqe_log_num_of_strides;
- uint32_t stride_supported_qpts;
- uint32_t tunnel_offloads_caps;
- char fw_ver[64];
+/* Device capabilities structure which isn't changed in any stage. */
+struct mlx5_dev_cap {
+ int max_cq; /* Maximum number of supported CQs */
+ int max_qp; /* Maximum number of supported QPs. */
+ int max_qp_wr; /* Maximum number of outstanding WR on any WQ. */
+ int max_sge;
+ /* Maximum number of s/g per WR for SQ & RQ of QP for non RDMA Read
+ * operations.
+ */
+ int mps; /* Multi-packet send supported mode. */
+ uint32_t vf:1; /* This is a VF. */
+ uint32_t sf:1; /* This is a SF. */
+ uint32_t txpp_en:1; /* Tx packet pacing is supported. */
+ uint32_t mpls_en:1; /* MPLS over GRE/UDP is supported. */
+ uint32_t cqe_comp:1; /* CQE compression is supported. */
+ uint32_t hw_csum:1; /* Checksum offload is supported. */
+ uint32_t hw_padding:1; /* End alignment padding is supported. */
+ uint32_t dest_tir:1; /* Whether advanced DR API is available. */
+ uint32_t dv_esw_en:1; /* E-Switch DV flow is supported. */
+ uint32_t dv_flow_en:1; /* DV flow is supported. */
+ uint32_t swp:3; /* Tx generic tunnel checksum and TSO offload. */
+ uint32_t hw_vlan_strip:1; /* VLAN stripping is supported. */
+ uint32_t scatter_fcs_w_decap_disable:1;
+ /* HW has bug working with tunnel packet decap and scatter FCS. */
+ uint32_t hw_fcs_strip:1; /* FCS stripping is supported. */
+ uint32_t rt_timestamp:1; /* Realtime timestamp format. */
+ uint32_t lro_supported:1; /* Whether LRO is supported. */
+ uint32_t rq_delay_drop_en:1; /* Enable RxQ delay drop. */
+ uint32_t tunnel_en:3;
+ /* Whether tunnel stateless offloads are supported. */
+ uint32_t ind_table_max_size;
+ /* Maximum receive WQ indirection table size. */
+ uint32_t tso:1; /* Whether TSO is supported. */
+ uint32_t tso_max_payload_sz; /* Maximum TCP payload for TSO. */
+ struct {
+ uint32_t enabled:1; /* Whether MPRQ is enabled. */
+ uint32_t log_min_stride_size; /* Log min size of a stride. */
+ uint32_t log_max_stride_size; /* Log max size of a stride. */
+ uint32_t log_min_stride_num; /* Log min num of strides. */
+ uint32_t log_max_stride_num; /* Log max num of strides. */
+ uint32_t log_min_stride_wqe_size;
+ /* Log min WQE size, (size of single stride)*(num of strides).*/
+ } mprq; /* Capability for Multi-Packet RQ. */
+ char fw_ver[64]; /* Firmware version of this device. */