1. 23 Jun, 2009 7 commits
    • Neil Horman's avatar
      ipv4 routing: Ensure that route cache entries are usable and reclaimable with caching is off · b6280b47
      Neil Horman authored
      When route caching is disabled (rt_caching returns false), We still use route
      cache entries that are created and passed into rt_intern_hash once.  These
      routes need to be made usable for the one call path that holds a reference to
      them, and they need to be reclaimed when they're finished with their use.  To be
      made usable, they need to be associated with a neighbor table entry (which they
      currently are not), otherwise iproute_finish2 just discards the packet, since we
      don't know which L2 peer to send the packet to.  To do this binding, we need to
      follow the path a bit higher up in rt_intern_hash, which calls
      arp_bind_neighbour, but not assign the route entry to the hash table.
      Currently, if caching is off, we simply assign the route to the rp pointer and
      are reutrn success.  This patch associates us with a neighbor entry first.
      
      Secondly, we need to make sure that any single use routes like this are known to
      the garbage collector when caching is off.  If caching is off, and we try to
      hash in a route, it will leak when its refcount reaches zero.  To avoid this,
      this patch calls rt_free on the route cache entry passed into rt_intern_hash.
      This places us on the gc list for the route cache garbage collector, so that
      when its refcount reaches zero, it will be reclaimed (Thanks to Alexey for this
      suggestion).
      
      I've tested this on a local system here, and with these patches in place, I'm
      able to maintain routed connectivity to remote systems, even if I set
      /proc/sys/net/ipv4/rt_cache_rebuild_count to -1, which forces rt_caching to
      return false.
      Signed-off-by: default avatarNeil Horman <nhorman@redhat.com>
      Reported-by: default avatarJarek Poplawski <jarkao2@gmail.com>
      Reported-by: default avatarMaxime Bizon <mbizon@freebox.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b6280b47
    • Herbert Xu's avatar
      net: Move rx skb_orphan call to where needed · d55d87fd
      Herbert Xu authored
      In order to get the tun driver to account packets, we need to be
      able to receive packets with destructors set.  To be on the safe
      side, I added an skb_orphan call for all protocols by default since
      some of them (IP in particular) cannot handle receiving packets
      destructors properly.
      
      Now it seems that at least one protocol (CAN) expects to be able
      to pass skb->sk through the rx path without getting clobbered.
      
      So this patch attempts to fix this properly by moving the skb_orphan
      call to where it's actually needed.  In particular, I've added it
      to skb_set_owner_[rw] which is what most users of skb->destructor
      call.
      
      This is actually an improvement for tun too since it means that
      we only give back the amount charged to the socket when the skb
      is passed to another socket that will also be charged accordingly.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Tested-by: default avatarOliver Hartkopp <olver@hartkopp.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d55d87fd
    • Brian Haley's avatar
      ipv6: Use correct data types for ICMPv6 type and code · d5fdd6ba
      Brian Haley authored
      Change all the code that deals directly with ICMPv6 type and code
      values to use u8 instead of a signed int as that's the actual data
      type.
      Signed-off-by: default avatarBrian Haley <brian.haley@hp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d5fdd6ba
    • Heiko Carstens's avatar
      net: let KS8842 driver depend on HAS_IOMEM · 0cf08dcb
      Heiko Carstens authored
      Fixes this compile error on s390:
      
        CC      drivers/net/ks8842.o
      drivers/net/ks8842.c: In function 'ks8842_select_bank':
      drivers/net/ks8842.c:124: error: implicit declaration of function 'iowrite16'
      drivers/net/ks8842.c: In function 'ks8842_write8':
      drivers/net/ks8842.c:131: error: implicit declaration of function 'iowrite8'
      
      Cc: Richard Rojfors <richard.rojfors.ext@mocean-labs.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0cf08dcb
    • Heiko Carstens's avatar
      can: let SJA1000 driver depend on HAS_IOMEM · fec37ab5
      Heiko Carstens authored
      Fixes this compile error on s390:
      
      drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_read_reg':
      drivers/net/can/sja1000/sja1000_platform.c:42: error: implicit declaration of function 'ioread8'
      drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_write_reg':
      drivers/net/can/sja1000/sja1000_platform.c:47: error: implicit declaration of function 'iowrite8'
      drivers/net/can/sja1000/sja1000_platform.c: In function 'sp_probe':
      drivers/net/can/sja1000/sja1000_platform.c:79: error: implicit declaration of function 'ioremap_nocache'
      
      Cc: Wolfgang Grandegger <wg@grandegger.com>
      Cc: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fec37ab5
    • Dhananjay Phadke's avatar
      netxen: fix firmware init handshake · 96f2ebd2
      Dhananjay Phadke authored
      Make sure all functions run firmware init handshake.
      
      If PCI function 0 fails to initialize firmware, mark the
      state failed so that other functions on the same board
      bail out quickly instead of waiting 30s for firmware
      handshake.
      Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96f2ebd2
    • Dhananjay Phadke's avatar
      netxen: fix build with without CONFIG_PM · 01542cd1
      Dhananjay Phadke authored
      wrap pci suspend() and resume() with CONFIG_PM check.
      Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      01542cd1
  2. 22 Jun, 2009 14 commits
  3. 20 Jun, 2009 5 commits
  4. 19 Jun, 2009 14 commits