1. 29 10月, 2021 18 次提交
    • E
      bnxt_en: refactor cancellation of resource reservations · d900aadd
      Edwin Peer 提交于
      Resource reservations will also need to be reset after FUNC_DRV_UNRGTR
      in the following devlink driver_reinit patch. Extract this logic into a
      reusable function.
      Signed-off-by: NEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d900aadd
    • E
      bnxt_en: refactor printing of device info · c7dd4a5b
      Edwin Peer 提交于
      The device info logged during probe will be reused by the devlink
      driver_reinit code in a following patch. Extract this logic into
      the new bnxt_print_device_info() function. The board index needs
      to be saved in the driver context so that the board information
      can be retrieved at a later time, outside of the probe function.
      Reviewed-by: NSomnath Kotur <somnath.kotur@broadcom.com>
      Signed-off-by: NEdwin Peer <edwin.peer@broadcom.com>
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c7dd4a5b
    • J
      Merge branch 'code-movement-to-br_switchdev-c' · a812a046
      Jakub Kicinski 提交于
      Vladimir Oltean says:
      
      ====================
      Code movement to br_switchdev.c
      
      This is one more refactoring patch set for the Linux bridge, where more
      logic that is specific to switchdev is moved into br_switchdev.c, which
      is compiled out when CONFIG_NET_SWITCHDEV is disabled.
      ====================
      
      Link: https://lore.kernel.org/r/20211027162119.2496321-1-vladimir.oltean@nxp.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      a812a046
    • V
      net: bridge: switchdev: consistent function naming · 326b212e
      Vladimir Oltean 提交于
      Rename all recently imported functions in br_switchdev.c to start with a
      br_switchdev_* prefix.
      
      br_fdb_replay_one() -> br_switchdev_fdb_replay_one()
      br_fdb_replay() -> br_switchdev_fdb_replay()
      br_vlan_replay_one() -> br_switchdev_vlan_replay_one()
      br_vlan_replay() -> br_switchdev_vlan_replay()
      struct br_mdb_complete_info -> struct br_switchdev_mdb_complete_info
      br_mdb_complete() -> br_switchdev_mdb_complete()
      br_mdb_switchdev_host_port() -> br_switchdev_host_mdb_one()
      br_mdb_switchdev_host() -> br_switchdev_host_mdb()
      br_mdb_replay_one() -> br_switchdev_mdb_replay_one()
      br_mdb_replay() -> br_switchdev_mdb_replay()
      br_mdb_queue_one() -> br_switchdev_mdb_queue_one()
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      326b212e
    • V
      net: bridge: mdb: move all switchdev logic to br_switchdev.c · 9776457c
      Vladimir Oltean 提交于
      The following functions:
      
      br_mdb_complete
      br_switchdev_mdb_populate
      br_mdb_replay_one
      br_mdb_queue_one
      br_mdb_replay
      br_mdb_switchdev_host_port
      br_mdb_switchdev_host
      br_switchdev_mdb_notify
      
      are only accessible from code paths where CONFIG_NET_SWITCHDEV is
      enabled. So move them to br_switchdev.c, in order for that code to be
      compiled out if that config option is disabled.
      
      Note that br_switchdev.c gets build regardless of whether
      CONFIG_BRIDGE_IGMP_SNOOPING is enabled or not, whereas br_mdb.c only got
      built when CONFIG_BRIDGE_IGMP_SNOOPING was enabled. So to preserve
      correct compilation with CONFIG_BRIDGE_IGMP_SNOOPING being disabled, we
      must now place an #ifdef around these functions in br_switchdev.c.
      The offending bridge data structures that need this are
      br->multicast_lock and br->mdb_list, these are also compiled out of
      struct net_bridge when CONFIG_BRIDGE_IGMP_SNOOPING is turned off.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      9776457c
    • V
      net: bridge: split out the switchdev portion of br_mdb_notify · 9ae9ff99
      Vladimir Oltean 提交于
      Similar to fdb_notify() and br_switchdev_fdb_notify(), split the
      switchdev specific logic from br_mdb_notify() into a different function.
      This will be moved later in br_switchdev.c.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      9ae9ff99
    • V
      net: bridge: move br_vlan_replay to br_switchdev.c · 4a6849e4
      Vladimir Oltean 提交于
      br_vlan_replay() is relevant only if CONFIG_NET_SWITCHDEV is enabled, so
      move it to br_switchdev.c.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      4a6849e4
    • V
      net: bridge: provide shim definition for br_vlan_flags · c5f6e5eb
      Vladimir Oltean 提交于
      br_vlan_replay() needs this, and we're preparing to move it to
      br_switchdev.c, which will be compiled regardless of whether or not
      CONFIG_BRIDGE_VLAN_FILTERING is enabled.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      c5f6e5eb
    • J
      Merge branch 'mlxsw-offload-root-tbf-as-port-shaper' · d57beb0e
      Jakub Kicinski 提交于
      Ido Schimmel says:
      
      ====================
      mlxsw: Offload root TBF as port shaper
      
      Petr says:
      
      Egress configuration in an mlxsw deployment would generally have an ETS
      qdisc at root, with a number of bands and a priority dispatch between them.
      Some of those bands could then have a RED and/or TBF qdiscs attached.
      
      When TBF is used like this, mlxsw configures shaper on a subgroup, which is
      the pair of traffic classes (UC + BUM) corresponding to the band where TBF
      is installed. This way it is possible to limit traffic on several bands
      (subgroups) independently by configuring several TBF qdiscs, each on a
      different band.
      
      It is however not possible to limit traffic flowing through the port as
      such. The ASIC supports this through port shapers (as opposed to the
      abovementioned subgroup shapers). An obvious way to express this as a user
      would be to configure a root TBF qdisc, and then add the whole ETS
      hierarchy as its child.
      
      TBF (and RED) can currently be used as a root qdisc. This usage has always
      been accepted as a special case, when only one subgroup is configured, and
      that is the subgroup that root TBF and RED configure. However it was never
      possible to install ETS under that TBF.
      
      In this patchset, this limitation is relaxed. TBF qdisc in root position is
      now always offloaded as a port shaper. Such TBF qdisc does not limit
      offload of further children. It is thus possible to configure the usual
      priority classification through ETS, with RED and/or TBF on individual
      bands, all that below a port-level TBF. For example:
      
          (1) # tc qdisc replace dev swp1 root handle 1: tbf rate 800mbit burst 16kb limit 1M
          (2) # tc qdisc replace dev swp1 parent 1:1 handle 11: ets strict 8 priomap 7 6 5 4 3 2 1 0
          (3) # tc qdisc replace dev swp1 parent 11:1 handle 111: tbf rate 600mbit burst 16kb limit 1M
          (4) # tc qdisc replace dev swp1 parent 11:2 handle 112: tbf rate 600mbit burst 16kb limit 1M
      
      Here, (1) configures a 800-Mbps port shaper, (2) adds an ETS element with 8
      strictly-prioritized bands, and (3) and (4) configure two more shapers,
      each 600 Mbps, one under 11:1 (band 0, TCs 7 and 15), one under 11:2 (band
      1, TCs 6 and 14). This way, traffic on bands 0 and 1 are each independently
      capped at 600 Mbps, and at the same time, traffic through the port as a
      whole is capped at 800 Mbps.
      
      In patch #1, TBF is permitted as root qdisc, under which the usual qdisc
      tree can be installed.
      
      In patch #2, the qdisc offloadability selftest is extended to cover the
      root TBF as well.
      
      Patch #3 then tests that the offloaded TBF shapes as expected.
      ====================
      
      Link: https://lore.kernel.org/r/20211027152001.1320496-1-idosch@idosch.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      d57beb0e
    • P
      selftests: mlxsw: Test port shaper · 2b11e24e
      Petr Machata 提交于
      TBF can be used as a root qdisc, in which case it is supposed to configure
      port shaper. Add a test that verifies that this is so by installing a root
      TBF with a ETS or PRIO below it, and then expecting individual bands to all
      be shaped according to the root TBF configuration.
      Signed-off-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      2b11e24e
    • P
      selftests: mlxsw: Test offloadability of root TBF · 3d5290ea
      Petr Machata 提交于
      TBF can be used as a root qdisc, with the usual ETS/RED/TBF hierarchy below
      it. This use should now be offloaded. Add a test that verifies that it is.
      Signed-off-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      3d5290ea
    • P
      mlxsw: spectrum_qdisc: Offload root TBF as port shaper · 48e4d00b
      Petr Machata 提交于
      The Spectrum ASIC allows configuration of maximum shaper on all levels of
      the scheduling hierarchy: TCs, subgroups, groups and also ports. Currently,
      TBF always configures a subgroup. But a user could reasonably express the
      intent to configure port shaper by putting TBF to a root position, around
      ETS / PRIO. Accept this usage and offload appropriately.
      Signed-off-by: NPetr Machata <petrm@nvidia.com>
      Signed-off-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      48e4d00b
    • J
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 7df621a3
      Jakub Kicinski 提交于
      include/net/sock.h
        7b50ecfc ("net: Rename ->stream_memory_read to ->sock_is_readable")
        4c1e34c0 ("vsock: Enable y2038 safe timeval for timeout")
      
      drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
        0daa55d0 ("octeontx2-af: cn10k: debugfs for dumping LMTST map table")
        e77bcdd1 ("octeontx2-af: Display all enabled PF VF rsrc_alloc entries.")
      
      Adjacent code addition in both cases, keep both.
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      7df621a3
    • L
      Merge tag 'net-5.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 411a44c2
      Linus Torvalds 提交于
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from WiFi (mac80211), and BPF.
      
        Current release - regressions:
      
         - skb_expand_head: adjust skb->truesize to fix socket memory
           accounting
      
         - mptcp: fix corrupt receiver key in MPC + data + checksum
      
        Previous releases - regressions:
      
         - multicast: calculate csum of looped-back and forwarded packets
      
         - cgroup: fix memory leak caused by missing cgroup_bpf_offline
      
         - cfg80211: fix management registrations locking, prevent list
           corruption
      
         - cfg80211: correct false positive in bridge/4addr mode check
      
         - tcp_bpf: fix race in the tcp_bpf_send_verdict resulting in reusing
           previous verdict
      
        Previous releases - always broken:
      
         - sctp: enhancements for the verification tag, prevent attackers from
           killing SCTP sessions
      
         - tipc: fix size validations for the MSG_CRYPTO type
      
         - mac80211: mesh: fix HE operation element length check, prevent out
           of bound access
      
         - tls: fix sign of socket errors, prevent positive error codes being
           reported from read()/write()
      
         - cfg80211: scan: extend RCU protection in
           cfg80211_add_nontrans_list()
      
         - implement ->sock_is_readable() for UDP and AF_UNIX, fix poll() for
           sockets in a BPF sockmap
      
         - bpf: fix potential race in tail call compatibility check resulting
           in two operations which would make the map incompatible succeeding
      
         - bpf: prevent increasing bpf_jit_limit above max
      
         - bpf: fix error usage of map_fd and fdget() in generic batch update
      
         - phy: ethtool: lock the phy for consistency of results
      
         - prevent infinite while loop in skb_tx_hash() when Tx races with
           driver reconfiguring the queue <> traffic class mapping
      
         - usbnet: fixes for bad HW conjured by syzbot
      
         - xen: stop tx queues during live migration, prevent UAF
      
         - net-sysfs: initialize uid and gid before calling
           net_ns_get_ownership
      
         - mlxsw: prevent Rx stalls under memory pressure"
      
      * tag 'net-5.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (67 commits)
        Revert "net: hns3: fix pause config problem after autoneg disabled"
        mptcp: fix corrupt receiver key in MPC + data + checksum
        riscv, bpf: Fix potential NULL dereference
        octeontx2-af: Fix possible null pointer dereference.
        octeontx2-af: Display all enabled PF VF rsrc_alloc entries.
        octeontx2-af: Check whether ipolicers exists
        net: ethernet: microchip: lan743x: Fix skb allocation failure
        net/tls: Fix flipped sign in async_wait.err assignment
        net/tls: Fix flipped sign in tls_err_abort() calls
        net/smc: Correct spelling mistake to TCPF_SYN_RECV
        net/smc: Fix smc_link->llc_testlink_time overflow
        nfp: bpf: relax prog rejection for mtu check through max_pkt_offset
        vmxnet3: do not stop tx queues after netif_device_detach()
        r8169: Add device 10ec:8162 to driver r8169
        ptp: Document the PTP_CLK_MAGIC ioctl number
        usbnet: fix error return code in usbnet_probe()
        net: hns3: adjust string spaces of some parameters of tx bd info in debugfs
        net: hns3: expand buffer len for some debugfs command
        net: hns3: add more string spaces for dumping packets number of queue info in debugfs
        net: hns3: fix data endian problem of some functions of debugfs
        ...
      411a44c2
    • L
      Merge tag 'spi-fix-v5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 4fb7d85b
      Linus Torvalds 提交于
      Pull spi fixes from Mark Brown:
       "A couple of final driver specific fixes for v5.15, one fixing
        potential ID collisions between two instances of the Altera driver and
        one making Microwire full duplex mode actually work on pl022"
      
      * tag 'spi-fix-v5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: spl022: fix Microwire full duplex mode
        spi: altera: Change to dynamic allocation of spi id
      4fb7d85b
    • L
      Merge tag 'regmap-fix-v5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 8685de2e
      Linus Torvalds 提交于
      Pull regmap fix from Mark Brown:
       "This fixes a potential double free when handling an out of memory
        error inserting a node into an rbtree regcache"
      
      * tag 'regmap-fix-v5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: Fix possible double-free in regcache_rbtree_exit()
      8685de2e
    • L
      Merge tag 'linux-watchdog-5.15-rc7' of git://www.linux-watchdog.org/linux-watchdog · eecd231a
      Linus Torvalds 提交于
      Pull watchdog fixes from Wim Van Sebroeck:
       "I overlooked Guenters request to sent this upstream earlier, so it's a
        bit late in the release cycle.
      
        This contains:
      
         - Revert "watchdog: iTCO_wdt: Account for rebooting on second
           timeout"
      
         - sbsa: only use 32-bit accessors
      
         - sbsa: drop unneeded MODULE_ALIAS
      
         - ixp4xx_wdt: Fix address space warning
      
         - Fix OMAP watchdog early handling"
      
      * tag 'linux-watchdog-5.15-rc7' of git://www.linux-watchdog.org/linux-watchdog:
        watchdog: Fix OMAP watchdog early handling
        watchdog: ixp4xx_wdt: Fix address space warning
        watchdog: sbsa: drop unneeded MODULE_ALIAS
        watchdog: sbsa: only use 32-bit accessors
        Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout"
      eecd231a
    • L
      Merge tag 'trace-v5.15-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · fc18cc89
      Linus Torvalds 提交于
      Pull tracing fix from Steven Rostedt:
       "Do not WARN when attaching event probe to non-existent event
      
        If the user tries to attach an event probe (eprobe) to an event that
        does not exist, it will trigger a warning. There's an error check that
        only expects memory issues otherwise it is considered a bug. But
        changes in the code to move around the locking made it that it can
        error out if the user attempts to attach to an event that does not
        exist, returning an -ENODEV. As this path can be caused by user space
        putting in a bad value, do not trigger a WARN"
      
      * tag 'trace-v5.15-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Do not warn when connecting eprobe to non existing event
      fc18cc89
  2. 28 10月, 2021 22 次提交