1. 08 Nov, 2009 1 commit
    • Eric W. Biederman's avatar
      net: Support specifying the network namespace upon device creation. · 81adee47
      Eric W. Biederman authored
      
      
      There is no good reason to not support userspace specifying the
      network namespace during device creation, and it makes it easier
      to create a network device and pass it to a child network namespace
      with a well known name.
      
      We have to be careful to ensure that the target network namespace
      for the new device exists through the life of the call.  To keep
      that logic clear I have factored out the network namespace grabbing
      logic into rtnl_link_get_net.
      
      In addtion we need to continue to pass the source network namespace
      to the rtnl_link_ops.newlink method so that we can find the base
      device source network namespace.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@aristanetworks.com>
      Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      81adee47
  2. 30 Oct, 2009 1 commit
  3. 28 Oct, 2009 1 commit
  4. 24 Oct, 2009 1 commit
  5. 05 Oct, 2009 1 commit
    • Eric Dumazet's avatar
      tunnels: Optimize tx path · 0bfbedb1
      Eric Dumazet authored
      
      
      We currently dirty a cache line to update tunnel device stats
      (tx_packets/tx_bytes). We better use the txq->tx_bytes/tx_packets
      counters that already are present in cpu cache, in the cache
      line shared with txq->_xmit_lock
      
      This patch extends IPTUNNEL_XMIT() macro to use txq pointer
      provided by the caller.
      
      Also &tunnel->dev->stats can be replaced by &dev->stats
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0bfbedb1
  6. 24 Sep, 2009 1 commit
  7. 15 Sep, 2009 1 commit
  8. 01 Sep, 2009 1 commit
  9. 14 Aug, 2009 1 commit
  10. 14 Jul, 2009 1 commit
  11. 06 Jul, 2009 1 commit
  12. 03 Jun, 2009 2 commits
  13. 29 May, 2009 1 commit
  14. 25 Feb, 2009 1 commit
  15. 27 Jan, 2009 1 commit
  16. 21 Jan, 2009 1 commit
  17. 24 Nov, 2008 1 commit
    • Alexey Dobriyan's avatar
      net: fix tunnels in netns after ndo_ changes · be77e593
      Alexey Dobriyan authored
      
      
      dev_net_set() should be the very first thing after alloc_netdev().
      
      "ndo_" changes turned simple assignment (which is OK to do before netns
      assignment) into quite non-trivial operation (which is not OK, init_net was
      used). This leads to incomplete initialisation of tunnel device in netns.
      
      BUG: unable to handle kernel NULL pointer dereference at 00000004
      IP: [<c02efdb5>] ip6_tnl_exit_net+0x37/0x4f
      *pde = 00000000 
      Oops: 0000 [#1] PREEMPT DEBUG_PAGEALLOC
      last sysfs file: /sys/class/net/lo/operstate
      
      Pid: 10, comm: netns Not tainted (2.6.28-rc6 #1) 
      EIP: 0060:[<c02efdb5>] EFLAGS: 00010246 CPU: 0
      EIP is at ip6_tnl_exit_net+0x37/0x4f
      EAX: 00000000 EBX: 00000020 ECX: 00000000 EDX: 00000003
      ESI: c5caef30 EDI: c782bbe8 EBP: c7909f50 ESP: c7909f48
       DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      Process netns (pid: 10, ti=c7908000 task=c7905780 task.ti=c7908000)
      Stack:
       c03e75e0 c7390bc8 c7909f60 c0245448 c7390bd8 c7390bf0 c7909fa8 c012577a
       00000000 00000002 00000000 c0125736 c782bbe8 c7909f90 c0308fe3 c782bc04
       c7390bd4 c0245406 c084b718 c04f0770 c03ad785 c782bbe8 c782bc04 c782bc0c
      Call Trace:
       [<c0245448>] ? cleanup_net+0x42/0x82
       [<c012577a>] ? run_workqueue+0xd6/0x1ae
       [<c0125736>] ? run_workqueue+0x92/0x1ae
       [<c0308fe3>] ? schedule+0x275/0x285
       [<c0245406>] ? cleanup_net+0x0/0x82
       [<c0125ae1>] ? worker_thread+0x81/0x8d
       [<c0128344>] ? autoremove_wake_function+0x0/0x33
       [<c0125a60>] ? worker_thread+0x0/0x8d
       [<c012815c>] ? kthread+0x39/0x5e
       [<c0128123>] ? kthread+0x0/0x5e
       [<c0103b9f>] ? kernel_thread_helper+0x7/0x10
      Code: db e8 05 ff ff ff 89 c6 e8 dc 04 f6 ff eb 08 8b 40 04 e8 38 89 f5 ff 8b 44 9e 04 85 c0 75 f0 43 83 fb 20 75 f2 8b 86 84 00 00 00 <8b> 40 04 e8 1c 89 f5 ff e8 98 04 f6 ff 89 f0 e8 f8 63 e6 ff 5b 
      EIP: [<c02efdb5>] ip6_tnl_exit_net+0x37/0x4f SS:ESP 0068:c7909f48
      ---[ end trace 6c2f2328fccd3e0c ]---
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be77e593
  18. 21 Nov, 2008 1 commit
  19. 03 Nov, 2008 1 commit
  20. 11 Oct, 2008 1 commit
  21. 10 Oct, 2008 2 commits
  22. 09 Oct, 2008 5 commits
    • Herbert Xu's avatar
      inet: Make tunnel RX/TX byte counters more consistent · 64194c31
      Herbert Xu authored
      
      
      This patch makes the RX/TX byte counters for IPIP, GRE and SIT more
      consistent.  Previously we included the external IP headers on the
      way out but not when the packet is inbound.
      
      The new scheme is to count payload only in both directions.  For
      IPIP and SIT this simply means the exclusion of the external IP
      header.  For GRE this means that we exclude the GRE header as
      well.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      64194c31
    • Herbert Xu's avatar
      gre: Add Transparent Ethernet Bridging · e1a80002
      Herbert Xu authored
      
      
      This patch adds support for Ethernet over GRE encapsulation.
      This is exposed to user-space with a new link type of "gretap"
      instead of "gre".  It will create an ARPHRD_ETHER device in
      lieu of the usual ARPHRD_IPGRE.
      
      Note that to preserver backwards compatibility all Transparent
      Ethernet Bridging packets are passed to an ARPHRD_IPGRE tunnel
      if its key matches and there is no ARPHRD_ETHER device whose
      key matches more closely.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e1a80002
    • Herbert Xu's avatar
      gre: Add netlink interface · c19e654d
      Herbert Xu authored
      
      
      This patch adds a netlink interface that will eventually displace
      the existing ioctl interface.  It utilises the elegant rtnl_link_ops
      mechanism.
      
      This also means that user-space no longer needs to rely on the
      tunnel interface being of type GRE to identify GRE tunnels.  The
      identification can now occur using rtnl_link_ops.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c19e654d
    • Herbert Xu's avatar
      gre: Move MTU setting out of ipgre_tunnel_bind_dev · 42aa9162
      Herbert Xu authored
      
      
      This patch moves the dev->mtu setting out of ipgre_tunnel_bind_dev.
      This is in prepartion of using rtnl_link where we'll need to make
      the MTU setting conditional on whether the user has supplied an
      MTU.  This also requires the move of the ipgre_tunnel_bind_dev
      call out of the dev->init function so that we can access the user
      parameters later.
      
      This patch also adds a check to prevent setting the MTU below
      the minimum of 68.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      42aa9162
    • Herbert Xu's avatar
      gre: Use needed_headroom · c95b819a
      Herbert Xu authored
      
      
      Now that we have dev->needed_headroom, we can use it instead of
      having a bogus dev->hard_header_len.  This also allows us to
      include dev->hard_header_len in the MTU computation so that when
      we do have a meaningful hard_harder_len in future it is included
      automatically in figuring out the MTU.
      
      Incidentally, this fixes a bug where we ignored the needed_headroom
      field of the underlying device in calculating our own hard_header_len.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c95b819a
  23. 22 May, 2008 1 commit
  24. 21 May, 2008 1 commit
  25. 16 Apr, 2008 8 commits
  26. 25 Mar, 2008 1 commit
  27. 06 Mar, 2008 1 commit