On 3/18/22 6:35 PM, Wenpeng Liang wrote:
+struct erdma_dev {
+ struct ib_device ibdev;
+ struct net_device *netdev;
+ struct pci_dev *pdev;
+ struct notifier_block netdev_nb;
+
+ resource_size_t func_bar_addr;
+ resource_size_t func_bar_len;
+ u8 __iomem *func_bar;
+
+ struct erdma_devattr attrs;
+ /* physical port state (only one port per device) */
+ enum ib_port_state state;
+
+ /* cmdq and aeq use the same msix vector */
+ u32 comm_msix_vector;
+ char comm_irq_name[ERDMA_IRQNAME_SIZE];
+ struct erdma_cmdq cmdq;
+ struct erdma_eq aeq;
+ struct erdma_eq_cb ceqs[31];
Does "31" represent the device capacity of ceq?
Seems like a magic number
Will fix, and it should be
struct erdma_eq_cb ceqs[ERDMA_NUM_MSIX_VEC -1].
Thanks,
Cheng Xu
Thanks,
Wenpeng
+
+ spinlock_t lock;
+ struct erdma_resource_cb res_cb[ERDMA_RES_CNT];
+ struct xarray qp_xa;
+ struct xarray cq_xa;
+