1. 19 Sep, 2016 32 commits
  2. 17 Sep, 2016 8 commits
    • David S. Miller's avatar
      Merge branch 'ip_tunnel-collect_md' · fd9527f4
      David S. Miller authored
      Alexei Starovoitov says:
      
      ====================
      ip_tunnel: add collect_md mode to IPv4/IPv6 tunnels
      
      Similar to geneve, vxlan, gre tunnels implement 'collect metadata' mode
      in ipip, ipip6, ip6ip6 tunnels.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd9527f4
    • Alexei Starovoitov's avatar
      samples/bpf: add comprehensive ipip, ipip6, ip6ip6 test · 173ca26e
      Alexei Starovoitov authored
      the test creates 3 namespaces with veth connected via bridge.
      First two namespaces simulate two different hosts with the same
      IPv4 and IPv6 addresses configured on the tunnel interface and they
      communicate with outside world via standard tunnels.
      Third namespace creates collect_md tunnel that is driven by BPF
      program which selects different remote host (either first or
      second namespace) based on tcp dest port number while tcp dst
      ip is the same.
      This scenario is rough approximation of load balancer use case.
      The tests check both traditional tunnel configuration and collect_md mode.
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      173ca26e
    • Alexei Starovoitov's avatar
      samples/bpf: extend test_tunnel_bpf.sh with IPIP test · a1c82704
      Alexei Starovoitov authored
      extend existing tests for vxlan, geneve, gre to include IPIP tunnel.
      It tests both traditional tunnel configuration and
      dynamic via bpf helpers.
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1c82704
    • Alexei Starovoitov's avatar
      ip6_tunnel: add collect_md mode to IPv6 tunnels · 8d79266b
      Alexei Starovoitov authored
      Similar to gre, vxlan, geneve tunnels allow IPIP6 and IP6IP6 tunnels
      to operate in 'collect metadata' mode.
      Unlike ipv4 code here it's possible to reuse ip6_tnl_xmit() function
      for both collect_md and traditional tunnels.
      bpf_skb_[gs]et_tunnel_key() helpers and ovs (in the future) are the users.
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d79266b
    • Alexei Starovoitov's avatar
      ip_tunnel: add collect_md mode to IPIP tunnel · cfc7381b
      Alexei Starovoitov authored
      Similar to gre, vxlan, geneve tunnels allow IPIP tunnels to
      operate in 'collect metadata' mode.
      bpf_skb_[gs]et_tunnel_key() helpers can make use of it right away.
      ovs can use it as well in the future (once appropriate ovs-vport
      abstractions and user apis are added).
      Note that just like in other tunnels we cannot cache the dst,
      since tunnel_info metadata can be different for every packet.
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarThomas Graf <tgraf@suug.ch>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cfc7381b
    • Julia Lawall's avatar
      l2tp: constify net_device_ops structures · eb94737d
      Julia Lawall authored
      Check for net_device_ops structures that are only stored in the netdev_ops
      field of a net_device structure.  This field is declared const, so
      net_device_ops structures that have this property can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct net_device_ops i@p = { ... };
      
      @ok@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.netdev_ops = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct net_device_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct net_device_ops i = { ... };
      // </smpl>
      
      The result of size on this file before the change is:
         text	      data     bss     dec         hex	  filename
         3401        931      44    4376        1118	net/l2tp/l2tp_eth.o
      
      and after the change it is:
         text	     data        bss	    dec	    hex	filename
         3993       347         44       4384    1120	net/l2tp/l2tp_eth.o
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb94737d
    • Julia Lawall's avatar
      dwc_eth_qos: constify net_device_ops structures · 37307504
      Julia Lawall authored
      Check for net_device_ops structures that are only stored in the netdev_ops
      field of a net_device structure.  This field is declared const, so
      net_device_ops structures that have this property can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct net_device_ops i@p = { ... };
      
      @ok@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.netdev_ops = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct net_device_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct net_device_ops i = { ... };
      // </smpl>
      
      The result of size on this file before the change is:
         text	      data     bss     dec         hex	  filename
        21623       1316      40   22979        59c3
         drivers/net/ethernet/synopsys/dwc_eth_qos.o
      
      and after the change it is:
         text	     data        bss	    dec	    hex	filename
        22199       724         40      22963    59b3
         drivers/net/ethernet/synopsys/dwc_eth_qos.o
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37307504
    • Julia Lawall's avatar
      hisilicon: constify net_device_ops structures · 66f58ec4
      Julia Lawall authored
      Check for net_device_ops structures that are only stored in the netdev_ops
      field of a net_device structure.  This field is declared const, so
      net_device_ops structures that have this property can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct net_device_ops i@p = { ... };
      
      @ok@
      identifier r.i;
      struct net_device e;
      position p;
      @@
      e.netdev_ops = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct net_device_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct net_device_ops i = { ... };
      // </smpl>
      
      The result of size on this file before the change is:
      
         text	      data     bss     dec         hex	  filename
         7995	       848       8    8851        2293
         drivers/net/ethernet/hisilicon/hip04_eth.o
      
      and after the change it is:
      
         text	     data        bss	    dec	    hex	filename
         8571	      256          8       8835    2283
         drivers/net/ethernet/hisilicon/hip04_eth.o
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      66f58ec4