1. 20 3月, 2020 11 次提交
    • P
      mlxsw: core: Add QOS_ACTION · 4d745f8c
      Petr Machata 提交于
      The QOS_ACTION is used for manipulating the QoS attributes of a packet.
      Add the corresponding defines and helpers, in particular for the
      switch_priority override.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d745f8c
    • P
      net: tc_skbedit: Make the skbedit priority offloadable · 2ce12410
      Petr Machata 提交于
      The skbedit action "priority" is used for adjusting SKB priority. Allow
      drivers to offload the action by introducing two new skbedit getters and a
      new flow action, and initializing appropriately in tc_setup_flow_action().
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ce12410
    • P
      net: tc_skbedit: Factor a helper out of is_tcf_skbedit_{mark, ptype}() · fe93f0b2
      Petr Machata 提交于
      The two functions is_tcf_skbedit_mark() and is_tcf_skbedit_ptype() have a
      very similar structure. A follow-up patch will add one more such function.
      Instead of more cut'n'pasting, extract a helper function that checks
      whether a TC action is an skbedit with the required flag. Convert the two
      existing functions into thin wrappers around the helper.
      Signed-off-by: NPetr Machata <petrm@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe93f0b2
    • D
      net: stmmac: dwmac_lib: remove unnecessary checks in dwmac_dma_reset() · 3fd177cb
      Dejin Zheng 提交于
      it will check the return value of dwmac_dma_reset() in the
      stmmac_init_dma_engine() function and report an error if the
      return value is not zero. so don't need check here.
      Signed-off-by: NDejin Zheng <zhengdejin5@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3fd177cb
    • A
      net: phy: mscc: add missing check on a phy_write return value · 09d65e6d
      Antoine Tenart 提交于
      Commit a5afc167 ("net: phy: mscc: add support for VSC8584 PHY")
      introduced a call to 'phy_write' storing its return value to a variable
      called 'ret'. But 'ret' never was checked for a possible error being
      returned, and hence was not used at all. Fix this by checking the return
      value and exiting the function if an error was returned.
      
      As this does not fix a known bug, this commit is mostly cosmetic and not
      sent as a fix.
      Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      09d65e6d
    • Y
      net: ipa: Remove unused including <linux/version.h> · 0e1a5773
      YueHaibing 提交于
      Remove including <linux/version.h> that don't need it.
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e1a5773
    • Y
      net: ipa: fix platform_no_drv_owner.cocci warnings · a351e7fb
      YueHaibing 提交于
      Remove .owner field if calls are used which set it automatically
      Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: NAlex Elder <elder@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a351e7fb
    • Y
      liquidio: remove set but not used variable 's' · 4ab10bb8
      YueHaibing 提交于
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_chip_specific_setup':
      drivers/net/ethernet/cavium/liquidio/lio_main.c:1378:8: warning:
       variable 's' set but not used [-Wunused-but-set-variable]
      
      It's not used since commit b6334be6 ("net/liquidio: Delete driver version assignment")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ab10bb8
    • I
      net: sched: Do not assume RTNL is held in tunnel key action helpers · 3ebaf6da
      Ido Schimmel 提交于
      The cited commit removed RTNL from tc_setup_flow_action(), but the
      function calls two tunnel key action helpers that use rtnl_dereference()
      to fetch the action's parameters. This leads to "suspicious RCU usage"
      warnings [1][2].
      
      Change the helpers to use rcu_dereference_protected() while requiring
      the action's lock to be held. This is safe because the two helpers are
      only called from tc_setup_flow_action() which acquires the lock.
      
      [1]
      [  156.950855] =============================
      [  156.955463] WARNING: suspicious RCU usage
      [  156.960085] 5.6.0-rc5-custom-47426-gdfe43878d573 #2409 Not tainted
      [  156.967116] -----------------------------
      [  156.971728] include/net/tc_act/tc_tunnel_key.h:31 suspicious rcu_dereference_protected() usage!
      [  156.981583]
      [  156.981583] other info that might help us debug this:
      [  156.981583]
      [  156.990675]
      [  156.990675] rcu_scheduler_active = 2, debug_locks = 1
      [  156.998205] 1 lock held by tc/877:
      [  157.002187]  #0: ffff8881cbf7bea0 (&(&p->tcfa_lock)->rlock){+...}, at: tc_setup_flow_action+0xbe/0x4f78
      [  157.012866]
      [  157.012866] stack backtrace:
      [  157.017886] CPU: 2 PID: 877 Comm: tc Not tainted 5.6.0-rc5-custom-47426-gdfe43878d573 #2409
      [  157.027253] Hardware name: Mellanox Technologies Ltd. MSN2100-CB2FO/SA001017, BIOS 5.6.5 06/07/2016
      [  157.037389] Call Trace:
      [  157.040170]  dump_stack+0xfd/0x178
      [  157.044034]  lockdep_rcu_suspicious+0x14a/0x153
      [  157.049157]  tc_setup_flow_action+0x89f/0x4f78
      [  157.054227]  fl_hw_replace_filter+0x375/0x640
      [  157.064348]  fl_change+0x28ec/0x4f6b
      [  157.088843]  tc_new_tfilter+0x15e2/0x2260
      [  157.176801]  rtnetlink_rcv_msg+0x8d6/0xb60
      [  157.190915]  netlink_rcv_skb+0x177/0x460
      [  157.208884]  rtnetlink_rcv+0x21/0x30
      [  157.212925]  netlink_unicast+0x5d0/0x7f0
      [  157.227728]  netlink_sendmsg+0x981/0xe90
      [  157.245416]  ____sys_sendmsg+0x76d/0x8f0
      [  157.255348]  ___sys_sendmsg+0x10f/0x190
      [  157.320308]  __sys_sendmsg+0x115/0x1f0
      [  157.342553]  __x64_sys_sendmsg+0x7d/0xc0
      [  157.346987]  do_syscall_64+0xc1/0x600
      [  157.351142]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      [2]
      [  157.432346] =============================
      [  157.436937] WARNING: suspicious RCU usage
      [  157.441537] 5.6.0-rc5-custom-47426-gdfe43878d573 #2409 Not tainted
      [  157.448559] -----------------------------
      [  157.453204] include/net/tc_act/tc_tunnel_key.h:43 suspicious rcu_dereference_protected() usage!
      [  157.463042]
      [  157.463042] other info that might help us debug this:
      [  157.463042]
      [  157.472112]
      [  157.472112] rcu_scheduler_active = 2, debug_locks = 1
      [  157.479529] 1 lock held by tc/877:
      [  157.483442]  #0: ffff8881cbf7bea0 (&(&p->tcfa_lock)->rlock){+...}, at: tc_setup_flow_action+0xbe/0x4f78
      [  157.494119]
      [  157.494119] stack backtrace:
      [  157.499114] CPU: 2 PID: 877 Comm: tc Not tainted 5.6.0-rc5-custom-47426-gdfe43878d573 #2409
      [  157.508485] Hardware name: Mellanox Technologies Ltd. MSN2100-CB2FO/SA001017, BIOS 5.6.5 06/07/2016
      [  157.518628] Call Trace:
      [  157.521416]  dump_stack+0xfd/0x178
      [  157.525293]  lockdep_rcu_suspicious+0x14a/0x153
      [  157.530425]  tc_setup_flow_action+0x993/0x4f78
      [  157.535505]  fl_hw_replace_filter+0x375/0x640
      [  157.545650]  fl_change+0x28ec/0x4f6b
      [  157.570204]  tc_new_tfilter+0x15e2/0x2260
      [  157.658199]  rtnetlink_rcv_msg+0x8d6/0xb60
      [  157.672315]  netlink_rcv_skb+0x177/0x460
      [  157.690278]  rtnetlink_rcv+0x21/0x30
      [  157.694320]  netlink_unicast+0x5d0/0x7f0
      [  157.709129]  netlink_sendmsg+0x981/0xe90
      [  157.726813]  ____sys_sendmsg+0x76d/0x8f0
      [  157.736725]  ___sys_sendmsg+0x10f/0x190
      [  157.801721]  __sys_sendmsg+0x115/0x1f0
      [  157.823967]  __x64_sys_sendmsg+0x7d/0xc0
      [  157.828403]  do_syscall_64+0xc1/0x600
      [  157.832558]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: b15e7a6e ("net: sched: don't take rtnl lock during flow_action setup")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: NJiri Pirko <jiri@mellanox.com>
      Reviewed-by: NVlad Buslov <vladbu@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ebaf6da
    • N
      net: bridge: vlan: include stats in dumps if requested · 56d09976
      Nikolay Aleksandrov 提交于
      This patch adds support for vlan stats to be included when dumping vlan
      information. We have to dump them only when explicitly requested (thus the
      flag below) because that disables the vlan range compression and will make
      the dump significantly larger. In order to request the stats to be
      included we add a new dump attribute called BRIDGE_VLANDB_DUMP_FLAGS which
      can affect dumps with the following first flag:
        - BRIDGE_VLANDB_DUMPF_STATS
      The stats are intentionally nested and put into separate attributes to make
      it easier for extending later since we plan to add per-vlan mcast stats,
      drop stats and possibly STP stats. This is the last missing piece from the
      new vlan API which makes the dumped vlan information complete.
      
      A dump request which should include stats looks like:
       [BRIDGE_VLANDB_DUMP_FLAGS] |= BRIDGE_VLANDB_DUMPF_STATS
      
      A vlandb entry attribute with stats looks like:
       [BRIDGE_VLANDB_ENTRY] = {
           [BRIDGE_VLANDB_ENTRY_STATS] = {
               [BRIDGE_VLANDB_STATS_RX_BYTES]
               [BRIDGE_VLANDB_STATS_RX_PACKETS]
               ...
           }
       }
      Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56d09976
    • P
      mptcp: rename fourth ack field · 0be534f5
      Paolo Abeni 提交于
      The name is misleading, it actually tracks the 'fully established'
      status.
      Reviewed-by: NMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0be534f5
  2. 19 3月, 2020 27 次提交
  3. 18 3月, 2020 2 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · a58741ef
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for net-next:
      
      1) Use nf_flow_offload_tuple() to fetch flow stats, from Paul Blakey.
      
      2) Add new xt_IDLETIMER hard mode, from Manoj Basapathi.
         Follow up patch to clean up this new mode, from Dan Carpenter.
      
      3) Add support for geneve tunnel options, from Xin Long.
      
      4) Make sets built-in and remove modular infrastructure for sets,
         from Florian Westphal.
      
      5) Remove unused TEMPLATE_NULLS_VAL, from Li RongQing.
      
      6) Statify nft_pipapo_get, from Chen Wandun.
      
      7) Use C99 flexible-array member, from Gustavo A. R. Silva.
      
      8) More descriptive variable names for bitwise, from Jeremy Sowden.
      
      9) Four patches to add tunnel device hardware offload to the flowtable
         infrastructure, from wenxu.
      
      10) pipapo set supports for 8-bit grouping, from Stefano Brivio.
      
      11) pipapo can switch between nibble and byte grouping, also from
          Stefano.
      
      12) Add AVX2 vectorized version of pipapo, from Stefano Brivio.
      
      13) Update pipapo to be use it for single ranges, from Stefano.
      
      14) Add stateful expression support to elements via control plane,
          eg. counter per element.
      
      15) Re-visit sysctls in unprivileged namespaces, from Florian Westphal.
      
      15) Add new egress hook, from Lukas Wunner.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a58741ef
    • P
      mptcp: move msk state update to subflow_syn_recv_sock() · 7f20d5fc
      Paolo Abeni 提交于
      After commit 58b09919 ("mptcp: create msk early"), the
      msk socket is already available at subflow_syn_recv_sock()
      time. Let's move there the state update, to mirror more
      closely the first subflow state.
      
      The above will also help multiple subflow supports.
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: NMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7f20d5fc