1. 20 Mar, 2020 9 commits
    • Petr Machata's avatar
      net: tc_skbedit: Factor a helper out of is_tcf_skbedit_{mark, ptype}() · fe93f0b2
      Petr Machata authored
      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: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fe93f0b2
    • Dejin Zheng's avatar
      net: stmmac: dwmac_lib: remove unnecessary checks in dwmac_dma_reset() · 3fd177cb
      Dejin Zheng authored
      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: default avatarDejin Zheng <zhengdejin5@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3fd177cb
    • Antoine Tenart's avatar
      net: phy: mscc: add missing check on a phy_write return value · 09d65e6d
      Antoine Tenart authored
      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: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      09d65e6d
    • YueHaibing's avatar
      net: ipa: Remove unused including <linux/version.h> · 0e1a5773
      YueHaibing authored
      Remove including <linux/version.h> that don't need it.
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e1a5773
    • YueHaibing's avatar
      net: ipa: fix platform_no_drv_owner.cocci warnings · a351e7fb
      YueHaibing authored
      Remove .owner field if calls are used which set it automatically
      Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a351e7fb
    • YueHaibing's avatar
      liquidio: remove set but not used variable 's' · 4ab10bb8
      YueHaibing authored
      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: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ab10bb8
    • Ido Schimmel's avatar
      net: sched: Do not assume RTNL is held in tunnel key action helpers · 3ebaf6da
      Ido Schimmel authored
      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: default avatarIdo Schimmel <idosch@mellanox.com>
      Reviewed-by: default avatarJiri Pirko <jiri@mellanox.com>
      Reviewed-by: default avatarVlad Buslov <vladbu@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3ebaf6da
    • Nikolay Aleksandrov's avatar
      net: bridge: vlan: include stats in dumps if requested · 56d09976
      Nikolay Aleksandrov authored
      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: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56d09976
    • Paolo Abeni's avatar
      mptcp: rename fourth ack field · 0be534f5
      Paolo Abeni authored
      The name is misleading, it actually tracks the 'fully established'
      status.
      Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0be534f5
  2. 19 Mar, 2020 2 commits
  3. 18 Mar, 2020 29 commits