Skip to content
  1. Mar 05, 2019
    • Souptick Joarder's avatar
      selftest/net: Remove duplicate header · 9e9322e5
      Souptick Joarder authored
      
      
      Remove duplicate header which is included twice.
      
      Signed-off-by: default avatarSabyasachi Gupta <sabyasachi.linux@gmail.com>
      Signed-off-by: default avatarSouptick Joarder <jrdr.linux@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e9322e5
    • Kai-Heng Feng's avatar
      sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79 · b33b7cd6
      Kai-Heng Feng authored
      Some sky2 chips fire IRQ after S3, before the driver is fully resumed:
      [ 686.804877] do_IRQ: 1.37 No irq handler for vector
      
      This is likely a platform bug that device isn't fully quiesced during
      S3. Use MSI-X, maskable MSI or INTx can prevent this issue from
      happening.
      
      Since MSI-X and maskable MSI are not supported by this device, fallback
      to use INTx on affected platforms.
      
      BugLink: https://bugs.launchpad.net/bugs/1807259
      BugLink: https://bugs.launchpad.net/bugs/1809843
      
      
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b33b7cd6
    • David S. Miller's avatar
      Merge branch 'Devlink-health-updates' · d6089c74
      David S. Miller authored
      
      
      Eran Ben Elisha says:
      
      ====================
      Devlink health updates
      
      This patchset includes a fix [patch 01] to the devlink health state update, in
      case recover was aborted.
      
      In addition, it includes a small enhancement to the infrastructure in order to
      allow direct state update in run-time, and use it from mlx5e tx reporter.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d6089c74
    • Eran Ben Elisha's avatar
      net/mlx5e: Update tx reporter status in case channels were successfully opened · 86d7e714
      Eran Ben Elisha authored
      
      
      Once channels were successfully opened, update tx reporter health state to
      healthy. This is needed for the following scenario:
      - SQ has an un-recovered error reported to the devlink health, resulting tx
        reporter state to be error.
      - Current channels (including this SQ) are closed
      - New channels are opened
      After that flow, the original error was "solved", and tx reporter state
      should be healthy. However, as it was resolved as a side effect, and not
      via tx reporter recover method, driver needs to inform devlink health
      about it.
      
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86d7e714
    • Eran Ben Elisha's avatar
      devlink: Add support for direct reporter health state update · 3167b27a
      Eran Ben Elisha authored
      
      
      It is possible that a reporter state will be updated due to a recover flow
      which is not triggered by a devlink health related operation, but as a side
      effect of some other operation in the system.
      
      Expose devlink health API for a direct update of a reporter status.
      
      Move devlink_health_reporter_state enum definition to devlink.h so it could
      be used from drivers as a parameter of devlink_health_reporter_state_update.
      
      In addition, add trace_devlink_health_reporter_state_update to provide user
      notification for reporter state change.
      
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3167b27a
    • Eran Ben Elisha's avatar
      devlink: Update reporter state to error even if recover aborted · a0a21adb
      Eran Ben Elisha authored
      If devlink_health_report() aborted the recover flow due to grace period checker,
      it left the reporter status as DEVLINK_HEALTH_REPORTER_STATE_HEALTHY, which is
      a bug. Fix that by always setting the reporter state to
      DEVLINK_HEALTH_REPORTER_STATE_ERROR prior to running the checker mentioned above.
      
      In addition, save the previous health_state in a temporary variable, then use
      it in the abort check comparison instead of using reporter->health_state which
      might be already changed.
      
      Fixes: c8e1da0b
      
       ("devlink: Add health report functionality")
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0a21adb
    • Xin Long's avatar
      sctp: call iov_iter_revert() after sending ABORT · 901efe12
      Xin Long authored
      The user msg is also copied to the abort packet when doing SCTP_ABORT in
      sctp_sendmsg_check_sflags(). When SCTP_SENDALL is set, iov_iter_revert()
      should have been called for sending abort on the next asoc with copying
      this msg. Otherwise, memcpy_from_msg() in sctp_make_abort_user() will
      fail and return error.
      
      Fixes: 49102805
      
       ("sctp: add support for snd flag SCTP_SENDALL process in sendmsg")
      Reported-by: default avatarYing Xu <yinxu@redhat.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      901efe12
    • Ido Schimmel's avatar
      team: Free BPF filter when unregistering netdev · 692c31bd
      Ido Schimmel authored
      When team is used in loadbalance mode a BPF filter can be used to
      provide a hash which will determine the Tx port.
      
      When the netdev is later unregistered the filter is not freed which
      results in memory leaks [1].
      
      Fix by freeing the program and the corresponding filter when
      unregistering the netdev.
      
      [1]
      unreferenced object 0xffff8881dbc47cc8 (size 16):
        comm "teamd", pid 3068, jiffies 4294997779 (age 438.247s)
        hex dump (first 16 bytes):
          a3 00 6b 6b 6b 6b 6b 6b 88 a5 82 e1 81 88 ff ff  ..kkkkkk........
        backtrace:
          [<000000008a3b47e3>] team_nl_cmd_options_set+0x88f/0x11b0
          [<00000000c4f4f27e>] genl_family_rcv_msg+0x78f/0x1080
          [<00000000610ef838>] genl_rcv_msg+0xca/0x170
          [<00000000a281df93>] netlink_rcv_skb+0x132/0x380
          [<000000004d9448a2>] genl_rcv+0x29/0x40
          [<000000000321b2f4>] netlink_unicast+0x4c0/0x690
          [<000000008c25dffb>] netlink_sendmsg+0x929/0xe10
          [<00000000068298c5>] sock_sendmsg+0xc8/0x110
          [<0000000082a61ff0>] ___sys_sendmsg+0x77a/0x8f0
          [<00000000663ae29d>] __sys_sendmsg+0xf7/0x250
          [<0000000027c5f11a>] do_syscall_64+0x14d/0x610
          [<000000006cfbc8d3>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
          [<00000000e23197e2>] 0xffffffffffffffff
      unreferenced object 0xffff8881e182a588 (size 2048):
        comm "teamd", pid 3068, jiffies 4294997780 (age 438.247s)
        hex dump (first 32 bytes):
          20 00 00 00 02 00 00 00 30 00 00 00 28 f0 ff ff   .......0...(...
          07 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00  ........(.......
        backtrace:
          [<000000002daf01fb>] lb_bpf_func_set+0x45c/0x6d0
          [<000000008a3b47e3>] team_nl_cmd_options_set+0x88f/0x11b0
          [<00000000c4f4f27e>] genl_family_rcv_msg+0x78f/0x1080
          [<00000000610ef838>] genl_rcv_msg+0xca/0x170
          [<00000000a281df93>] netlink_rcv_skb+0x132/0x380
          [<000000004d9448a2>] genl_rcv+0x29/0x40
          [<000000000321b2f4>] netlink_unicast+0x4c0/0x690
          [<000000008c25dffb>] netlink_sendmsg+0x929/0xe10
          [<00000000068298c5>] sock_sendmsg+0xc8/0x110
          [<0000000082a61ff0>] ___sys_sendmsg+0x77a/0x8f0
          [<00000000663ae29d>] __sys_sendmsg+0xf7/0x250
          [<0000000027c5f11a>] do_syscall_64+0x14d/0x610
          [<000000006cfbc8d3>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
          [<00000000e23197e2>] 0xffffffffffffffff
      
      Fixes: 01d7f30a
      
       ("team: add loadbalance mode")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Reported-by: default avatarAmit Cohen <amitc@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      692c31bd
    • Ido Schimmel's avatar
      ip6mr: Do not call __IP6_INC_STATS() from preemptible context · 87c11f1d
      Ido Schimmel authored
      Similar to commit 44f49dd8 ("ipmr: fix possible race resulting from
      improper usage of IP_INC_STATS_BH() in preemptible context."), we cannot
      assume preemption is disabled when incrementing the counter and
      accessing a per-CPU variable.
      
      Preemption can be enabled when we add a route in process context that
      corresponds to packets stored in the unresolved queue, which are then
      forwarded using this route [1].
      
      Fix this by using IP6_INC_STATS() which takes care of disabling
      preemption on architectures where it is needed.
      
      [1]
      [  157.451447] BUG: using __this_cpu_add() in preemptible [00000000] code: smcrouted/2314
      [  157.460409] caller is ip6mr_forward2+0x73e/0x10e0
      [  157.460434] CPU: 3 PID: 2314 Comm: smcrouted Not tainted 5.0.0-rc7-custom-03635-g22f2712113f1 #1336
      [  157.460449] Hardware name: Mellanox Technologies Ltd. MSN2100-CB2FO/SA001017, BIOS 5.6.5 06/07/2016
      [  157.460461] Call Trace:
      [  157.460486]  dump_stack+0xf9/0x1be
      [  157.460553]  check_preemption_disabled+0x1d6/0x200
      [  157.460576]  ip6mr_forward2+0x73e/0x10e0
      [  157.460705]  ip6_mr_forward+0x9a0/0x1510
      [  157.460771]  ip6mr_mfc_add+0x16b3/0x1e00
      [  157.461155]  ip6_mroute_setsockopt+0x3cb/0x13c0
      [  157.461384]  do_ipv6_setsockopt.isra.8+0x348/0x4060
      [  157.462013]  ipv6_setsockopt+0x90/0x110
      [  157.462036]  rawv6_setsockopt+0x4a/0x120
      [  157.462058]  __sys_setsockopt+0x16b/0x340
      [  157.462198]  __x64_sys_setsockopt+0xbf/0x160
      [  157.462220]  do_syscall_64+0x14d/0x610
      [  157.462349]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: 0912ea38
      
       ("[IPV6] MROUTE: Add stats in multicast routing module method ip6_mr_forward().")
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Reported-by: default avatarAmit Cohen <amitc@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87c11f1d
    • Aditya Pakki's avatar
      isdn: mISDN: Fix potential NULL pointer dereference of kzalloc · 38d22659
      Aditya Pakki authored
      
      
      Allocating memory via kzalloc for phi may fail and causes a
      NULL pointer dereference. This patch avoids such a scenario.
      
      Signed-off-by: default avatarAditya Pakki <pakki001@umn.edu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38d22659
    • Heiner Kallweit's avatar
      net: dsa: mv88e6xxx: support in-band signalling on SGMII ports with external PHYs · 72d8b4fd
      Heiner Kallweit authored
      If an external PHY is connected via SGMII and uses in-band signalling
      then the auto-negotiated values aren't propagated to the port,
      resulting in a broken link. See discussion in [0]. This patch adds
      this propagation. We need to call mv88e6xxx_port_setup_mac(),
      therefore export it from chip.c.
      
      Successfully tested on a ZII DTU with 88E6390 switch and an
      Aquantia AQCS109 PHY connected via SGMII to port 9.
      
      [0] https://marc.info/?t=155130287200001&r=1&w=2
      
      
      
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72d8b4fd
    • Arjun Vynipadath's avatar
      cxgb4/chtls: Prefix adapter flags with CXGB4 · 80f61f19
      Arjun Vynipadath authored
      
      
      Some of these macros were conflicting with global namespace,
      hence prefixing them with CXGB4.
      
      Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
      Signed-off-by: default avatarVishal Kulkarni <vishal@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80f61f19
    • Andy Shevchenko's avatar
      net-sysfs: Switch to bitmap_zalloc() · 29ca1c5a
      Andy Shevchenko authored
      
      
      Switch to bitmap_zalloc() to show clearly what we are allocating.
      Besides that it returns pointer of bitmap type instead of opaque void *.
      
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      29ca1c5a
    • Andy Shevchenko's avatar
      mellanox: Switch to bitmap_zalloc() · 214fa1c4
      Andy Shevchenko authored
      
      
      Switch to bitmap_zalloc() to show clearly what we are allocating.
      Besides that it returns pointer of bitmap type instead of opaque void *.
      
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      214fa1c4
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · f7fb7c1a
      David S. Miller authored
      
      
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2019-03-04
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) Add AF_XDP support to libbpf. Rationale is to facilitate writing
         AF_XDP applications by offering higher-level APIs that hide many
         of the details of the AF_XDP uapi. Sample programs are converted
         over to this new interface as well, from Magnus.
      
      2) Introduce a new cant_sleep() macro for annotation of functions
         that cannot sleep and use it in BPF_PROG_RUN() to assert that
         BPF programs run under preemption disabled context, from Peter.
      
      3) Introduce per BPF prog stats in order to monitor the usage
         of BPF; this is controlled by kernel.bpf_stats_enabled sysctl
         knob where monitoring tools can make use of this to efficiently
         determine the average cost of programs, from Alexei.
      
      4) Split up BPF selftest's test_progs similarly as we already
         did with test_verifier. This allows to further reduce merge
         conflicts in future and to get more structure into our
         quickly growing BPF selftest suite, from Stanislav.
      
      5) Fix a bug in BTF's dedup algorithm which can cause an infinite
         loop in some circumstances; also various BPF doc fixes and
         improvements, from Andrii.
      
      6) Various BPF sample cleanups and migration to libbpf in order
         to further isolate the old sample loader code (so we can get
         rid of it at some point), from Jakub.
      
      7) Add a new BPF helper for BPF cgroup skb progs that allows
         to set ECN CE code point and a Host Bandwidth Manager (HBM)
         sample program for limiting the bandwidth used by v2 cgroups,
         from Lawrence.
      
      8) Enable write access to skb->queue_mapping from tc BPF egress
         programs in order to let BPF pick TX queue, from Jesper.
      
      9) Fix a bug in BPF spinlock handling for map-in-map which did
         not propagate spin_lock_off to the meta map, from Yonghong.
      
      10) Fix a bug in the new per-CPU BPF prog counters to properly
          initialize stats for each CPU, from Eric.
      
      11) Add various BPF helper prototypes to selftest's bpf_helpers.h,
          from Willem.
      
      12) Fix various BPF samples bugs in XDP and tracing progs,
          from Toke, Daniel and Yonghong.
      
      13) Silence preemption splat in test_bpf after BPF_PROG_RUN()
          enforces it now everywhere, from Anders.
      
      14) Fix a signedness bug in libbpf's btf_dedup_ref_type() to
          get error handling working, from Dan.
      
      15) Fix bpftool documentation and auto-completion with regards
          to stream_{verdict,parser} attach types, from Alban.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7fb7c1a
  2. Mar 04, 2019