aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pkt_cls.h
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-11-04 12:50:58 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-04 12:50:58 -0500
commitd94d9fee9fa4e66a0b91640a694b8b10177075b3 (patch)
tree330b2b19e63c92f1fef3d9dbe0733ddeb0109664 /include/linux/pkt_cls.h
parentb8883a65be2d925ea82b14ca0068ce9a6c8bac1f (diff)
net: cleanup include/linux
This cleanup patch puts struct/union/enum opening braces, in first line to ease grep games. struct something { becomes : struct something { Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pkt_cls.h')
-rw-r--r--include/linux/pkt_cls.h84
1 files changed, 28 insertions, 56 deletions
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
index 3c842edff388..7f6ba8658abe 100644
--- a/include/linux/pkt_cls.h
+++ b/include/linux/pkt_cls.h
@@ -75,8 +75,7 @@ bits 9,10,11: redirect counter - redirect TTL. Loop avoidance
75#define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT)) 75#define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT))
76 76
77/* Action attributes */ 77/* Action attributes */
78enum 78enum {
79{
80 TCA_ACT_UNSPEC, 79 TCA_ACT_UNSPEC,
81 TCA_ACT_KIND, 80 TCA_ACT_KIND,
82 TCA_ACT_OPTIONS, 81 TCA_ACT_OPTIONS,
@@ -108,8 +107,7 @@ enum
108#define TC_ACT_JUMP 0x10000000 107#define TC_ACT_JUMP 0x10000000
109 108
110/* Action type identifiers*/ 109/* Action type identifiers*/
111enum 110enum {
112{
113 TCA_ID_UNSPEC=0, 111 TCA_ID_UNSPEC=0,
114 TCA_ID_POLICE=1, 112 TCA_ID_POLICE=1,
115 /* other actions go here */ 113 /* other actions go here */
@@ -118,8 +116,7 @@ enum
118 116
119#define TCA_ID_MAX __TCA_ID_MAX 117#define TCA_ID_MAX __TCA_ID_MAX
120 118
121struct tc_police 119struct tc_police {
122{
123 __u32 index; 120 __u32 index;
124 int action; 121 int action;
125#define TC_POLICE_UNSPEC TC_ACT_UNSPEC 122#define TC_POLICE_UNSPEC TC_ACT_UNSPEC
@@ -138,15 +135,13 @@ struct tc_police
138 __u32 capab; 135 __u32 capab;
139}; 136};
140 137
141struct tcf_t 138struct tcf_t {
142{
143 __u64 install; 139 __u64 install;
144 __u64 lastuse; 140 __u64 lastuse;
145 __u64 expires; 141 __u64 expires;
146}; 142};
147 143
148struct tc_cnt 144struct tc_cnt {
149{
150 int refcnt; 145 int refcnt;
151 int bindcnt; 146 int bindcnt;
152}; 147};
@@ -158,8 +153,7 @@ struct tc_cnt
158 int refcnt; \ 153 int refcnt; \
159 int bindcnt 154 int bindcnt
160 155
161enum 156enum {
162{
163 TCA_POLICE_UNSPEC, 157 TCA_POLICE_UNSPEC,
164 TCA_POLICE_TBF, 158 TCA_POLICE_TBF,
165 TCA_POLICE_RATE, 159 TCA_POLICE_RATE,
@@ -182,8 +176,7 @@ enum
182#define TC_U32_UNSPEC 0 176#define TC_U32_UNSPEC 0
183#define TC_U32_ROOT (0xFFF00000) 177#define TC_U32_ROOT (0xFFF00000)
184 178
185enum 179enum {
186{
187 TCA_U32_UNSPEC, 180 TCA_U32_UNSPEC,
188 TCA_U32_CLASSID, 181 TCA_U32_CLASSID,
189 TCA_U32_HASH, 182 TCA_U32_HASH,
@@ -200,16 +193,14 @@ enum
200 193
201#define TCA_U32_MAX (__TCA_U32_MAX - 1) 194#define TCA_U32_MAX (__TCA_U32_MAX - 1)
202 195
203struct tc_u32_key 196struct tc_u32_key {
204{
205 __be32 mask; 197 __be32 mask;
206 __be32 val; 198 __be32 val;
207 int off; 199 int off;
208 int offmask; 200 int offmask;
209}; 201};
210 202
211struct tc_u32_sel 203struct tc_u32_sel {
212{
213 unsigned char flags; 204 unsigned char flags;
214 unsigned char offshift; 205 unsigned char offshift;
215 unsigned char nkeys; 206 unsigned char nkeys;
@@ -223,15 +214,13 @@ struct tc_u32_sel
223 struct tc_u32_key keys[0]; 214 struct tc_u32_key keys[0];
224}; 215};
225 216
226struct tc_u32_mark 217struct tc_u32_mark {
227{
228 __u32 val; 218 __u32 val;
229 __u32 mask; 219 __u32 mask;
230 __u32 success; 220 __u32 success;
231}; 221};
232 222
233struct tc_u32_pcnt 223struct tc_u32_pcnt {
234{
235 __u64 rcnt; 224 __u64 rcnt;
236 __u64 rhit; 225 __u64 rhit;
237 __u64 kcnts[0]; 226 __u64 kcnts[0];
@@ -249,8 +238,7 @@ struct tc_u32_pcnt
249 238
250/* RSVP filter */ 239/* RSVP filter */
251 240
252enum 241enum {
253{
254 TCA_RSVP_UNSPEC, 242 TCA_RSVP_UNSPEC,
255 TCA_RSVP_CLASSID, 243 TCA_RSVP_CLASSID,
256 TCA_RSVP_DST, 244 TCA_RSVP_DST,
@@ -263,15 +251,13 @@ enum
263 251
264#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 ) 252#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
265 253
266struct tc_rsvp_gpi 254struct tc_rsvp_gpi {
267{
268 __u32 key; 255 __u32 key;
269 __u32 mask; 256 __u32 mask;
270 int offset; 257 int offset;
271}; 258};
272 259
273struct tc_rsvp_pinfo 260struct tc_rsvp_pinfo {
274{
275 struct tc_rsvp_gpi dpi; 261 struct tc_rsvp_gpi dpi;
276 struct tc_rsvp_gpi spi; 262 struct tc_rsvp_gpi spi;
277 __u8 protocol; 263 __u8 protocol;
@@ -282,8 +268,7 @@ struct tc_rsvp_pinfo
282 268
283/* ROUTE filter */ 269/* ROUTE filter */
284 270
285enum 271enum {
286{
287 TCA_ROUTE4_UNSPEC, 272 TCA_ROUTE4_UNSPEC,
288 TCA_ROUTE4_CLASSID, 273 TCA_ROUTE4_CLASSID,
289 TCA_ROUTE4_TO, 274 TCA_ROUTE4_TO,
@@ -299,8 +284,7 @@ enum
299 284
300/* FW filter */ 285/* FW filter */
301 286
302enum 287enum {
303{
304 TCA_FW_UNSPEC, 288 TCA_FW_UNSPEC,
305 TCA_FW_CLASSID, 289 TCA_FW_CLASSID,
306 TCA_FW_POLICE, 290 TCA_FW_POLICE,
@@ -314,8 +298,7 @@ enum
314 298
315/* TC index filter */ 299/* TC index filter */
316 300
317enum 301enum {
318{
319 TCA_TCINDEX_UNSPEC, 302 TCA_TCINDEX_UNSPEC,
320 TCA_TCINDEX_HASH, 303 TCA_TCINDEX_HASH,
321 TCA_TCINDEX_MASK, 304 TCA_TCINDEX_MASK,
@@ -331,8 +314,7 @@ enum
331 314
332/* Flow filter */ 315/* Flow filter */
333 316
334enum 317enum {
335{
336 FLOW_KEY_SRC, 318 FLOW_KEY_SRC,
337 FLOW_KEY_DST, 319 FLOW_KEY_DST,
338 FLOW_KEY_PROTO, 320 FLOW_KEY_PROTO,
@@ -355,14 +337,12 @@ enum
355 337
356#define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1) 338#define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1)
357 339
358enum 340enum {
359{
360 FLOW_MODE_MAP, 341 FLOW_MODE_MAP,
361 FLOW_MODE_HASH, 342 FLOW_MODE_HASH,
362}; 343};
363 344
364enum 345enum {
365{
366 TCA_FLOW_UNSPEC, 346 TCA_FLOW_UNSPEC,
367 TCA_FLOW_KEYS, 347 TCA_FLOW_KEYS,
368 TCA_FLOW_MODE, 348 TCA_FLOW_MODE,
@@ -383,8 +363,7 @@ enum
383 363
384/* Basic filter */ 364/* Basic filter */
385 365
386enum 366enum {
387{
388 TCA_BASIC_UNSPEC, 367 TCA_BASIC_UNSPEC,
389 TCA_BASIC_CLASSID, 368 TCA_BASIC_CLASSID,
390 TCA_BASIC_EMATCHES, 369 TCA_BASIC_EMATCHES,
@@ -398,8 +377,7 @@ enum
398 377
399/* Cgroup classifier */ 378/* Cgroup classifier */
400 379
401enum 380enum {
402{
403 TCA_CGROUP_UNSPEC, 381 TCA_CGROUP_UNSPEC,
404 TCA_CGROUP_ACT, 382 TCA_CGROUP_ACT,
405 TCA_CGROUP_POLICE, 383 TCA_CGROUP_POLICE,
@@ -411,14 +389,12 @@ enum
411 389
412/* Extended Matches */ 390/* Extended Matches */
413 391
414struct tcf_ematch_tree_hdr 392struct tcf_ematch_tree_hdr {
415{
416 __u16 nmatches; 393 __u16 nmatches;
417 __u16 progid; 394 __u16 progid;
418}; 395};
419 396
420enum 397enum {
421{
422 TCA_EMATCH_TREE_UNSPEC, 398 TCA_EMATCH_TREE_UNSPEC,
423 TCA_EMATCH_TREE_HDR, 399 TCA_EMATCH_TREE_HDR,
424 TCA_EMATCH_TREE_LIST, 400 TCA_EMATCH_TREE_LIST,
@@ -426,8 +402,7 @@ enum
426}; 402};
427#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1) 403#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1)
428 404
429struct tcf_ematch_hdr 405struct tcf_ematch_hdr {
430{
431 __u16 matchid; 406 __u16 matchid;
432 __u16 kind; 407 __u16 kind;
433 __u16 flags; 408 __u16 flags;
@@ -457,8 +432,7 @@ struct tcf_ematch_hdr
457#define TCF_EM_REL_MASK 3 432#define TCF_EM_REL_MASK 3
458#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK) 433#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK)
459 434
460enum 435enum {
461{
462 TCF_LAYER_LINK, 436 TCF_LAYER_LINK,
463 TCF_LAYER_NETWORK, 437 TCF_LAYER_NETWORK,
464 TCF_LAYER_TRANSPORT, 438 TCF_LAYER_TRANSPORT,
@@ -479,13 +453,11 @@ enum
479#define TCF_EM_VLAN 6 453#define TCF_EM_VLAN 6
480#define TCF_EM_MAX 6 454#define TCF_EM_MAX 6
481 455
482enum 456enum {
483{
484 TCF_EM_PROG_TC 457 TCF_EM_PROG_TC
485}; 458};
486 459
487enum 460enum {
488{
489 TCF_EM_OPND_EQ, 461 TCF_EM_OPND_EQ,
490 TCF_EM_OPND_GT, 462 TCF_EM_OPND_GT,
491 TCF_EM_OPND_LT 463 TCF_EM_OPND_LT