1. 29 8月, 2016 14 次提交
    • J
      fm10k: use software values when checking for Tx hangs in hot path · 5b9e4432
      Jacob Keller 提交于
      A previous patch added support to check for hardware Tx pending in the
      fm10k_down routine. This support was intended to ensure that we
      accurately check what the hardware state is. However, checking for Tx
      hangs in this manor during the hotpath results in a large performance
      hit. Avoid this by making the hotpath check use the SW counters instead.
      
      Fixes: a0f53cf49cb0 ("fm10k: use actual hardware registers when checking for pending Tx", 2016-06-08)
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5b9e4432
    • J
      fm10k: fix PCI device enable_cnt leak in .io_slot_reset · e59a393d
      Jacob Keller 提交于
      A previous patch removed the pci_disable_device() call in
      .io_error_detected. This call corresponded to a pci_enable_device_mem()
      call within .io_slot_reset handler. Change the call here to
      a pci_reenable_device() so that it does not increment and leak the
      enable_cnt reference count for the device. Without this change, VF
      devices may fail during an unbind/bind, and we'll never zero the
      reference counter for the pci_dev structure.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NKrishneil Singh <Krishneil.k.singh@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e59a393d
    • A
      net_sched: fix use of uninitialized ethertype variable in cls_flower · 0b498a52
      Arnd Bergmann 提交于
      The addition of VLAN support caused a possible use of uninitialized
      data if we encounter a zero TCA_FLOWER_KEY_ETH_TYPE key, as pointed
      out by "gcc -Wmaybe-uninitialized":
      
      net/sched/cls_flower.c: In function 'fl_change':
      net/sched/cls_flower.c:366:22: error: 'ethertype' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      This changes the code to only set the ethertype field if it
      was nonzero, as before the patch.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 9399ae9a ("net_sched: flower: Add vlan support")
      Cc: Hadar Hen Zion <hadarh@mellanox.com>
      Cc: Jiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0b498a52
    • A
      net/xgene: fix error handling during reset · f9dc7074
      Arnd Bergmann 提交于
      The newly added reset logic uses helper functions for the MMIO that
      may fail. However, when the read operation fails, we end up writing
      back uninitialized data to the register, as gcc warns:
      
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c: In function 'xgene_enet_link_state':
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:213:2: error: 'data' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c:209:6: note: 'data' was declared here
        u32 data;
      
      We already print a warning to the console log if that happens,
      the best alternative that I can see is skip the rest of the reset
      sequence if the register value cannot be read: Most likely the
      write would fail as well, and if it succeeded, worse things could
      happen.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 3eb7cb9d ("drivers: net: xgene: XFI PCS reset when link is down")
      Cc: Fushen Chen <fchen@apm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9dc7074
    • V
      net: ethtool: add support for 1000BaseX and missing 10G link modes · 5711a982
      Vidya Sagar Ravipati 提交于
      This patch enhances ethtool link mode bitmap to include
      missing interface modes for 1G/10G speeds
      
      Changes:
      1000baseX is the mode introduced to cover all 1G Fiber cases.
      All modes under 1000BaseX i.e. 1000BASE-SX, 1000BASE-LX, 1000BASE-LX10
      and 1000BASE-BX10 are not explicitly defined at this moment.
      10G CR,SR,LR and ER link modes are included for 10G speed..
      
      Issue:
      ethtool on  1G/10G SFP port reports Base-T
      as this port supports 1000baseX,10G CR, SR and LR modes.
      
      root@tor-02$ ethtool swp1
      Settings for swp1:
              Supported ports: [ FIBRE ]
              Supported link modes:   1000baseT/Full
                                      10000baseT/Full
              Supported pause frame use: Symmetric Receive-only
              Supports auto-negotiation: Yes
              Advertised link modes:  1000baseT/Full
              Advertised pause frame use: No
              Advertised auto-negotiation: No
              Speed: 10000Mb/s
              Duplex: Full
              Port: FIBRE
              PHYAD: 0
              Transceiver: external
              Auto-negotiation: off
              Current message level: 0x00000000 (0)
      
              Link detected: yes
      
      After fix:
      root@tor-02$ ethtool swp1
      Settings for swp1:
              Supported ports: [ FIBRE ]
              Supported link modes:   1000baseX/Full
                                      10000baseCR/Full
                                      10000baseSR/Full
                                      10000baseLR/Full
                                      10000baseER/Full
              Supported pause frame use: Symmetric Receive-only
              Supports auto-negotiation: Yes
              Advertised link modes:  1000baseT/Full
              Advertised pause frame use: No
              Advertised auto-negotiation: No
              Speed: 10000Mb/s
              Duplex: Full
              Port: FIBRE
              PHYAD: 0
              Transceiver: external
              Auto-negotiation: off
              Current message level: 0x00000000 (0)
              Link detected: yes
      Signed-off-by: NVidya Sagar Ravipati <vidya@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5711a982
    • J
      amd-xgbe: Reset running devices after resume from hibernate · a039b638
      James Morse 提交于
      After resume from hibernate on arm64, any amd-xgbe devices that were
      running when we hibernated are reported as down, even when it is not.
      
      Re-plugging the cables does not cause the interface to come back, the
      link must be marked as down then up via 'ip set link' using the serial
      console.
      
      This happens because the device has been power-cycled and possibly
      re-initialised by firmware, whereas the driver's memory structures have
      been restored from the hibernate image and the two do not agree.
      
      Schedule a restart of the device after powerup in case the world changed
      while we were asleep.
      Signed-off-by: NJames Morse <james.morse@arm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a039b638
    • E
      tcp: add tcp_add_backlog() · c9c33212
      Eric Dumazet 提交于
      When TCP operates in lossy environments (between 1 and 10 % packet
      losses), many SACK blocks can be exchanged, and I noticed we could
      drop them on busy senders, if these SACK blocks have to be queued
      into the socket backlog.
      
      While the main cause is the poor performance of RACK/SACK processing,
      we can try to avoid these drops of valuable information that can lead to
      spurious timeouts and retransmits.
      
      Cause of the drops is the skb->truesize overestimation caused by :
      
      - drivers allocating ~2048 (or more) bytes as a fragment to hold an
        Ethernet frame.
      
      - various pskb_may_pull() calls bringing the headers into skb->head
        might have pulled all the frame content, but skb->truesize could
        not be lowered, as the stack has no idea of each fragment truesize.
      
      The backlog drops are also more visible on bidirectional flows, since
      their sk_rmem_alloc can be quite big.
      
      Let's add some room for the backlog, as only the socket owner
      can selectively take action to lower memory needs, like collapsing
      receive queues or partial ofo pruning.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9c33212
    • C
      cxgb4/cxgb4vf: fix spelling mistake "provissioned" -> "provisioned" · 1a8ff8f5
      Colin Ian King 提交于
      Trivial fix to spelling mistake in dev_warn message.
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a8ff8f5
    • C
      net: ucc_geth: fix spelling mistake "propperty" -> "property" · b9780a81
      Colin Ian King 提交于
      Trivial fix to spelling mistake in dev_warn message.
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b9780a81
    • C
      wan/fsl_ucc_hdlc: fix spelling mistake "prameter" -> "parameter" · 24a24d07
      Colin Ian King 提交于
      Trivial fix to spelling mistake in dev_err message.
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      24a24d07
    • D
      Merge branch 'strp-generalization' · c6f04e93
      David S. Miller 提交于
      Tom Herbert says:
      
      ====================
      strp: Generalize stream parser to work with other socket types
      
      Add a read_sock protocol operation function that allows something like
      tcp_read_sock to be called for other protocol types.
      
      Specific changes in this patch set:
        - Add read_sock function to proto_ops. This has the same signature as
          tcp_read_sock. sk_read_actor_t is also defined in net.h.
        - Set peek_len and read_sock proto_op functions for TCPv4 and TCPv6
          stream ops.
        - Remove references to tcp in strparser.
        - Call peek_len and read_sock operations from strparser instead of
          calling TCP specific functions.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6f04e93
    • T
      kcm: Remove TCP specific references from kcm and strparser · 96a59083
      Tom Herbert 提交于
      kcm and strparser need to work with any type of stream socket not just
      TCP. Eliminate references to TCP and call generic proto_ops functions of
      read_sock and peek_len. Also in strp_init check if the socket support
      the proto_ops read_sock and peek_len.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      96a59083
    • T
      tcp: Set read_sock and peek_len proto_ops · 32035585
      Tom Herbert 提交于
      In inet_stream_ops we set read_sock to tcp_read_sock and peek_len to
      tcp_peek_len (which is just a stub function that calls tcp_inq).
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      32035585
    • T
      net: Add read_sock proto_op · 0294b625
      Tom Herbert 提交于
      Add new function in proto_ops structure. This includes moving the
      typedef got sk_read_actor into net.h and removing the definition from
      tcp.h.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0294b625
  2. 27 8月, 2016 26 次提交