1. 07 Feb, 2009 18 commits
  2. 06 Feb, 2009 13 commits
  3. 05 Feb, 2009 9 commits
    • Herbert Xu's avatar
      net: Reexport sock_alloc_send_pskb · 4cc7f68d
      Herbert Xu authored
      The function sock_alloc_send_pskb is completely useless if not
      exported since most of the code in it won't be used as is.  In
      fact, this code has already been duplicated in the tun driver.
      
      Now that we need accounting in the tun driver, we can in fact
      use this function as is.  So this patch marks it for export again.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4cc7f68d
    • Herbert Xu's avatar
      net: Partially allow skb destructors to be used on receive path · 9a279bcb
      Herbert Xu authored
      As it currently stands, skb destructors are forbidden on the
      receive path because the protocol end-points will overwrite
      any existing destructor with their own.
      
      This is the reason why we have to call skb_orphan in the loopback
      driver before we reinject the packet back into the stack, thus
      creating a period during which loopback traffic isn't charged
      to any socket.
      
      With virtualisation, we have a similar problem in that traffic
      is reinjected into the stack without being associated with any
      socket entity, thus providing no natural congestion push-back
      for those poor folks still stuck with UDP.
      
      Now had we been consistent in telling them that UDP simply has
      no congestion feedback, I could just fob them off.  Unfortunately,
      we appear to have gone to some length in catering for this on
      the standard UDP path, with skb/socket accounting so that has
      created a very unhealthy dependency.
      
      Alas habits are difficult to break out of, so we may just have
      to allow skb destructors on the receive path.
      
      It turns out that making skb destructors useable on the receive path
      isn't as easy as it seems.  For instance, simply adding skb_orphan
      to skb_set_owner_r isn't enough.  This is because we assume all
      over the IP stack that skb->sk is an IP socket if present.
      
      The new transparent proxy code goes one step further and assumes
      that skb->sk is the receiving socket if present.
      
      Now all of this can be dealt with by adding simple checks such
      as only treating skb->sk as an IP socket if skb->sk->sk_family
      matches.  However, it turns out that for bridging at least we
      don't need to do all of this work.
      
      This is of interest because most virtualisation setups use bridging
      so we don't actually go through the IP stack on the host (with
      the exception of our old nemesis the bridge netfilter, but that's
      easily taken care of).
      
      So this patch simply adds skb_orphan to the point just before we
      enter the IP stack, but after we've gone through the bridge on the
      receive path.  It also adds an skb_orphan to the one place in
      netfilter that touches skb->sk/skb->destructor, that is, tproxy.
      
      One word of caution, because of the internal code structure, anyone
      wishing to deploy this must use skb_set_owner_w as opposed to
      skb_set_owner_r since many functions that create a new skb from
      an existing one will invoke skb_set_owner_w on the new skb.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9a279bcb
    • David S. Miller's avatar
    • David S. Miller's avatar
    • Andy Fleming's avatar
      gianfar: Fix stashing support · 4d7902f2
      Andy Fleming authored
      Stashing is only supported on the 85xx (e500-based) SoCs.  The 83xx and 86xx
      chips don't have a proper cache for this.  U-Boot has been updated to add
      stashing properties to the device tree nodes of gianfar devices on 85xx.  So
      now we modify Linux to keep stashing off unless those properties are there.
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d7902f2
    • Andy Fleming's avatar
      0fd56bb5
    • Andy Fleming's avatar
      netdev: Merge UCC and gianfar MDIO bus drivers · 1577ecef
      Andy Fleming authored
      The MDIO bus drivers for the UCC and gianfar ethernet controllers are
      essentially the same.  There's no reason to duplicate that much code.
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1577ecef
    • Andy Fleming's avatar
      gianfar: Fix potential soft reset race · b98ac702
      Andy Fleming authored
      SOFT_RESET must be asserted for at least 3 TX clocks in order for it to work
      properly.  The syncs in the gfar_write() commands have been hiding this, but
      we need to guarantee it.
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b98ac702
    • Andy Fleming's avatar
      gianfar: Fix BD_LENGTH_MASK definition · 1fbe4932
      Andy Fleming authored
      BD_LENGTH_MASK is supposed to catch the low 16-bits of the status field, not
      the low byte.  The old way, we would never be able to clean up tx packets with
      sizes divisible by 256.
      Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1fbe4932