1. Mar 20, 2020
    • 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. Mar 19, 2020
  3. Mar 18, 2020
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · a58741ef
      David S. Miller authored
      
      
      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: default avatarDavid S. Miller <davem@davemloft.net>
      a58741ef
    • Paolo Abeni's avatar
      mptcp: move msk state update to subflow_syn_recv_sock() · 7f20d5fc
      Paolo Abeni authored
      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: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f20d5fc
    • David S. Miller's avatar
      Merge branch 'net-add-phylink-support-for-PCS' · 5dd32845
      David S. Miller authored
      
      
      Russell King says:
      
      ====================
      net: add phylink support for PCS
      
      This series adds support for IEEE 802.3 register set compliant PCS
      for phylink.  In order to do this, we:
      
      1. convert BUG_ON() in existing accessors to WARN_ON_ONCE() and return
         an error.
      2. add accessors for modifying a MDIO device register, and use them in
         phylib, rather than duplicating the code from phylib.
      3. add support for decoding the advertisement from clause 22 compatible
         register sets for clause 37 advertisements and SGMII advertisements.
      4. add support for clause 45 register sets for 10GBASE-R PCS.
      
      These have been tested on the LX2160A Clearfog-CX platform.
      
      v2: eliminate use of BUG_ON() in the accessors.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5dd32845
    • Russell King's avatar
      net: phylink: pcs: add 802.3 clause 45 helpers · b8679ef8
      Russell King authored
      
      
      Implement helpers for PCS accessed via the MII bus using 802.3 clause
      45 cycles for 10GBASE-R. Only link up/down is supported, 10G full
      duplex is assumed.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8679ef8
    • Russell King's avatar
      net: phylink: pcs: add 802.3 clause 22 helpers · 74db1c18
      Russell King authored
      
      
      Implement helpers for PCS accessed via the MII bus using 802.3 clause
      22 cycles, conforming to 802.3 clause 37 and Cisco SGMII specifications
      for the advertisement word.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74db1c18
    • Russell King's avatar
      net: mdiobus: add APIs for modifying a MDIO device register · 6cc7cf81
      Russell King authored
      
      
      Add APIs for modifying a MDIO device register, similar to the existing
      phy_modify() group of functions, but at mdiobus level instead.  Adapt
      __phy_modify_changed() to use the new mdiobus level helper.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cc7cf81