1. 04 12月, 2009 2 次提交
    • P
      net 02/05: fib_rules: rename ifindex/ifname/FRA_IFNAME to iifindex/iifname/FRA_IIFNAME · 491deb24
      Patrick McHardy 提交于
      commit 229e77eec406ad68662f18e49fda8b5d366768c5
      Author: Patrick McHardy <kaber@trash.net>
      Date:   Thu Dec 3 12:05:23 2009 +0100
      
          net: fib_rules: rename ifindex/ifname/FRA_IFNAME to iifindex/iifname/FRA_IIFNAME
      
          The next patch will add oif classification, rename interface related members
          and attributes to reflect that they're used for iif classification.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      491deb24
    • P
      net 01/05: fib_rules: rearrange struct fib_rule · d2858340
      Patrick McHardy 提交于
      commit b8952893d5d86f69c4e499d191b98c6658f64b0f
      Author: Patrick McHardy <kaber@trash.net>
      Date:   Thu Dec 3 12:05:22 2009 +0100
      
          net: fib_rules: rearrange struct fib_rule
      
          The ifname member is only used to resolve interface names and is not needed
          during rule lookups. The target and ctarget members however are used during
          rule lookups and are currently located in a second cacheline.
      
          Move ifname further to the end to make sure both target and ctarget are
          located in the same cacheline as other members used during rule lookups.
      
          The layout on 64 bit changes from:
      
          struct fib_rule {
          	...
                  u32                        table;                /*    56     4 */
                  u8                         action;               /*    60     1 */
      
                  /* XXX 3 bytes hole, try to pack */
      
                  /* --- cacheline 1 boundary (64 bytes) --- */
                  u32                        target;               /*    64     4 */
      
                  /* XXX 4 bytes hole, try to pack */
      
                  struct fib_rule *          ctarget;              /*    72     8 */
                  struct rcu_head            rcu;                  /*    80    16 */
                  struct net *               fr_net;               /*    96     8 */
          };
      
          to:
      
          struct fib_rule {
          	...
                  u32                        table;                /*    40     4 */
                  u8                         action;               /*    44     1 */
      
                  /* XXX 3 bytes hole, try to pack */
      
                  u32                        target;               /*    48     4 */
      
                  /* XXX 4 bytes hole, try to pack */
      
                  struct fib_rule *          ctarget;              /*    56     8 */
                  /* --- cacheline 1 boundary (64 bytes) --- */
                  char                       ifname[16];           /*    64    16 */
                  struct rcu_head            rcu;                  /*    80    16 */
                  struct net *               fr_net;               /*    96     8 */
      
          };
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d2858340
  2. 04 11月, 2009 1 次提交
  3. 21 5月, 2009 1 次提交
  4. 18 5月, 2009 1 次提交
  5. 06 7月, 2008 1 次提交
  6. 16 4月, 2008 1 次提交
  7. 29 1月, 2008 7 次提交
  8. 11 11月, 2007 1 次提交
  9. 11 10月, 2007 1 次提交
  10. 08 6月, 2007 1 次提交
  11. 26 4月, 2007 4 次提交
  12. 26 3月, 2007 1 次提交
    • T
      [NET]: Fix fib_rules compatibility breakage · e1701c68
      Thomas Graf 提交于
      Based upon a patch from Patrick McHardy.
      
      The fib_rules netlink attribute policy introduced in 2.6.19 broke
      userspace compatibilty. When specifying a rule with "from all"
      or "to all", iproute adds a zero byte long netlink attribute,
      but the policy requires all addresses to have a size equal to
      sizeof(struct in_addr)/sizeof(struct in6_addr), resulting in a
      validation error.
      
      Check attribute length of FRA_SRC/FRA_DST in the generic framework
      by letting the family specific rules implementation provide the
      length of an address. Report an error if address length is non
      zero but no address attribute is provided. Fix actual bug by
      checking address length for non-zero instead of relying on
      availability of attribute.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1701c68
  13. 03 12月, 2006 3 次提交
  14. 23 9月, 2006 2 次提交