1. 11 8月, 2021 13 次提交
    • N
      net: bridge: vlan: add support for mcast igmp/mld version global options · df271cd6
      Nikolay Aleksandrov 提交于
      Add support to change and retrieve global vlan IGMP/MLD versions.
      Signed-off-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df271cd6
    • D
      Merge branch 'ipa-runtime-pm' · 6899192f
      David S. Miller 提交于
      Alex Elder says:
      
      ====================
      net: ipa: use runtime PM reference counting
      
      This series does further rework of the IPA clock code so that we
      rely on some of the core runtime power management code (including
      its referencing counting) instead.
      
      The first patch makes ipa_clock_get() act like pm_runtime_get_sync().
      
      The second patch makes system suspend occur regardless of the
      current reference count value, which is again more like how the
      runtime PM core code behaves.
      
      The third patch creates functions to encapsulate all hardware
      suspend and resume activity.  The fourth uses those functions as
      the ->runtime_suspend and ->runtime_resume power callbacks.  With
      that in place, ipa_clock_get() and ipa_clock_put() are changed to
      use runtime PM get and put functions when needed.
      
      The fifth patch eliminates an extra clock reference previously used
      to control system suspend.  The sixth eliminates the "IPA clock"
      reference count and mutex.
      
      The final patch replaces the one call to ipa_clock_get_additional()
      with a call to pm_runtime_get_if_active(), making the former
      unnecessary.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6899192f
    • A
      net: ipa: kill ipa_clock_get_additional() · 0d08026a
      Alex Elder 提交于
      Now that ipa_clock_get_additional() is a trivial wrapper around
      pm_runtime_get_if_active(), just open-code it in its only caller
      and delete the function.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d08026a
    • A
      net: ipa: kill IPA clock reference count · a71aeff3
      Alex Elder 提交于
      The runtime power management core code maintains a usage count.  This
      count mirrors the IPA clock reference count, and there's no need to
      maintain both.  So get rid of the IPA clock reference count and just
      rely on the runtime PM usage count to determine when the hardware
      should be suspended or resumed.
      
      Use pm_runtime_get_if_active() in ipa_clock_get_additional().  We
      care whether power is active, regardless of whether it's in use, so
      pass true for its ign_usage_count argument.
      
      The IPA clock mutex is just used to make enabling/disabling the
      clock and updating the reference count occur atomically.  Without
      the reference count, there's no need for the mutex, so get rid of
      that too.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a71aeff3
    • A
      net: ipa: get rid of extra clock reference · a3d3e759
      Alex Elder 提交于
      Suspending the IPA hardware is now managed by the runtime PM core
      code.  The ->runtime_idle callback returns a non-zero value, so it
      will never suspend except when forced.  As a result, there's no need
      to take an extra "do not suspend" clock reference.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3d3e759
    • A
      net: ipa: use runtime PM core · 63de79f0
      Alex Elder 提交于
      Use the runtime power management core to cause hardware suspend and
      resume to occur.  Enable it in ipa_clock_init() (without autosuspend),
      and disable it in ipa_clock_exit().
      
      Use ipa_runtime_suspend() as the ->runtime_suspend power operation,
      and arrange for it to be called by having ipa_clock_get() call
      pm_runtime_get_sync() when the first clock reference is taken.
      Similarly, use ipa_runtime_resume() as the ->runtime_resume power
      operation, and pm_runtime_put() when the last IPA clock reference
      is dropped.
      
      Introduce ipa_runtime_idle() as the ->runtime_idle power operation,
      and have it return a non-zero value; this way suspend will never
      occur except when forced.
      
      Use pm_runtime_force_suspend() and pm_runtime_force_resume() as the
      system suspend and resume callbacks, and remove ipa_suspend() and
      ipa_resume().
      
      Store a pointer to the device structure passed to ipa_clock_init(),
      so it can be used by ipa_clock_exit() to disable runtime power
      management.
      
      For now we preserve IPA clock reference counting.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      63de79f0
    • A
      net: ipa: resume in ipa_clock_get() · 2abb0c7f
      Alex Elder 提交于
      Introduce ipa_runtime_suspend() and ipa_runtime_resume(), which
      encapsulate the activities necessary for suspending and resuming
      the IPA hardware.  Call these functions from ipa_clock_get() and
      ipa_clock_put() when the first reference is taken or last one is
      dropped.
      
      When the very first clock reference is taken (for ipa_config()),
      setup isn't complete yet, so (as before) only the core clock gets
      enabled.
      
      When the last clock reference is dropped (after ipa_deconfig()),
      ipa_teardown() will have made the setup_complete flag false, so
      there too, the core clock will be stopped without affecting GSI
      or the endpoints.
      
      Otherwise these new functions will perform the desired suspend and
      resume actions once setup is complete.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2abb0c7f
    • A
      net: ipa: disable clock in suspend · 1016c6b8
      Alex Elder 提交于
      Disable the IPA clock rather than dropping a reference to it in the
      system suspend callback.  This forces the suspend to occur without
      affecting existing references.
      
      Similarly, enable the clock rather than taking a reference in
      ipa_resume(), forcing a resume without changing the reference count.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1016c6b8
    • A
      net: ipa: have ipa_clock_get() return a value · 7ebd168c
      Alex Elder 提交于
      We currently assume no errors occur when enabling or disabling the
      IPA core clock and interconnects.  And although this commit exposes
      errors that could occur, we generally assume this won't happen in
      practice.
      
      This commit changes ipa_clock_get() and ipa_clock_put() so each
      returns a value.  The values returned are meant to mimic what the
      runtime power management functions return, so we can set up error
      handling here before we make the switch.  Have ipa_clock_get()
      increment the reference count even if it returns an error, to match
      the behavior of pm_runtime_get().
      
      More details follow.
      
      When taking a reference in ipa_clock_get(), return 0 for the first
      reference, 1 for subsequent references, or a negative error code if
      an error occurs.  Note that if ipa_clock_get() returns an error, we
      must not touch hardware; in some cases such errors now cause entire
      blocks of code to be skipped.
      
      When dropping a reference in ipa_clock_put(), we return 0 or an
      error code.  The error would come from ipa_clock_disable(), which
      now returns what ipa_interconnect_disable() returns (either 0 or a
      negative error code).  For now, callers ignore the return value;
      if an error occurs, a message will have already been logged, and
      little more can actually be done to improve the situation.
      Signed-off-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ebd168c
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 6f45933d
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for net-next:
      
      1) Use nfnetlink_unicast() instead of netlink_unicast() in nft_compat.
      
      2) Remove call to nf_ct_l4proto_find() in flowtable offload timeout
         fixup.
      
      3) CLUSTERIP registers ARP hook on demand, from Florian.
      
      4) Use clusterip_net to store pernet warning, also from Florian.
      
      5) Remove struct netns_xt, from Florian Westphal.
      
      6) Enable ebtables hooks in initns on demand, from Florian.
      
      7) Allow to filter conntrack netlink dump per status bits,
         from Florian Westphal.
      
      8) Register x_tables hooks in initns on demand, from Florian.
      
      9) Remove queue_handler from per-netns structure, again from Florian.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f45933d
    • L
      net: Support filtering interfaces on no master · d3432bf1
      Lahav Schlesinger 提交于
      Currently there's support for filtering neighbours/links for interfaces
      which have a specific master device (using the IFLA_MASTER/NDA_MASTER
      attributes).
      
      This patch adds support for filtering interfaces/neighbours dump for
      interfaces that *don't* have a master.
      Signed-off-by: NLahav Schlesinger <lschlesinger@drivenets.com>
      Reviewed-by: NDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/20210810090658.2778960-1-lschlesinger@drivenets.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      d3432bf1
    • M
      net/sched: cls_api, reset flags on replay · a5397d68
      Mark Bloch 提交于
      tc_new_tfilter() can replay a request if it got EAGAIN. The cited commit
      didn't account for this when it converted TC action ->init() API
      to use flags instead of parameters. This can lead to passing stale flags
      down the call chain which results in trying to lock rtnl when it's
      already locked, deadlocking the entire system.
      
      Fix by making sure to reset flags on each replay.
      
      ============================================
      WARNING: possible recursive locking detected
      5.14.0-rc3-custom-49011-g3d2bbb4f104d #447 Not tainted
      --------------------------------------------
      tc/37605 is trying to acquire lock:
      ffffffff841df2f0 (rtnl_mutex){+.+.}-{3:3}, at: tc_setup_cb_add+0x14b/0x4d0
      
      but task is already holding lock:
      ffffffff841df2f0 (rtnl_mutex){+.+.}-{3:3}, at: tc_new_tfilter+0xb12/0x22e0
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
             CPU0
             ----
        lock(rtnl_mutex);
        lock(rtnl_mutex);
      
       *** DEADLOCK ***
       May be due to missing lock nesting notation
      1 lock held by tc/37605:
       #0: ffffffff841df2f0 (rtnl_mutex){+.+.}-{3:3}, at: tc_new_tfilter+0xb12/0x22e0
      
      stack backtrace:
      CPU: 0 PID: 37605 Comm: tc Not tainted 5.14.0-rc3-custom-49011-g3d2bbb4f104d #447
      Hardware name: Mellanox Technologies Ltd. MSN2010/SA002610, BIOS 5.6.5 08/24/2017
      Call Trace:
       dump_stack_lvl+0x8b/0xb3
       __lock_acquire.cold+0x175/0x3cb
       lock_acquire+0x1a4/0x4f0
       __mutex_lock+0x136/0x10d0
       fl_hw_replace_filter+0x458/0x630 [cls_flower]
       fl_change+0x25f2/0x4a64 [cls_flower]
       tc_new_tfilter+0xa65/0x22e0
       rtnetlink_rcv_msg+0x86c/0xc60
       netlink_rcv_skb+0x14d/0x430
       netlink_unicast+0x539/0x7e0
       netlink_sendmsg+0x84d/0xd80
       ____sys_sendmsg+0x7ff/0x970
       ___sys_sendmsg+0xf8/0x170
       __sys_sendmsg+0xea/0x1b0
       do_syscall_64+0x35/0x80
       entry_SYSCALL_64_after_hwframe+0x44/0xae
      RIP: 0033:0x7f7b93b6c0a7
      Code: 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48>
      RSP: 002b:00007ffe365b3818 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
      RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7b93b6c0a7
      RDX: 0000000000000000 RSI: 00007ffe365b3880 RDI: 0000000000000003
      RBP: 00000000610a75f6 R08: 0000000000000001 R09: 0000000000000000
      R10: fffffffffffff3a9 R11: 0000000000000246 R12: 0000000000000001
      R13: 0000000000000000 R14: 00007ffe365b7b58 R15: 00000000004822c0
      
      Fixes: 695176bf ("net_sched: refactor TC action init API")
      Signed-off-by: NMark Bloch <mbloch@nvidia.com>
      Reviewed-by: NVlad Buslov <vladbu@nvidia.com>
      Reviewed-by: NIdo Schimmel <idosch@nvidia.com>
      Tested-by: NIdo Schimmel <idosch@nvidia.com>
      Link: https://lore.kernel.org/r/20210810034305.63997-1-mbloch@nvidia.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      a5397d68
    • J
      Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux · ebd0d30c
      Jakub Kicinski 提交于
      Saeed Mahameed says:
      
      ====================
      pull-request: mlx5-next 2020-08-9
      
      This pulls mlx5-next branch which includes patches already reviewed on
      net-next and rdma mailing lists.
      
      1) mlx5 single E-Switch FDB for lag
      
      2) IB/mlx5: Rename is_apu_thread_cq function to is_apu_cq
      
      3) Add DCS caps & fields support
      
      [1] https://patchwork.kernel.org/project/netdevbpf/cover/20210803231959.26513-1-saeed@kernel.org/
      
      [2] https://patchwork.kernel.org/project/netdevbpf/patch/0e3364dab7e0e4eea5423878b01aa42470be8d36.1626609184.git.leonro@nvidia.com/
      
      [3] https://patchwork.kernel.org/project/netdevbpf/patch/55e1d69bef1fbfa5cf195c0bfcbe35c8019de35e.1624258894.git.leonro@nvidia.com/
      
      * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux:
        net/mlx5: Lag, Create shared FDB when in switchdev mode
        net/mlx5: E-Switch, add logic to enable shared FDB
        net/mlx5: Lag, move lag destruction to a workqueue
        net/mlx5: Lag, properly lock eswitch if needed
        net/mlx5: Add send to vport rules on paired device
        net/mlx5: E-Switch, Add event callback for representors
        net/mlx5e: Use shared mappings for restoring from metadata
        net/mlx5e: Add an option to create a shared mapping
        net/mlx5: E-Switch, set flow source for send to uplink rule
        RDMA/mlx5: Add shared FDB support
        {net, RDMA}/mlx5: Extend send to vport rules
        RDMA/mlx5: Fill port info based on the relevant eswitch
        net/mlx5: Lag, add initial logic for shared FDB
        net/mlx5: Return mdev from eswitch
        IB/mlx5: Rename is_apu_thread_cq function to is_apu_cq
        net/mlx5: Add DCS caps & fields support
      ====================
      
      Link: https://lore.kernel.org/r/20210809202522.316930-1-saeed@kernel.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      ebd0d30c
  2. 10 8月, 2021 27 次提交