RDMA/bnxt_re: Refactor net ring allocation function
Introducing a new attribute structure to reduce the long list of arguments passed in bnxt_re_net_ring_alloc() function. The caller of bnxt_re_net_ring_alloc should fill in the list of attributes in bnxt_re_ring_attr structure and then pass the pointer to the function. Link: https://lore.kernel.org/r/1581786665-23705-5-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Naresh Kumar PBS <nareshkumar.pbs@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
0c4dcd6028
commit
b08fe048a6
@@ -89,6 +89,15 @@
|
||||
|
||||
#define BNXT_RE_DEFAULT_ACK_DELAY 16
|
||||
|
||||
struct bnxt_re_ring_attr {
|
||||
dma_addr_t *dma_arr;
|
||||
int pages;
|
||||
int type;
|
||||
u32 depth;
|
||||
u32 lrid; /* Logical ring id */
|
||||
u8 mode;
|
||||
};
|
||||
|
||||
struct bnxt_re_work {
|
||||
struct work_struct work;
|
||||
unsigned long event;
|
||||
|
||||
Reference in New Issue
Block a user