1. 18 Oct, 2016 15 commits
  2. 17 Oct, 2016 14 commits
  3. 15 Oct, 2016 4 commits
    • Julia Lawall's avatar
      ipvlan: constify l3mdev_ops structure · ab530f63
      Julia Lawall authored
      This l3mdev_ops structure is only stored in the l3mdev_ops field of a
      net_device structure.  This field is declared const, so the l3mdev_ops
      structure can be declared as const also.  Additionally drop the
      __read_mostly annotation.
      
      The semantic patch that adds const is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct l3mdev_ops i@p = { ... };
      
      @ok@
      identifier r.i;
      struct net_device *e;
      position p;
      @@
      e->l3mdev_ops = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct l3mdev_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct l3mdev_ops i = { ... };
      // </smpl>
      
      The effect on the layout of the .o file is shown by the following output
      of the size command, first before then after the transformation:
      
         text    data     bss     dec     hex filename
         7364     466      52    7882    1eca drivers/net/ipvlan/ipvlan_main.o
         7412     434      52    7898    1eda drivers/net/ipvlan/ipvlan_main.o
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab530f63
    • David S. Miller's avatar
      Merge branch 'ila-cached-route' · f9dbd5a3
      David S. Miller authored
      Tom Herbert says:
      
      ====================
      ila: Cache a route in ILA lwt structure
      
      Add a dst_cache to ila_lwt structure. This holds a cached route for the
      translated address. In ila_output we now perform a route lookup after
      translation and if possible (destination in original route is full 128
      bits) we set the dst_cache. Subsequent calls to ila_output can then use
      the cache to avoid the route lookup.
      
      This eliminates the need to set the gateway on ILA routes as previously
      was being done. Now we can do somthing like:
      
      ./ip route add 3333::2000:0:0:2/128 encap ila 2222:0:0:2 \
          csum-mode neutral-map dev eth0  ## No via needed!
      
      Also, add destroy_state to lwt ops. We need this do destroy the
      dst_cache.
      
      - v2
        - Fixed comparisons to fc_dst_len to make comparison against number
          of bits in data structure not bytes.
        - Move destroy_state under build_state (requested by Jiri)
        - Other minor cleanup
      
      Tested:
      
      Running 200 TCP_RR streams:
      
        Baseline, no ILA
      
          1730716 tps
          102/170/313 50/90/99% latencies
          88.11 CPU utilization
      
        Using ILA in both directions
      
          1680428 tps
          105/176/325 50/90/99% latencies
          88.16 CPU utilization
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9dbd5a3
    • Tom Herbert's avatar
      ila: Cache a route to translated address · 79ff2fc3
      Tom Herbert authored
      Add a dst_cache to ila_lwt structure. This holds a cached route for the
      translated address. In ila_output we now perform a route lookup after
      translation and if possible (destination in original route is full 128
      bits) we set the dst_cache. Subsequent calls to ila_output can then use
      the cache to avoid the route lookup.
      
      This eliminates the need to set the gateway on ILA routes as previously
      was being done. Now we can do something like:
      
      ./ip route add 3333::2000:0:0:2/128 encap ila 2222:0:0:2 \
          csum-mode neutral-map dev eth0  ## No via needed!
      Signed-off-by: default avatarTom Herbert <tom@herbertland.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79ff2fc3
    • Tom Herbert's avatar
      lwtunnel: Add destroy state operation · 1104d9ba
      Tom Herbert authored
      Users of lwt tunnels may set up some secondary state in build_state
      function. Add a corresponding destroy_state function to allow users to
      clean up state. This destroy state function is called from lwstate_free.
      Also, we now free lwstate using kfree_rcu so user can assume structure
      is not freed before rcu.
      Acked-by: default avatarRoopa Prabhu <roopa@cumulusnetworks.com>
      Signed-off-by: default avatarTom Herbert <tom@herbertland.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1104d9ba
  4. 14 Oct, 2016 7 commits