History

RDMA/IWPM: refactor the IWPM message attribute names

In order to add new IWPM_NL attributes, the enums for the IWPM commands attributes are refactored such that a new attribute can be added without breaking ABI version 3. Instead of sharing nl attribute enums for both request and response messages, we create separate enums for each IWPM message request and reply. This allows us to extend any given IWPM message by adding new attributes for just that message. These new enums are created, though, in a way to avoid breaking ABI version 3.

Steve Wise committed 7 years ago

Commit f76903d1 parent 95b8e382 files · +41 −20Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/rdma/rdma_netlink.h+18−3
@@ -83,13 +83,20 @@ enum { · 82 unmodified lines
8383 IWPM_NLA_MANAGE_MAPPING_UNSPEC = 0,
8484 IWPM_NLA_MANAGE_MAPPING_SEQ,
8585 IWPM_NLA_MANAGE_ADDR,
86− IWPM_NLA_MANAGE_MAPPED_LOC_ADDR,
86+ IWPM_NLA_MANAGE_MAPPING_MAX
87+};
88+
89+enum {
90+ IWPM_NLA_RMANAGE_MAPPING_UNSPEC = 0,
91+ IWPM_NLA_RMANAGE_MAPPING_SEQ,
92+ IWPM_NLA_RMANAGE_ADDR,
93+ IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR,
94+ /* The following maintains bisectability of rdma-core */
95+ IWPM_NLA_MANAGE_MAPPED_LOC_ADDR = IWPM_NLA_RMANAGE_MAPPED_LOC_ADDR,
8796 IWPM_NLA_RMANAGE_MAPPING_ERR,
8897 IWPM_NLA_RMANAGE_MAPPING_MAX
8998 };
9099
91−#define IWPM_NLA_MANAGE_MAPPING_MAX 3
92−#define IWPM_NLA_QUERY_MAPPING_MAX 4
93100 #define IWPM_NLA_MAPINFO_SEND_MAX 3
94101
95102 enum {
@@ -97,6 +104,14 @@ enum { · 1 unmodified line
97104 IWPM_NLA_QUERY_MAPPING_SEQ,
98105 IWPM_NLA_QUERY_LOCAL_ADDR,
99106 IWPM_NLA_QUERY_REMOTE_ADDR,
107+ IWPM_NLA_QUERY_MAPPING_MAX,
108+};
109+
110+enum {
111+ IWPM_NLA_RQUERY_MAPPING_UNSPEC = 0,
112+ IWPM_NLA_RQUERY_MAPPING_SEQ,
113+ IWPM_NLA_RQUERY_LOCAL_ADDR,
114+ IWPM_NLA_RQUERY_REMOTE_ADDR,
100115 IWPM_NLA_RQUERY_MAPPED_LOC_ADDR,
101116 IWPM_NLA_RQUERY_MAPPED_REM_ADDR,
102117 IWPM_NLA_RQUERY_MAPPING_ERR,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t