1. 09 Dec, 2014 11 commits
    • Giuseppe CAVALLARO's avatar
      stmmac: fix max coal timer parameter · 9b8d16cf
      Giuseppe CAVALLARO authored
      This patch is to fix the max coalesce timer setting that can be provided
      by ethtool.
      The default value (STMMAC_COAL_TX_TIMER) was used in the set_coalesce helper
      instead of the max one (STMMAC_MAX_COAL_TX_TICK, so defined but not used).
      Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9b8d16cf
    • Daniel Borkmann's avatar
      net: sctp: use MAX_HEADER for headroom reserve in output path · 9772b54c
      Daniel Borkmann authored
      To accomodate for enough headroom for tunnels, use MAX_HEADER instead
      of LL_MAX_HEADER. Robert reported that he has hit after roughly 40hrs
      of trinity an skb_under_panic() via SCTP output path (see reference).
      I couldn't reproduce it from here, but not using MAX_HEADER as elsewhere
      in other protocols might be one possible cause for this.
      
      In any case, it looks like accounting on chunks themself seems to look
      good as the skb already passed the SCTP output path and did not hit
      any skb_over_panic(). Given tunneling was enabled in his .config, the
      headroom would have been expanded by MAX_HEADER in this case.
      Reported-by: default avatarRobert Święcki <robert@swiecki.net>
      Reference: https://lkml.org/lkml/2014/12/1/507
      Fixes: 594ccc14 ("[SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in sctp_packet_transmit().")
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9772b54c
    • Hariprasad Shenai's avatar
    • Hariprasad Shenai's avatar
      cxgb4: Add a check for flashing FW using ethtool · 79af221d
      Hariprasad Shenai authored
      Don't let T4 firmware flash on a T5 adapter and vice-versa
      using ethtool
      
      Based on original work by Casey Leedom <leedom@chelsio.com>
      Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79af221d
    • David S. Miller's avatar
      Merge branch 'amd-xgbe' · 6000df00
      David S. Miller authored
      Tom Lendacky says:
      
      ====================
      amd-xgbe: AMD XGBE driver fixes 2014-12-02
      
      The following series of patches includes two bug fixes. Unfortunately,
      the first patch will create a conflict when eventually merged into
      net-next but should be very easy to resolve.
      
      - Do not clear the interrupt bit in the xgbe_ring_data structure
      - Associate a Tx SKB with the proper xgbe_ring_data structure
      
      This patch series is based on net.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6000df00
    • Lendacky, Thomas's avatar
      amd-xgbe: Associate Tx SKB with proper ring descriptor · c1530317
      Lendacky, Thomas authored
      The SKB for a Tx packet is associated with an xgbe_ring_data structure
      in the xgbe_map_tx_skb function.  However, it is being saved in the
      structure after the last structure used when the SKB is mapped.  Use
      the last used structure to save the SKB value.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1530317
    • Lendacky, Thomas's avatar
      amd-xgbe: Do not clear interrupt indicator · 03ccc4c0
      Lendacky, Thomas authored
      The interrupt value within the xgbe_ring_data structure is used as an
      indicator of which Rx descriptor should have the INTE bit set to
      generate an interrupt when that Rx descriptor is used.  This bit was
      mistakenly cleared in the xgbe_unmap_rdata function, effectively
      nullifying the ethtool rx-frames support.
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03ccc4c0
    • Alexander Duyck's avatar
      fib_trie: Fix /proc/net/fib_trie when CONFIG_IP_MULTIPLE_TABLES is not defined · a5a519b2
      Alexander Duyck authored
      In recent testing I had disabled CONFIG_IP_MULTIPLE_TABLES and as a result
      when I ran "cat /proc/net/fib_trie" the main trie was displayed multiple
      times.  I found that the problem line of code was in the function
      fib_trie_seq_next.  Specifically the line below caused the indexes to go in
      the opposite direction of our traversal:
      
      	h = tb->tb_id & (FIB_TABLE_HASHSZ - 1);
      
      This issue was that the RT tables are defined such that RT_TABLE_LOCAL is ID
      255, while it is located at TABLE_LOCAL_INDEX of 0, and RT_TABLE_MAIN is 254
      with a TABLE_MAIN_INDEX of 1.  This means that the above line will return 1
      for the local table and 0 for main.  The result is that fib_trie_seq_next
      will return NULL at the end of the local table, fib_trie_seq_start will
      return the start of the main table, and then fib_trie_seq_next will loop on
      main forever as h will always return 0.
      
      The fix for this is to reverse the ordering of the two tables.  It has the
      advantage of making it so that the tables now print in the same order
      regardless of if multiple tables are enabled or not.  In order to make the
      definition consistent with the multiple tables case I simply masked the to
      RT_TABLE_XXX values by (FIB_TABLE_HASHSZ - 1).  This way the two table
      layouts should always stay consistent.
      
      Fixes: 93456b6d ("[IPV4]: Unify access to the routing tables")
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a5a519b2
    • Eric Dumazet's avatar
      net: mvneta: fix race condition in mvneta_tx() · 5f478b41
      Eric Dumazet authored
      mvneta_tx() dereferences skb to get skb->len too late,
      as hardware might have completed the transmit and TX completion
      could have freed the skb from another cpu.
      
      Fixes: 71f6d1b3 ("net: mvneta: replace Tx timer with a real interrupt")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f478b41
    • willy tarreau's avatar
      net: mvneta: fix Tx interrupt delay · aebea2ba
      willy tarreau authored
      The mvneta driver sets the amount of Tx coalesce packets to 16 by
      default. Normally that does not cause any trouble since the driver
      uses a much larger Tx ring size (532 packets). But some sockets
      might run with very small buffers, much smaller than the equivalent
      of 16 packets. This is what ping is doing for example, by setting
      SNDBUF to 324 bytes rounded up to 2kB by the kernel.
      
      The problem is that there is no documented method to force a specific
      packet to emit an interrupt (eg: the last of the ring) nor is it
      possible to make the NIC emit an interrupt after a given delay.
      
      In this case, it causes trouble, because when ping sends packets over
      its raw socket, the few first packets leave the system, and the first
      15 packets will be emitted without an IRQ being generated, so without
      the skbs being freed. And since the socket's buffer is small, there's
      no way to reach that amount of packets, and the ping ends up with
      "send: no buffer available" after sending 6 packets. Running with 3
      instances of ping in parallel is enough to hide the problem, because
      with 6 packets per instance, that's 18 packets total, which is enough
      to grant a Tx interrupt before all are sent.
      
      The original driver in the LSP kernel worked around this design flaw
      by using a software timer to clean up the Tx descriptors. This timer
      was slow and caused terrible network performance on some Tx-bound
      workloads (such as routing) but was enough to make tools like ping
      work correctly.
      
      Instead here, we simply set the packet counts before interrupt to 1.
      This ensures that each packet sent will produce an interrupt. NAPI
      takes care of coalescing interrupts since the interrupt is disabled
      once generated.
      
      No measurable performance impact nor CPU usage were observed on small
      nor large packets, including when saturating the link on Tx, and this
      fixes tools like ping which rely on too small a send buffer. If one
      wants to increase this value for certain workloads where it is safe
      to do so, "ethtool -C $dev tx-frames" will override this default
      setting.
      
      This fix needs to be applied to stable kernels starting with 3.10.
      Tested-By: default avatarMaggie Mae Roxas <maggie.mae.roxas@gmail.com>
      Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aebea2ba
    • Denis Kirjanov's avatar
      mips: bpf: Fix broken BPF_MOD · 2e46477a
      Denis Kirjanov authored
      Remove optimize_div() from BPF_MOD | BPF_K case
      since we don't know the dividend and fix the
      emit_mod() by reading the mod operation result from HI register
      Signed-off-by: default avatarDenis Kirjanov <kda@linux-powerpc.org>
      Reviewed-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2e46477a
  2. 06 Dec, 2014 7 commits
  3. 04 Dec, 2014 1 commit
  4. 03 Dec, 2014 21 commits