developer | dd38653 | 2022-07-26 17:14:47 +0800 | [diff] [blame] | 1 | diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h |
| 2 | index 1b3c2b6..00bbbf8 100644 |
| 3 | --- a/include/uapi/linux/if_bridge.h |
| 4 | +++ b/include/uapi/linux/if_bridge.h |
| 5 | @@ -130,6 +130,7 @@ enum { |
| 6 | #define BRIDGE_VLAN_INFO_RANGE_BEGIN (1<<3) /* VLAN is start of vlan range */ |
| 7 | #define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */ |
| 8 | #define BRIDGE_VLAN_INFO_BRENTRY (1<<5) /* Global bridge VLAN entry */ |
| 9 | +#define BRIDGE_VLAN_INFO_ONLY_OPTS (1<<6) /* Skip create/delete/flags */ |
| 10 | |
| 11 | struct bridge_vlan_info { |
| 12 | __u16 flags; |
| 13 | @@ -156,6 +157,112 @@ struct bridge_vlan_xstats { |
| 14 | __u32 pad2; |
| 15 | }; |
| 16 | |
| 17 | +/* Bridge vlan RTM header */ |
| 18 | +struct br_vlan_msg { |
| 19 | + __u8 family; |
| 20 | + __u8 reserved1; |
| 21 | + __u16 reserved2; |
| 22 | + __u32 ifindex; |
| 23 | +}; |
| 24 | + |
| 25 | +enum { |
| 26 | + BRIDGE_VLANDB_DUMP_UNSPEC, |
| 27 | + BRIDGE_VLANDB_DUMP_FLAGS, |
| 28 | + __BRIDGE_VLANDB_DUMP_MAX, |
| 29 | +}; |
| 30 | +#define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1) |
| 31 | + |
| 32 | +/* flags used in BRIDGE_VLANDB_DUMP_FLAGS attribute to affect dumps */ |
| 33 | +#define BRIDGE_VLANDB_DUMPF_STATS (1 << 0) /* Include stats in the dump */ |
| 34 | +#define BRIDGE_VLANDB_DUMPF_GLOBAL (1 << 1) /* Dump global vlan options only */ |
| 35 | + |
| 36 | +/* Bridge vlan RTM attributes |
| 37 | + * [BRIDGE_VLANDB_ENTRY] = { |
| 38 | + * [BRIDGE_VLANDB_ENTRY_INFO] |
| 39 | + * ... |
| 40 | + * } |
| 41 | + * [BRIDGE_VLANDB_GLOBAL_OPTIONS] = { |
| 42 | + * [BRIDGE_VLANDB_GOPTS_ID] |
| 43 | + * ... |
| 44 | + * } |
| 45 | + */ |
| 46 | +enum { |
| 47 | + BRIDGE_VLANDB_UNSPEC, |
| 48 | + BRIDGE_VLANDB_ENTRY, |
| 49 | + BRIDGE_VLANDB_GLOBAL_OPTIONS, |
| 50 | + __BRIDGE_VLANDB_MAX, |
| 51 | +}; |
| 52 | +#define BRIDGE_VLANDB_MAX (__BRIDGE_VLANDB_MAX - 1) |
| 53 | + |
| 54 | +enum { |
| 55 | + BRIDGE_VLANDB_ENTRY_UNSPEC, |
| 56 | + BRIDGE_VLANDB_ENTRY_INFO, |
| 57 | + BRIDGE_VLANDB_ENTRY_RANGE, |
| 58 | + BRIDGE_VLANDB_ENTRY_STATE, |
| 59 | + BRIDGE_VLANDB_ENTRY_TUNNEL_INFO, |
| 60 | + BRIDGE_VLANDB_ENTRY_STATS, |
| 61 | + BRIDGE_VLANDB_ENTRY_MCAST_ROUTER, |
| 62 | + __BRIDGE_VLANDB_ENTRY_MAX, |
| 63 | +}; |
| 64 | +#define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1) |
| 65 | + |
| 66 | +/* [BRIDGE_VLANDB_ENTRY] = { |
| 67 | + * [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = { |
| 68 | + * [BRIDGE_VLANDB_TINFO_ID] |
| 69 | + * ... |
| 70 | + * } |
| 71 | + * } |
| 72 | + */ |
| 73 | +enum { |
| 74 | + BRIDGE_VLANDB_TINFO_UNSPEC, |
| 75 | + BRIDGE_VLANDB_TINFO_ID, |
| 76 | + BRIDGE_VLANDB_TINFO_CMD, |
| 77 | + __BRIDGE_VLANDB_TINFO_MAX, |
| 78 | +}; |
| 79 | +#define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1) |
| 80 | + |
| 81 | +/* [BRIDGE_VLANDB_ENTRY] = { |
| 82 | + * [BRIDGE_VLANDB_ENTRY_STATS] = { |
| 83 | + * [BRIDGE_VLANDB_STATS_RX_BYTES] |
| 84 | + * ... |
| 85 | + * } |
| 86 | + * ... |
| 87 | + * } |
| 88 | + */ |
| 89 | +enum { |
| 90 | + BRIDGE_VLANDB_STATS_UNSPEC, |
| 91 | + BRIDGE_VLANDB_STATS_RX_BYTES, |
| 92 | + BRIDGE_VLANDB_STATS_RX_PACKETS, |
| 93 | + BRIDGE_VLANDB_STATS_TX_BYTES, |
| 94 | + BRIDGE_VLANDB_STATS_TX_PACKETS, |
| 95 | + BRIDGE_VLANDB_STATS_PAD, |
| 96 | + __BRIDGE_VLANDB_STATS_MAX, |
| 97 | +}; |
| 98 | +#define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1) |
| 99 | + |
| 100 | +enum { |
| 101 | + BRIDGE_VLANDB_GOPTS_UNSPEC, |
| 102 | + BRIDGE_VLANDB_GOPTS_ID, |
| 103 | + BRIDGE_VLANDB_GOPTS_RANGE, |
| 104 | + BRIDGE_VLANDB_GOPTS_MCAST_SNOOPING, |
| 105 | + BRIDGE_VLANDB_GOPTS_MCAST_IGMP_VERSION, |
| 106 | + BRIDGE_VLANDB_GOPTS_MCAST_MLD_VERSION, |
| 107 | + BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_CNT, |
| 108 | + BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_CNT, |
| 109 | + BRIDGE_VLANDB_GOPTS_MCAST_LAST_MEMBER_INTVL, |
| 110 | + BRIDGE_VLANDB_GOPTS_PAD, |
| 111 | + BRIDGE_VLANDB_GOPTS_MCAST_MEMBERSHIP_INTVL, |
| 112 | + BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_INTVL, |
| 113 | + BRIDGE_VLANDB_GOPTS_MCAST_QUERY_INTVL, |
| 114 | + BRIDGE_VLANDB_GOPTS_MCAST_QUERY_RESPONSE_INTVL, |
| 115 | + BRIDGE_VLANDB_GOPTS_MCAST_STARTUP_QUERY_INTVL, |
| 116 | + BRIDGE_VLANDB_GOPTS_MCAST_QUERIER, |
| 117 | + BRIDGE_VLANDB_GOPTS_MCAST_ROUTER_PORTS, |
| 118 | + BRIDGE_VLANDB_GOPTS_MCAST_QUERIER_STATE, |
| 119 | + __BRIDGE_VLANDB_GOPTS_MAX |
| 120 | +}; |
| 121 | +#define BRIDGE_VLANDB_GOPTS_MAX (__BRIDGE_VLANDB_GOPTS_MAX - 1) |
| 122 | + |
| 123 | /* Bridge multicast database attributes |
| 124 | * [MDBA_MDB] = { |
| 125 | * [MDBA_MDB_ENTRY] = { |
| 126 | diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h |
| 127 | index a6aa466..6abd5a1 100644 |
| 128 | --- a/include/uapi/linux/pkt_cls.h |
| 129 | +++ b/include/uapi/linux/pkt_cls.h |
| 130 | @@ -16,9 +16,37 @@ enum { |
| 131 | TCA_ACT_STATS, |
| 132 | TCA_ACT_PAD, |
| 133 | TCA_ACT_COOKIE, |
| 134 | + TCA_ACT_FLAGS, |
| 135 | + TCA_ACT_HW_STATS, |
| 136 | + TCA_ACT_USED_HW_STATS, |
| 137 | __TCA_ACT_MAX |
| 138 | }; |
| 139 | |
| 140 | +/* See other TCA_ACT_FLAGS_ * flags in include/net/act_api.h. */ |
| 141 | +#define TCA_ACT_FLAGS_NO_PERCPU_STATS 1 /* Don't use percpu allocator for |
| 142 | + * actions stats. |
| 143 | + */ |
| 144 | + |
| 145 | +/* tca HW stats type |
| 146 | + * When user does not pass the attribute, he does not care. |
| 147 | + * It is the same as if he would pass the attribute with |
| 148 | + * all supported bits set. |
| 149 | + * In case no bits are set, user is not interested in getting any HW statistics. |
| 150 | + */ |
| 151 | +#define TCA_ACT_HW_STATS_IMMEDIATE (1 << 0) /* Means that in dump, user |
| 152 | + * gets the current HW stats |
| 153 | + * state from the device |
| 154 | + * queried at the dump time. |
| 155 | + */ |
| 156 | +#define TCA_ACT_HW_STATS_DELAYED (1 << 1) /* Means that in dump, user gets |
| 157 | + * HW stats that might be out of date |
| 158 | + * for some time, maybe couple of |
| 159 | + * seconds. This is the case when |
| 160 | + * driver polls stats updates |
| 161 | + * periodically or when it gets async |
| 162 | + * stats update from the device. |
| 163 | + */ |
| 164 | + |
| 165 | #define TCA_ACT_MAX __TCA_ACT_MAX |
| 166 | #define TCA_OLD_COMPAT (TCA_ACT_MAX+1) |
| 167 | #define TCA_ACT_MAX_PRIO 32 |
| 168 | diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h |
| 169 | index 96eca6e..ff43cb9 100644 |
| 170 | --- a/include/uapi/linux/rtnetlink.h |
| 171 | +++ b/include/uapi/linux/rtnetlink.h |
| 172 | @@ -164,6 +164,13 @@ enum { |
| 173 | RTM_GETNEXTHOP, |
| 174 | #define RTM_GETNEXTHOP RTM_GETNEXTHOP |
| 175 | |
| 176 | + RTM_NEWVLAN = 112, |
| 177 | +#define RTM_NEWNVLAN RTM_NEWVLAN |
| 178 | + RTM_DELVLAN, |
| 179 | +#define RTM_DELVLAN RTM_DELVLAN |
| 180 | + RTM_GETVLAN, |
| 181 | +#define RTM_GETVLAN RTM_GETVLAN |
| 182 | + |
| 183 | __RTM_MAX, |
| 184 | #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) |
| 185 | }; |
| 186 | @@ -717,6 +724,8 @@ enum rtnetlink_groups { |
| 187 | #define RTNLGRP_IPV6_MROUTE_R RTNLGRP_IPV6_MROUTE_R |
| 188 | RTNLGRP_NEXTHOP, |
| 189 | #define RTNLGRP_NEXTHOP RTNLGRP_NEXTHOP |
| 190 | + RTNLGRP_BRVLAN, |
| 191 | +#define RTNLGRP_BRVLAN RTNLGRP_BRVLAN |
| 192 | __RTNLGRP_MAX |
| 193 | }; |
| 194 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) |