History

net: bridge: vlan options: nest the tunnel id into a tunnel info attribute

While discussing the new API, Roopa mentioned that we'll be adding more tunnel attributes and options in the future, so it's better to make it a nested attribute, since this is still in net-next we can easily change it and nest the tunnel id attribute under BRIDGE_VLANDB_ENTRY_TUNNEL_INFO. The new format is: [BRIDGE_VLANDB_ENTRY] [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] [BRIDGE_VLANDB_TINFO_ID] Any new tunnel attributes can be nested under BRIDGE_VLANDB_ENTRY_TUNNEL_INFO.

Nikolay Aleksandrov committed 6 years ago

Commit fa388f21 parent ee9d0cb3 files · +47 −8Browse files

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

Unified · Split

include/uapi/linux/if_bridge.h+15−1
@@ -203,12 +203,26 @@ enum { · 202 unmodified lines
203203 BRIDGE_VLANDB_ENTRY_INFO,
204204 BRIDGE_VLANDB_ENTRY_RANGE,
205205 BRIDGE_VLANDB_ENTRY_STATE,
206− BRIDGE_VLANDB_ENTRY_TUNNEL_ID,
206+ BRIDGE_VLANDB_ENTRY_TUNNEL_INFO,
207207 BRIDGE_VLANDB_ENTRY_STATS,
208208 __BRIDGE_VLANDB_ENTRY_MAX,
209209 };
210210 #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1)
211211
212+/* [BRIDGE_VLANDB_ENTRY] = {
213+ * [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = {
214+ * [BRIDGE_VLANDB_TINFO_ID]
215+ * ...
216+ * }
217+ * }
218+ */
219+enum {
220+ BRIDGE_VLANDB_TINFO_UNSPEC,
221+ BRIDGE_VLANDB_TINFO_ID,
222+ __BRIDGE_VLANDB_TINFO_MAX,
223+};
224+#define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1)
225+
212226 /* [BRIDGE_VLANDB_ENTRY] = {
213227 * [BRIDGE_VLANDB_ENTRY_STATS] = {
214228 * [BRIDGE_VLANDB_STATS_RX_BYTES]