Skip to content
  1. Oct 09, 2013
  2. Oct 08, 2013
  3. Oct 05, 2013
    • Edward Cree's avatar
      sfc: Add PM and RXDP drop counters to ethtool stats · 568d7a00
      Edward Cree authored
      
      
      Recognise the new Packet Memory and RX Data Path counters.
      
      The following counters are added:
      rx_pm_{trunc,discard}_bb_overflow - burst buffer overflowed.  This should not
       occur if BB correctly configured.
      rx_pm_{trunc,discard}_vfifo_full - not enough space in packet memory.  May
       indicate RX performance problems.
      rx_pm_{trunc,discard}_qbb - dropped by 802.1Qbb early discard mechanism.
       Since Qbb is not supported at present, this should not occur.
      rx_pm_discard_mapping - 802.1p priority configured to be dropped.  This should
       not occur in normal operation.
      rx_dp_q_disabled_packets - packet was to be delivered to a queue but queue is
       disabled.  May indicate misconfiguration by the driver.
      rx_dp_di_dropped_packets - parser-dispatcher indicated that a packet should be
       dropped.
      rx_dp_streaming_packets - packet was sent to the RXDP streaming bus, ie. a
       filter directed the packet to the MCPU.
      rx_dp_emerg_{fetch,wait} - RX datapath had to wait for descriptors to be
       loaded.  Indicates performance problems but not drops.
      
      These are only provided if the MC firmware has the
      PM_AND_RXDP_COUNTERS capability.  Otherwise, mask them out.
      
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      568d7a00
    • Matthew Slattery's avatar
    • Edward Cree's avatar
      sfc: Refactor EF10 stat mask code to allow for more conditional stats · 4bae913b
      Edward Cree authored
      
      
      Previously, efx_ef10_stat_mask returned a static const unsigned long[], which
      meant that each possible mask had to be declared statically with
      STAT_MASK_BITMAP.  Since adding a condition would double the size of the
      decision tree, we now create the bitmask dynamically.
      
      To do this, we have two functions efx_ef10_raw_stat_mask, which returns a u64,
      and efx_ef10_get_stat_mask, which fills in an unsigned long * argument.
      
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      4bae913b
    • Edward Cree's avatar
      sfc: Fix internal indices of ethtool stats for EF10 · 87648cc9
      Edward Cree authored
      
      
      The indices in nic_data->stats need to match the EF10_STAT_whatever
      enum values.  In efx_nic_update_stats, only mask; gaps are removed in
      efx_ef10_update_stats.
      
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      87648cc9
    • Jon Cooper's avatar
    • Eric Dumazet's avatar
      tcp: do not forget FIN in tcp_shifted_skb() · 5e8a402f
      Eric Dumazet authored
      Yuchung found following problem :
      
       There are bugs in the SACK processing code, merging part in
       tcp_shift_skb_data(), that incorrectly resets or ignores the sacked
       skbs FIN flag. When a receiver first SACK the FIN sequence, and later
       throw away ofo queue (e.g., sack-reneging), the sender will stop
       retransmitting the FIN flag, and hangs forever.
      
      Following packetdrill test can be used to reproduce the bug.
      
      $ cat sack-merge-bug.pkt
      `sysctl -q net.ipv4.tcp_fack=0`
      
      // Establish a connection and send 10 MSS.
      0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
      +.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
      +.000 bind(3, ..., ...) = 0
      +.000 listen(3, 1) = 0
      
      +.050 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
      +.000 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 6>
      +.001 < . 1:1(0) ack 1 win 1024
      +.000 accept(3, ..., ...) = 4
      
      +.100 write(4, ..., 12000) = 12000
      +.000 shutdown(4, SHUT_WR) = 0
      +.000 > . 1:10001(10000) ack 1
      +.050 < . 1:1(0) ack 2001 win 257
      +.000 > FP. 10001:12001(2000) ack 1
      +.050 < . 1:1(0) ack 2001 win 257 <sack 10001:11001,nop,nop>
      +.050 < . 1:1(0) ack 2001 win 257 <sack 10001:12002,nop,nop>
      // SACK reneg
      +.050 < . 1:1(0) ack 12001 win 257
      +0 %{ print "unacked: ",tcpi_unacked }%
      +5 %{ print "" }%
      
      First, a typo inverted left/right of one OR operation, then
      code forgot to advance end_seq if the merged skb carried FIN.
      
      Bug was added in 2.6.29 by commit 832d11c5
      
      
      ("tcp: Try to restore large SKBs while SACK processing")
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Acked-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e8a402f