1. 01 May, 2012 14 commits
    • Huang, Xiong's avatar
      atl1c: add PHY link event(up/down) patch · 903d7ce0
      Huang, Xiong authored
      On some platforms the PHY settings need to change depending on the
      cable link status to get better stability.
      Signed-off-by: default avatarxiong <xiong@qca.qualcomm.com>
      Tested-by: default avatarLiu David <dwliu@qca.qualcomm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      903d7ce0
    • Huang, Xiong's avatar
      atl1c: add workaround for issue of bit INTX-disable for MSI interrupt · 7cb6a291
      Huang, Xiong authored
      All supported devices have one issue that msi interrupt doesn't assert
      if pci command register bit (PCI_COMMAND_INTX_DISABLE) is set.
      Add workaround in drivers/pci/quirks.c
      Signed-off-by: default avatarxiong <xiong@qca.qualcomm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7cb6a291
    • David S. Miller's avatar
    • Eric Dumazet's avatar
      bnx2x: remove some bloat · 1191cb83
      Eric Dumazet authored
      Before doing skb->head_frag work on bnx2x driver, I found too much stuff
      was inlined in bnx2x/bnx2x_cmn.h for no good reason and made my work not
      very easy.
      
      Move some big functions out of this include file to the respective .c
      file.
      
      A lot of inline keywords are not needed at all in this huge driver.
      
         text	   data	    bss	    dec	    hex	filename
       490083	   1270	     56	 491409	  77f91	bnx2x/bnx2x.ko.before
       484206	   1270	     56	 485532	  7689c	bnx2x/bnx2x.ko
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1191cb83
    • RongQing.Li's avatar
      pch_gbe: reprogram multicast address register on reset · d344c4f3
      RongQing.Li authored
      The reset logic after a Rx FIFO overrun will clear the programmed
      multicast addresses. This patch fixes the issue by reprogramming the
      registers after the reset.
      
      The commit eefc48b0 ("pch_gbe: reprogram multicast address register on
      reset") tried to fix this problem, but it introduces unnecessary
      codes. In fact, all multicast addresses have been saved in netdev->mc,
      So we can call pch_gbe_set_multi() directly after reset_hw and
      reset_rx.
      
      This commit kills 50+ line codes
      
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Takahiro Shimizu <tshimizu818@gmail.com>
      Signed-off-by: default avatarRongQing.Li <roy.qing.li@gmail.com>
      Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d344c4f3
    • Eric Dumazet's avatar
      net: makes skb_splice_bits() aware of skb->head_frag · 1d0c0b32
      Eric Dumazet authored
      __skb_splice_bits() can check if skb to be spliced has its skb->head
      mapped to a page fragment, instead of a kmalloc() area.
      
      If so we can avoid a copy of the skb head and get a reference on
      underlying page.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1d0c0b32
    • Eric Dumazet's avatar
      tcp: makes tcp_try_coalesce aware of skb->head_frag · 329033f6
      Eric Dumazet authored
      TCP coalesce can check if skb to be merged has its skb->head mapped to a
      page fragment, instead of a kmalloc() area.
      
      We had to disable coalescing in this case, for performance reasons.
      
      We 'upgrade' skb->head as a fragment in itself.
      
      This reduces number of cache misses when user makes its copies, since a
      less sk_buff are fetched.
      
      This makes receive and ofo queues shorter and thus reduce cache line
      misses in TCP stack.
      
      This is a followup of patch "net: allow skb->head to be a page fragment"
      
      Tested with tg3 nic, with GRO on or off. We can see "TCPRcvCoalesce"
      counter being incremented.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      329033f6
    • Eric Dumazet's avatar
      net: make GRO aware of skb->head_frag · d7e8883c
      Eric Dumazet authored
      GRO can check if skb to be merged has its skb->head mapped to a page
      fragment, instead of a kmalloc() area.
      
      We 'upgrade' skb->head as a fragment in itself
      
      This avoids the frag_list fallback, and permits to build true GRO skb
      (one sk_buff and up to 16 fragments), using less memory.
      
      This reduces number of cache misses when user makes its copy, since a
      single sk_buff is fetched.
      
      This is a followup of patch "net: allow skb->head to be a page fragment"
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d7e8883c
    • Eric Dumazet's avatar
      tg3: provide frags as skb head · 8d4057a9
      Eric Dumazet authored
      This patch converts tg3 driver, one of our reference drivers, to use new
      build_skb() api in frag mode.
      
      Instead of using kmalloc() to allocate the memory block that will be
      used by build_skb() as skb->head, we use a page fragment.
      
      This is a followup of patch "net: allow skb->head to be a page fragment"
      
      This allows GRO, TCP coalescing, and splice() to be more efficient.
      
      Incidentally, this also removes SLUB slow path contention in kfree()
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d4057a9
    • Eric Dumazet's avatar
      net: allow skb->head to be a page fragment · d3836f21
      Eric Dumazet authored
      skb->head is currently allocated from kmalloc(). This is convenient but
      has the drawback the data cannot be converted to a page fragment if
      needed.
      
      We have three spots were it hurts :
      
      1) GRO aggregation
      
       When a linear skb must be appended to another skb, GRO uses the
      frag_list fallback, very inefficient since we keep all struct sk_buff
      around. So drivers enabling GRO but delivering linear skbs to network
      stack aren't enabling full GRO power.
      
      2) splice(socket -> pipe).
      
       We must copy the linear part to a page fragment.
       This kind of defeats splice() purpose (zero copy claim)
      
      3) TCP coalescing.
      
       Recently introduced, this permits to group several contiguous segments
      into a single skb. This shortens queue lengths and save kernel memory,
      and greatly reduce probabilities of TCP collapses. This coalescing
      doesnt work on linear skbs (or we would need to copy data, this would be
      too slow)
      
      Given all these issues, the following patch introduces the possibility
      of having skb->head be a fragment in itself. We use a new skb flag,
      skb->head_frag to carry this information.
      
      build_skb() is changed to accept a frag_size argument. Drivers willing
      to provide a page fragment instead of kmalloc() data will set a non zero
      value, set to the fragment size.
      
      Then, on situations we need to convert the skb head to a frag in itself,
      we can check if skb->head_frag is set and avoid the copies or various
      fallbacks we have.
      
      This means drivers currently using frags could be updated to avoid the
      current skb->head allocation and reduce their memory footprint (aka skb
      truesize). (thats 512 or 1024 bytes saved per skb). This also makes
      bpf/netfilter faster since the 'first frag' will be part of skb linear
      part, no need to copy data.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Maciej Żenczykowski <maze@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Cc: Tom Herbert <therbert@google.com>
      Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d3836f21
    • Willem de Bruijn's avatar
      forcedeth: add transmit timestamping support · 49cbb1c1
      Willem de Bruijn authored
      Insert an skb_tx_timestamp call in both ndo_start_xmit routines
      Tested to work for the nv_start_xmit_optimized case
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49cbb1c1
    • Willem de Bruijn's avatar
    • Willem de Bruijn's avatar
    • Willem de Bruijn's avatar
  2. 30 Apr, 2012 3 commits
  3. 29 Apr, 2012 10 commits
  4. 27 Apr, 2012 13 commits