]> Pileus Git - ~andy/linux/blobdiff - include/net/fib_rules.h
fib_rules: reorder struct fib_rules fields
[~andy/linux] / include / net / fib_rules.h
index e361f4882426d26fa8e21dd20e9a6a285c578546..4b2b557fb0e8c2d709e1733a13e4ca3dbc02ff0e 100644 (file)
 
 struct fib_rule {
        struct list_head        list;
-       atomic_t                refcnt;
        int                     iifindex;
        int                     oifindex;
        u32                     mark;
        u32                     mark_mask;
-       u32                     pref;
        u32                     flags;
        u32                     table;
        u8                      action;
+       /* 3 bytes hole, try to use */
        u32                     target;
        struct fib_rule __rcu   *ctarget;
+       struct net              *fr_net;
+
+       atomic_t                refcnt;
+       u32                     pref;
+       int                     suppress_ifgroup;
+       int                     suppress_prefixlen;
        char                    iifname[IFNAMSIZ];
        char                    oifname[IFNAMSIZ];
        struct rcu_head         rcu;
-       struct net *            fr_net;
 };
 
 struct fib_lookup_arg {
@@ -46,6 +50,8 @@ struct fib_rules_ops {
        int                     (*action)(struct fib_rule *,
                                          struct flowi *, int,
                                          struct fib_lookup_arg *);
+       bool                    (*suppress)(struct fib_rule *,
+                                           struct fib_lookup_arg *);
        int                     (*match)(struct fib_rule *,
                                         struct flowi *, int);
        int                     (*configure)(struct fib_rule *,
@@ -80,6 +86,8 @@ struct fib_rules_ops {
        [FRA_FWMARK]    = { .type = NLA_U32 }, \
        [FRA_FWMASK]    = { .type = NLA_U32 }, \
        [FRA_TABLE]     = { .type = NLA_U32 }, \
+       [FRA_SUPPRESS_PREFIXLEN] = { .type = NLA_U32 }, \
+       [FRA_SUPPRESS_IFGROUP] = { .type = NLA_U32 }, \
        [FRA_GOTO]      = { .type = NLA_U32 }
 
 static inline void fib_rule_get(struct fib_rule *rule)