An error occurred fetching the project authors.
  1. 22 Jan, 2009 6 commits
  2. 05 Jan, 2009 1 commit
  3. 30 Dec, 2008 1 commit
  4. 21 Nov, 2008 1 commit
  5. 20 Nov, 2008 1 commit
  6. 13 Nov, 2008 2 commits
  7. 04 Nov, 2008 1 commit
  8. 01 Nov, 2008 1 commit
    • Al Viro's avatar
      saner FASYNC handling on file close · 233e70f4
      Al Viro authored
      As it is, all instances of ->release() for files that have ->fasync()
      need to remember to evict file from fasync lists; forgetting that
      creates a hole and we actually have a bunch that *does* forget.
      
      So let's keep our lives simple - let __fput() check FASYNC in
      file->f_flags and call ->fasync() there if it's been set.  And lose that
      crap in ->release() instances - leaving it there is still valid, but we
      don't have to bother anymore.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      233e70f4
  9. 28 Oct, 2008 1 commit
  10. 16 Aug, 2008 2 commits
  11. 22 Jul, 2008 1 commit
  12. 15 Jul, 2008 1 commit
    • Max Krasnyansky's avatar
      tun: Fix/rewrite packet filtering logic · f271b2cc
      Max Krasnyansky authored
      Please see the following thread to get some context on this
      	http://marc.info/?l=linux-netdev&m=121564433018903&w=2
      
      Basically the issue is that current multi-cast filtering stuff in
      the TUN/TAP driver is seriously broken.
      Original patch went in without proper review and ACK. It was broken and
      confusing to start with and subsequent patches broke it completely.
      To give you an idea of what's broken here are some of the issues:
      
      - Very confusing comments throughout the code that imply that the
      character device is a network interface in its own right, and that packets
      are passed between the two nics. Which is completely wrong.
      
      - Wrong set of ioctls is used for setting up filters. They look like
      shortcuts for manipulating state of the tun/tap network interface but
      in reality manipulate the state of the TX filter.
      
      - ioctls that were originally used for setting address of the the TX filter
      got "fixed" and now set the address of the network interface itself. Which
      made filter totaly useless.
      
      - Filtering is done too late. Instead of filtering early on, to avoid
      unnecessary wakeups, filtering is done in the read() call.
      
      The list goes on and on :)
      
      So the patch cleans all that up. It introduces simple and clean interface for
      setting up TX filters (TUNSETTXFILTER + tun_filter spec) and does filtering
      before enqueuing the packets.
      
      TX filtering is useful in the scenarios where TAP is part of a bridge, in
      which case it gets all broadcast, multicast and potentially other packets when
      the bridge is learning. So for example Ethernet tunnelling app may want to
      setup TX filters to avoid tunnelling multicast traffic. QEMU and other
      hypervisors can push RX filtering that is currently done in the guest into the
      host context therefore saving wakeups and unnecessary data transfer.
      Signed-off-by: default avatarMax Krasnyansky <maxk@qualcomm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f271b2cc
  13. 10 Jul, 2008 1 commit
  14. 03 Jul, 2008 3 commits
    • Rusty Russell's avatar
      tun: Allow GSO using virtio_net_hdr · f43798c2
      Rusty Russell authored
      Add a IFF_VNET_HDR flag.  This uses the same ABI as virtio_net
      (ie. prepending struct virtio_net_hdr to packets) to indicate GSO and
      checksum information.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Acked-by: default avatarMax Krasnyansky <maxk@qualcomm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f43798c2
    • Rusty Russell's avatar
      tun: TUNSETFEATURES to set gso features. · 5228ddc9
      Rusty Russell authored
      ethtool is useful for setting (some) device fields, but it's
      root-only.  Finer feature control is available through a tun-specific
      ioctl.
      
      (Includes Mark McLoughlin <markmc@redhat.com>'s fix to hold rtnl sem).
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Acked-by: default avatarMax Krasnyansky <maxk@qualcomm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5228ddc9
    • Rusty Russell's avatar
      tun: Interface to query tun/tap features. · 07240fd0
      Rusty Russell authored
      The problem with introducing checksum offload and gso to tun is they
      need to set dev->features to enable GSO and/or checksumming, which is
      supposed to be done before register_netdevice(), ie. as part of
      TUNSETIFF.
      
      Unfortunately, TUNSETIFF has always just ignored flags it doesn't
      understand, so there's no good way of detecting whether the kernel
      supports new IFF_ flags.
      
      This patch implements a TUNGETFEATURES ioctl which returns all the valid IFF
      flags.  It could be extended later to include other features.
      
      Here's an example program which uses it:
      
      #include <linux/if_tun.h>
      #include <sys/types.h>
      #include <sys/ioctl.h>
      #include <sys/stat.h>
      #include <fcntl.h>
      #include <err.h>
      #include <stdio.h>
      
      static struct {
      	unsigned int flag;
      	const char *name;
      } known_flags[] = {
      	{ IFF_TUN, "TUN" },
      	{ IFF_TAP, "TAP" },
      	{ IFF_NO_PI, "NO_PI" },
      	{ IFF_ONE_QUEUE, "ONE_QUEUE" },
      };
      
      int main()
      {
      	unsigned int features, i;
      
      	int netfd = open("/dev/net/tun", O_RDWR);
      	if (netfd < 0)
      		err(1, "Opening /dev/net/tun");
      
      	if (ioctl(netfd, TUNGETFEATURES, &features) != 0) {
      		printf("Kernel does not support TUNGETFEATURES, guessing\n");
      		features = (IFF_TUN|IFF_TAP|IFF_NO_PI|IFF_ONE_QUEUE);
      	}
      	printf("Available features are: ");
      	for (i = 0; i < sizeof(known_flags)/sizeof(known_flags[0]); i++) {
      		if (features & known_flags[i].flag) {
      			features &= ~known_flags[i].flag;
      			printf("%s ", known_flags[i].name);
      		}
      	}
      	if (features)
      		printf("(UNKNOWN %#x)", features);
      	printf("\n");
      	return 0;
      }
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Acked-by: default avatarMax Krasnyansky <maxk@qualcomm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      07240fd0
  15. 02 Jul, 2008 2 commits
  16. 18 Jun, 2008 1 commit
  17. 24 Apr, 2008 2 commits
  18. 16 Apr, 2008 3 commits
    • Pavel Emelyanov's avatar
      [TUN]: Allow to register tun devices in namespace. · fc54c658
      Pavel Emelyanov authored
      This is basically means that a net is set for a new device, but
      actually also involves two more steps:
      
      1. mark the tun device as "local", i.e. do not allow for it to
         move across namespaces.
      
      This is done so, since tun device is most often associated to some
      file (and thus to some process) and moving the device alone is not
      valid while keeping the file and the process outside. The need in 
      ability to move a detached persistent device is to be investigated 
      later.
      
      2. get the tun device's net when tun becomes attached and put one
         when it becomes detached.
      
      This is needed to handle the case when a task owning the tun dies,
      but a files lives for some more time - in this case we must not
      allow for net to be freed, since its exit hook will spoil that file's
      private data by unregistering the tun from under tun_chr_close.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc54c658
    • Pavel Emelyanov's avatar
      [TUN]: Make the tun_dev_list per-net. · d647a591
      Pavel Emelyanov authored
      Remove the static tun_dev_list and replace its occurrences in
      driver with per-net one.
      
      It is used in two places - in tun_set_iff and tun_cleanup. In 
      the first case it's legal to use current net_ns. In the cleanup
      call - move the loop, that unregisters all devices in net exit
      hook.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d647a591
    • Pavel Emelyanov's avatar
      [TUN]: Introduce the tun_net structure and init/exit net ops. · 79d17604
      Pavel Emelyanov authored
      This is the first step in making tuntap devices work in net 
      namespaces. The structure mentioned is pointed by generic
      net pointer with tun_net_id id, and tun driver fills one on 
      its load. It will contain only the tun devices list.
      
      So declare this structure and introduce net init and exit hooks.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79d17604
  19. 13 Apr, 2008 2 commits
  20. 29 Feb, 2008 1 commit
  21. 05 Feb, 2008 1 commit
  22. 28 Jan, 2008 2 commits
  23. 27 Dec, 2007 1 commit
  24. 10 Oct, 2007 2 commits