mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
RDMA/core: create struct ib_port_cache
As Jason suggested, we have 4 elements for per port arrays, it's better to have a separate structure to represent them. It simplifies code a bit, ~ 30 lines of code less :) Signed-off-by: Jack Wang <[email protected]> Reviewed-by: Michael Wang <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
dfc0e55506
commit
21d6454a39
2 changed files with 59 additions and 87 deletions
|
|
@ -1775,13 +1775,17 @@ enum ib_mad_result {
|
|||
|
||||
#define IB_DEVICE_NAME_MAX 64
|
||||
|
||||
struct ib_port_cache {
|
||||
struct ib_pkey_cache *pkey;
|
||||
struct ib_gid_table *gid;
|
||||
u8 lmc;
|
||||
enum ib_port_state port_state;
|
||||
};
|
||||
|
||||
struct ib_cache {
|
||||
rwlock_t lock;
|
||||
struct ib_event_handler event_handler;
|
||||
struct ib_pkey_cache **pkey_cache;
|
||||
struct ib_gid_table **gid_cache;
|
||||
u8 *lmc_cache;
|
||||
enum ib_port_state *port_state_cache;
|
||||
struct ib_port_cache *ports;
|
||||
};
|
||||
|
||||
struct ib_dma_mapping_ops {
|
||||
|
|
|
|||
Loading…
Reference in a new issue