1. 26 3月, 2008 1 次提交
  2. 06 2月, 2008 2 次提交
  3. 11 12月, 2007 1 次提交
  4. 15 11月, 2007 1 次提交
  5. 17 10月, 2007 3 次提交
    • J
      uml: correctly handle skb allocation failures · 605c1e57
      Jeff Dike 提交于
      Handle memory allocation failures when reading packets.
      
      We have to read something from the host, even if we can't allocate any
      memory.  If we don't, the host side of the device may fill up and stop
      delivering interrupts because no new packets can be queued.
      
      A single sk_buff is allocated whenever an MTU is seen which is larger
      than any seen earlier.  This is used to read packets if there is a
      memory allocation failure.
      
      The large MTU check is done from eth_configure, which is called when a
      interface is added to the system.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      605c1e57
    • J
      uml: network driver MTU cleanups · b53f35a8
      Jeff Dike 提交于
      A bunch of MTU-related cleanups in the network code.
      
      First, there is the addition of the notion of a maximally-sized packet, which
      is the MTU plus headers.  This is used to size the skb that will receive a
      packet.  This allows ether_adjust_skb to go away, as it was used to resize the
      skb after it was allocated.
      
      Since the skb passed into the low-level read routine is no longer resized, and
      possibly reallocated, there, they (and the write routines) don't need to get
      an sk_buff **.  They just need the sk_buff * now.  The callers of
      ether_adjust_skb still need to do the skb_put, so that's now inlined.
      
      The MAX_PACKET definitions in most of the drivers are gone.
      
      The set_mtu methods were all the same and did nothing, so they can be
      removed.
      
      The ethertap driver had a typo which doubled the size of the packet rather
      than adding two bytes to it.  It also wasn't defining its setup_size, causing
      a zero-byte kmalloc and crash when the invalid pointer returned from kmalloc
      was dereferenced.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b53f35a8
    • J
      uml: network formatting · cd1ae0e4
      Jeff Dike 提交于
      Style and other non-functional changes in the UML networking code, including
      	include tidying
      	style violations
      	copyright updates
      	printks getting severities
      	userspace code calling libc directly rather than using the os_*
      wrappers
      
      There's also a exit path cleanup in the pcap driver.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd1ae0e4
  6. 25 7月, 2007 1 次提交
    • J
      uml: more __init annotations · 97a1fcbb
      Jeff Dike 提交于
      2.6.23-rc1 turned up another batch of references from non-__init code to
      __init code.  In most cases, these were missing __init annotations.  In one
      case (os_drop_memory), the annotation was present but wrong.
      
      init_maps is __init, but for some reason was being very careful about the
      mechanism by which it allocated memory, checking whether it was OK to use
      kmalloc (at this point in the boot, it definitely isn't) and using either
      alloc_bootmem_low_pages or kmalloc/vmalloc.  So, the kmalloc/vmalloc code is
      removed.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97a1fcbb
  7. 09 5月, 2007 1 次提交
    • J
      uml: network and pcap cleanup · 7d98230a
      Jeff Dike 提交于
      Some network device cleanup.
      
      When setup_etheraddr found a globally valid MAC being assigned to an
      interface, it went ahead and used it rather than assigning a random MAC like
      the other cases do.  This isn't really an error like the others, but it seems
      consistent to make it behave the same.
      
      We were getting some duplicate kfree() in the error case in eth_configure
      because platform_device_unregister frees buffers that the error cases
      following tried to free again.
      
      The pcap initialization routine wasn't doing the proper printk of its
      information, causing a printk of the first part of that line to be
      unterminated by a newline.
      
      The pcap code had a bunch of style violations, which are now fixed.
      
      pcap_setup wasn't returning false when it detected an unrecognized
      option.
      
      The printks in pcap_user all got UM_KERN_BLAH prepended to their
      format strings.
      
      pcap_remove now checks for a non-NULL pcap structure before it calls
      pcap_close.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Acked-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7d98230a
  8. 08 5月, 2007 6 次提交
  9. 26 4月, 2007 1 次提交
  10. 12 2月, 2007 5 次提交
  11. 14 12月, 2006 1 次提交
  12. 13 12月, 2006 1 次提交
  13. 06 12月, 2006 1 次提交
  14. 09 10月, 2006 1 次提交
  15. 04 10月, 2006 1 次提交
  16. 30 9月, 2006 4 次提交
    • O
      [PATCH] uml build fix · d6c64102
      Ollie Wild 提交于
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d6c64102
    • J
      [PATCH] uml: don't roll my own random MAC generator · fade5d54
      Jeff Dike 提交于
      Use the existing random_ether_addr() instead of cooking up my own
      version.  Pointed out by Dave Hollis and Jason Lunz.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fade5d54
    • J
      [PATCH] uml: mechanical tidying after random MACs change · b10aeeef
      Jeff Dike 提交于
      Mechanical, hopefully non-functional changes stemming from
      setup_etheraddr always succeeding now that it always assigns a MAC,
      either from the command line or generated randomly:
         the test of the return of setup_etheraddr is removed, and code
      dependent on it succeeding is now unconditional
         setup_etheraddr can now be made void
         struct uml_net.have_mac is now always 1, so tests of it can be
      similarly removed, and uses of it can be replaced with 1
         struct uml_net.have_mac is no longer used, so it can be removed
         struct uml_net_private.have_mac is copied from struct uml_net, so
      it is always 1
         tests of uml_net_private.have_mac can be removed
         uml_net_private.have_mac can now be removed
         the only call to dev_ip_addr was removed, so it can be deleted
      
      It also turns out that setup_etheraddr is called only once, from the same
      file, so it can be static and its declaration removed from net_kern.h.
      
      Similarly, set_ether_mac is defined and called only from one file.
      
      Finally, setup_etheraddr and set_ether_mac were moved to avoid needing forward
      declarations.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b10aeeef
    • J
      [PATCH] uml: assign random MACs to interfaces if necessary · f3e7ed2b
      Jeff Dike 提交于
      Assign a random MAC to an ethernet interface if one was not provided on the
      command line.  This became pressing when distros started bringing interfaces
      up before assigning IPs to them.  The previous pattern of assigning an IP then
      bringing it up allowed the MAC to be generated from the first IP assigned.
      However, once the thing is up, it's probably a bad idea to change the MAC, so
      the MAC stayed initialized to fe:fd:0:0:0:0.
      
      Now, if there is no MAC from the command line, one is generated.  We use the
      microseconds from gettimeofday (20 bits), plus the low 12 bits of the pid to
      seed the random number generator.  random() is called twice, with 16 bits of
      each result used.  I didn't want to have to try to fill in 32 bits optimally
      given an arbitrary RAND_MAX, so I just assume that it is greater than 65536
      and use 16 bits of each random() return.
      
      There is also a bit of reformatting and whitespace cleanup here.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f3e7ed2b
  17. 29 9月, 2006 1 次提交
  18. 27 9月, 2006 2 次提交
  19. 26 9月, 2006 1 次提交
  20. 03 7月, 2006 1 次提交
  21. 08 2月, 2006 1 次提交
  22. 19 1月, 2006 2 次提交
  23. 07 1月, 2006 1 次提交