1. 05 7月, 2020 15 次提交
    • D
      Merge branch 'qlogic-use-generic-power-management' · e1f04670
      David S. Miller 提交于
      Vaibhav Gupta says:
      
      ====================
      qlogic: use generic power management
      
      Linux Kernel Mentee: Remove Legacy Power Management.
      
      The purpose of this patch series is to remove legacy power management callbacks
      from qlogic ethernet drivers.
      
      The callbacks performing suspend() and resume() operations are still calling
      pci_save_state(), pci_set_power_state(), etc. and handling the power management
      themselves, which is not recommended.
      
      The conversion requires the removal of the those function calls and change the
      callback definition accordingly and make use of dev_pm_ops structure.
      
      All patches are compile-tested only.
      
      V2: Fix unused variable warning in v1.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1f04670
    • V
      qlcninc: use generic power management · 7ada9a5e
      Vaibhav Gupta 提交于
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and taking care of register states. And they use PCI
      helper functions to do it.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      .suspend() calls __qlcnic_shutdown, which then calls qlcnic_82xx_shutdown;
      .resume()  calls __qlcnic_resume,   which then calls qlcnic_82xx_resume;
      
      Both ...82xx..() are define in
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c and are used only in
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c.
      
      Hence upgrade them and remove PCI function calls, like pci_save_state() and
      pci_enable_wake(), inside them
      
      Compile-tested only.
      Signed-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ada9a5e
    • V
      netxen_nic: use generic power management · 063ad9bc
      Vaibhav Gupta 提交于
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states. And they use PCI
      helper functions to do it.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      In this driver:
      netxen_nic_resume() calls netxen_nic_attach_func() which then invokes PCI
      helper functions like pci_enable_device(), pci_set_power_state() and
      pci_restore_state(). Other function:
       - netxen_io_slot_reset()
      also calls netxen_nic_attach_func().
      
      Also, netxen_io_slot_reset() returns specific value based on the return value
      of netxen_nic_attach_func() as whole. Thus, cannot simply move some piece of
      code from netxen_nic_attach_func() to it.
      
      Hence, define a new function netxen_nic_attach_late_func() to do the tasks
      which has to be done after PCI helper functions have done their job.
      
      Now, netxen_nic_attach_func() invokes netxen_nic_attach_late_func(), thus
      netxen_io_slot_reset() behaves normally.
      And, netxen_nic_resume() calls netxen_nic_attach_late_func() to avoid PCI
      helper functions calls.
      
      Compile-tested only.
      Signed-off-by: NVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      063ad9bc
    • C
      net: dsa: microchip: remove unused private members · b20a6b29
      Codrin Ciubotariu 提交于
      Private structure members live_ports, on_ports, rx_ports, tx_ports are
      initialized but not used anywhere. Let's remove them.
      Suggested-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b20a6b29
    • C
      net: dsa: microchip: split adjust_link() in phylink_mac_link_{up|down}() · 143a102e
      Codrin Ciubotariu 提交于
      The DSA subsystem moved to phylink and adjust_link() became deprecated in
      the process. This patch removes adjust_link from the KSZ DSA switches and
      adds phylink_mac_link_up() and phylink_mac_link_down().
      Signed-off-by: NCodrin Ciubotariu <codrin.ciubotariu@microchip.com>
      Reviewed-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      143a102e
    • D
      Merge branch 'mptcp-add-REUSEADDR-REUSEPORT-V6ONLY-setsockopt-support' · bdd2ed27
      David S. Miller 提交于
      Florian Westphal says:
      
      ====================
      mptcp: add REUSEADDR/REUSEPORT/V6ONLY setsockopt support
      
      restarting an mptcp-patched sshd yields following error:
      
        sshd: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
        sshd: error: setsockopt IPV6_V6ONLY: Operation not supported
        sshd: error: Bind to port 22 on :: failed: Address already in use.
        sshd: fatal: Cannot bind any address.
      
      This series adds support for the needed setsockopts:
      
      First patch skips the generic SOL_SOCKET handler for MPTCP:
      in mptcp case, the setsockopt needs to alter the tcp socket, not the mptcp
      parent socket.
      
      Second patch adds minimal SOL_SOCKET support: REUSEPORT and REUSEADDR.
      Rest is still handled by the generic SOL_SOCKET code.
      
      Last patch adds IPV6ONLY support.  This makes ipv6 work for openssh:
      It creates two listening sockets, before this patch, binding the ipv6
      socket will fail because the port is already bound by the ipv4 one.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bdd2ed27
    • F
      mptcp: support IPV6_V6ONLY setsockopt · c9b95a13
      Florian Westphal 提交于
      Without this, Opensshd fails to open an ipv6 socket listening
      socket:
        error: setsockopt IPV6_V6ONLY: Operation not supported
        error: Bind to port 22 on :: failed: Address already in use.
      
      Opensshd opens an ipv4 and and ipv6 listening socket, but because
      IPV6_V6ONLY setsockopt fails, the port number is already in use.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c9b95a13
    • F
      mptcp: add REUSEADDR/REUSEPORT support · fd1452d8
      Florian Westphal 提交于
      This will e.g. make 'sshd restart' work when MPTCP is used, as we will
      now set this option on the listener socket instead of only the mptcp
      socket (where it has no effect).
      
      We still need to copy the setting to the master socket so that a
      subsequent getsockopt() returns the expected value.
      Reported-by: NChristoph Paasch <cpaasch@apple.com>
      Suggested-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd1452d8
    • F
      net: use mptcp setsockopt function for SOL_SOCKET on mptcp sockets · 83f0c10b
      Florian Westphal 提交于
      setsockopt(mptcp_fd, SOL_SOCKET, ...)...  appears to work (returns 0),
      but it has no effect -- this is because the MPTCP layer never has a
      chance to copy the settings to the subflow socket.
      
      Skip the generic handling for the mptcp case and instead call the
      mptcp specific handler instead for SOL_SOCKET too.
      
      Next patch adds more specific handling for SOL_SOCKET to mptcp.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83f0c10b
    • T
      selftests/net: update initializer syntax to use c99 designators · f551e2fd
      Tanner Love 提交于
      Before, clang version 9 threw errors such as: error:
      use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
                      { tstamp: true, swtstamp: true }
                        ^~~~~~~
                        .tstamp =
      Fix these warnings in tools/testing/selftests/net in the same manner as
      commit 121e357a ("selftests/harness: Update named initializer syntax").
      N.B. rxtimestamp.c is the only affected file in the directory.
      Signed-off-by: NTanner Love <tannerlove@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f551e2fd
    • D
      Merge branch 'bnx2x-Perform-IdleChk-dump' · 565f499c
      David S. Miller 提交于
      Sudarsana Reddy Kalluru says:
      
      ====================
      bnx2x: Perform IdleChk dump.
      
      Idlechk test verifies that the chip is in idle state. If there are any
      errors, Idlechk dump would capture the same. This data will help in
      debugging the device related issues.
      The patch series adds driver support for dumping IdleChk data during the
      debug dump collection.
      Patch (1) adds register definitions required in this implementation.
      Patch (2) adds the implementation for Idlechk tests.
      Patch (3) adds driver changes to invoke Idlechk implementation.
      
      Changes from previous version:
      -------------------------------
      v3: Combined the test data creation and implementation to a single patch.
      v2: Addressed issues reported by kernel test robot.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      565f499c
    • S
      bnx2x: Perform Idlechk dump during the debug collection. · a4666570
      Sudarsana Reddy Kalluru 提交于
      The patch adds driver changes to perform Idlechk dump during the debug
      data collection.
      Signed-off-by: NSudarsana Reddy Kalluru <skalluru@marvell.com>
      Signed-off-by: NIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4666570
    • S
      bnx2x: Add support for idlechk tests. · cdf711f2
      Sudarsana Reddy Kalluru 提交于
      This patch populates a database of idlechk tests (registers and
      predicates) and performs the idlechk using this data.
      Signed-off-by: NSudarsana Reddy Kalluru <skalluru@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cdf711f2
    • S
      bnx2x: Add Idlechk related register definitions. · 4365f35b
      Sudarsana Reddy Kalluru 提交于
      The patch adds register definitions required for Idlechk implementation.
      Signed-off-by: NSudarsana Reddy Kalluru <skalluru@marvell.com>
      Signed-off-by: NIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4365f35b
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · f91c031e
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2020-07-04
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      We've added 73 non-merge commits during the last 17 day(s) which contain
      a total of 106 files changed, 5233 insertions(+), 1283 deletions(-).
      
      The main changes are:
      
      1) bpftool ability to show PIDs of processes having open file descriptors
         for BPF map/program/link/BTF objects, relying on BPF iterator progs
         to extract this info efficiently, from Andrii Nakryiko.
      
      2) Addition of BPF iterator progs for dumping TCP and UDP sockets to
         seq_files, from Yonghong Song.
      
      3) Support access to BPF map fields in struct bpf_map from programs
         through BTF struct access, from Andrey Ignatov.
      
      4) Add a bpf_get_task_stack() helper to be able to dump /proc/*/stack
         via seq_file from BPF iterator progs, from Song Liu.
      
      5) Make SO_KEEPALIVE and related options available to bpf_setsockopt()
         helper, from Dmitry Yakunin.
      
      6) Optimize BPF sk_storage selection of its caching index, from Martin
         KaFai Lau.
      
      7) Removal of redundant synchronize_rcu()s from BPF map destruction which
         has been a historic leftover, from Alexei Starovoitov.
      
      8) Several improvements to test_progs to make it easier to create a shell
         loop that invokes each test individually which is useful for some CIs,
         from Jesper Dangaard Brouer.
      
      9) Fix bpftool prog dump segfault when compiled without skeleton code on
         older clang versions, from John Fastabend.
      
      10) Bunch of cleanups and minor improvements, from various others.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f91c031e
  2. 04 7月, 2020 16 次提交
  3. 03 7月, 2020 9 次提交
    • A
      net/mlx5e: Enhance TX timeout recovery · e6205564
      Aya Levin 提交于
      Upon a TX timeout handle, if the TX reporter was not able to recover
      from the error, reopen the channels. If tried to reopen channels, do not
      loop over TX queues for timeout.
      
      With that, the reporters state and separation will better
      expose the driver's state.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      e6205564
    • A
      net/mlx5e: Enhance ICOSQ data on RX reporter's diagnose · b8492112
      Aya Levin 提交于
      When the RQ is in striding RQ mode, it uses the ICOSQ as a helper queue.
      In this mode, RX reporter dumps more info about the ICOSQ and its
      related CQ.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
            CQ:
              stride size: 64 size: 1024
      RQs:
          channel ix: 0 rqn: 2413 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7
          CQ:
            cqn: 1032 HW status: 0 ci: 0 size: 1024
          EQ:
            eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048
          ICOSQ:
            sqn: 2411 HW state: 1 cc: 74 pc: 74 WQE size: 128
            CQ:
              cqn: 1029 cc: 8 size: 128
          channel ix: 1 rqn: 2418 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7
          CQ:
            cqn: 1036 HW status: 0 ci: 0 size: 1024
          EQ:
            eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048
          ICOSQ:
            sqn: 2416 HW state: 1 cc: 74 pc: 74 WQE size: 128
            CQ:
              cqn: 1033 cc: 8 size: 128
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      b8492112
    • A
      net/mlx5e: Add EQ info to TX/RX reporter's diagnose · 56837c2a
      Aya Levin 提交于
      Enhance TX/RX reporter's diagnose to include info about the
      corresponding EQ.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
            CQ:
              stride size: 64 size: 1024
      RQs:
          channel ix: 0 rqn: 1713 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
           CQ:
             cqn: 1032 HW status: 0 ci: 0 size: 1024
           EQ:
             eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048
           channel ix: 1 rqn: 1718 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
           CQ:
             cqn: 1036 HW status: 0 ci: 0 size: 1024
           EQ:
             eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter tx
      Common Config:
          SQ:
            stride size: 64 size: 1024
            CQ:
              stride size: 64 size: 1024
      SQs:
         channel ix: 0 tc: 0 txq ix: 0 sqn: 1712 HW state: 1 stopped: false cc: 91 pc: 91
         CQ:
           cqn: 1030 HW status: 0 ci: 91 size: 1024
         EQ:
           eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048
         channel ix: 1 tc: 0 txq ix: 1 sqn: 1717 HW state: 1 stopped: false cc: 0 pc: 0
         CQ:
           cqn: 1034 HW status: 0 ci: 0 size: 1024
         EQ:
           eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Reviewed-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      56837c2a
    • A
      net/mlx5e: Enhance CQ data on diagnose output · 3c9d1699
      Aya Levin 提交于
      Add CQ's consumer index and size to the CQ's diagnose output retruved on
      RX/TX reporter diadgnose.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
            CQ:
              stride size: 64 size: 1024
      RQs:
          channel ix: 0 rqn: 2413 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
          CQ:
            cqn: 1032 HW status: 0 ci: 0 size: 1024
          channel ix: 1 rqn: 2418 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
          CQ:
            cqn: 1036 HW status: 0 ci: 0 size: 1024
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter tx
      Common Config:
          SQ:
            stride size: 64 size: 1024
            CQ:
              stride size: 64 size: 1024
      SQs:
          channel ix: 0 tc: 0 txq ix: 0 sqn: 2412 HW state: 1 stopped: false cc: 0 pc: 0
          CQ:
            cqn: 1030 HW status: 0 ci: 0 size: 1024
          channel ix: 1 tc: 0 txq ix: 1 sqn: 2417 HW state: 1 stopped: false cc: 5 pc: 5
          CQ:
            cqn: 1034 HW status: 0 ci: 5 size: 1024
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      3c9d1699
    • A
      net/mlx5e: Rename reporter's helpers · d5cbedd7
      Aya Levin 提交于
      Change prefix to match resident file:
      %s/mlx5e_reporter_cq_diagnose/mlx5e_health_cq_diag_fmsg
      %s/mlx5e_reporter_cq_common_diagnose/mlx5e_health_cq_common_diag_fmsg
      %s/mlx5e_reporter_named_obj_nest_start/mlx5e_health_fmsg_named_obj_nest_start
      %s/mlx5e_reporter_named_obj_nest_end/mlx5e_health_fmsg_named_obj_nest_end
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      d5cbedd7
    • A
      net/mlx5e: Add helper to get the RQ WQE counter · de6c6ab7
      Aya Levin 提交于
      Add a helper which retrieves the RQ's WQE counter. Use this helper in
      the RX reporter diagnose callback.
      
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
        RQ:
           type: 2 stride size: 2048 size: 8
           CQ:
            stride size: 64 size: 1024
      RQs:
         channel ix: 0 rqn: 2113 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
         CQ:
          cqn: 1032 HW status: 0
         channel ix: 1 rqn: 2118 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1
         CQ:
          cqn: 1036 HW status: 0
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      de6c6ab7
    • A
      net/mlx5e: Add helper to get RQ WQE's head · fc42d0de
      Aya Levin 提交于
      Add helper which retrieves the RQ WQE's head. Use this helper in RX
      reporter diagnose callback.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      fc42d0de
    • A
      net/mlx5e: Move RQ helpers to txrx.h · 5d95c816
      Aya Levin 提交于
      Use txrx.h to contain helper function regarding TX/RX. In the coming
      patches, I will add more RQ helpers.
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      5d95c816
    • A
      net/mlx5e: Align RX/TX reporters diagnose output format · 4537f524
      Aya Levin 提交于
      Change the hierarchy of the RX reporter 'Common config' in the diagnose
      output to match the 'Common config' of the TX reporter which reflects
      that CQ is a helper to the traffic queues.
      
      Before:
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
          CQ:
            stride size: 64 size: 1024
          RQs:
          ...
      
      After:
      $ devlink health diagnose pci/0000:00:0b.0 reporter rx
      Common config:
          RQ:
            type: 2 stride size: 2048 size: 8
            CQ:
              stride size: 64 size: 1024
          RQs:
          ...
      Signed-off-by: NAya Levin <ayal@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      4537f524