1. Oct 13, 2023
    • Amit Cohen's avatar
      vxlan: vxlan_core: Support FDB flushing by destination port · ac0db4dd
      Amit Cohen authored
      
      
      Add support for flush VXLAN FDB entries by destination port. FDB entry
      is stored as {MAC, SRC_VNI} + remote. The destination port is an attribute
      of the remote. For multicast entries, the VXLAN driver stores a linked list
      of remotes for a given key.
      
      In user space, each remote is represented as a separate entry, so when
      flush is sent with filter of 'destination port', flush only the match
      remotes. In case that there are no additional remotes, destroy the entry.
      
      For example, the following are stored as one entry with several remotes:
      $ bridge fdb show dev vx10
      00:00:00:00:00:00 dst 192.1.1.1 port 1111 vni 2000 self permanent
      00:00:00:00:00:00 dst 192.1.1.1 port 1111 vni 3000 self permanent
      00:00:00:00:00:00 dst 192.1.1.1 port 2222 vni 2000 self permanent
      00:00:00:00:00:00 dst 192.1.1.1 vni 3000 self permanent
      
      When user flush by port x, only the relevant remotes will be flushed:
      $ bridge fdb flush dev vx10 port 1111
      
      $ bridge fdb show dev vx10
      00:00:00:00:00:00 dst 192.1.1.1 port 2222 vni 2000 self permanent
      00:00:00:00:00:00 dst 192.1.1.1 vni 3000 self permanent
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac0db4dd
    • Amit Cohen's avatar
      vxlan: vxlan_core: Support FDB flushing by destination VNI · c499fccb
      Amit Cohen authored
      
      
      Add support for flush VXLAN FDB entries by destination VNI. FDB entry is
      stored as {MAC, SRC_VNI} + remote. The destination VNI is an attribute
      of the remote. For multicast entries, the VXLAN driver stores a linked list
      of remotes for a given key.
      
      In user space, each remote is represented as a separate entry, so when
      flush is sent with filter of 'destination VNI', flush only the match
      remotes. In case that there are no additional remotes, destroy the entry.
      
      For example, the following are stored as one entry with several remotes:
      $ bridge fdb show dev vx10
      00:00:00:00:00:00 dst 192.1.1.1 vni 3000 self permanent
      00:00:00:00:00:00 dst 192.1.1.1 vni 4000 self permanent
      00:00:00:00:00:00 dst 192.1.1.1 vni 2000 self permanent
      00:00:00:00:00:00 dst 192.1.1.2 vni 2000 self permanent
      
      When user flush by VNI x, only the relevant remotes will be flushed:
      $ bridge fdb flush dev vx10 vni 2000
      
      $ bridge fdb show dev vx10
      00:00:00:00:00:00 dst 192.1.1.1 vni 3000 self permanent
      00:00:00:00:00:00 dst 192.1.1.1 vni 4000 self permanent
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c499fccb
    • Amit Cohen's avatar
      vxlan: vxlan_core: Support FDB flushing by nexthop ID · 36c11123
      Amit Cohen authored
      
      
      Add support for flush VXLAN FDB entries by nexthop ID.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36c11123
    • Amit Cohen's avatar
      vxlan: vxlan_core: Support FDB flushing by source VNI · a0f89d5e
      Amit Cohen authored
      
      
      Add support for flush VXLAN FDB entries by source VNI.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0f89d5e
    • Amit Cohen's avatar
      vxlan: vxlan_core: Add support for FDB flush · d324eb9c
      Amit Cohen authored
      The merge commit 92716869
      
       ("Merge branch 'br-flush-filtering'")
      added support for FDB flushing in bridge driver only, the VXLAN driver does
      not support such flushing. Extend VXLAN driver to support FDB flushing.
      In this commit, add support for flushing with state and flags, which are
      the fields that supported in the bridge driver.
      
      Note that bridge driver supports 'NTF_USE' flag, but there is no point to
      support this flag for flushing as it is ignored when flags are stored.
      'NTF_STICKY' is not relevant for VXLAN driver.
      
      'NTF_ROUTER' is not supported in bridge driver for flush as it is not
      relevant for bridge, add it for VXLAN.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d324eb9c
    • Amit Cohen's avatar
      vxlan: vxlan_core: Do not skip default entry in vxlan_flush() by default · 77b613ef
      Amit Cohen authored
      
      
      Currently, the function vxlan_flush() does not flush the default FDB entry
      (an entry with all_zeros_mac and default VNI), as it is deleted at
      vxlan_uninit(). When this function will be used for flushing FDB entries
      from user space, it will have to flush also the default entry in case that
      other parameters match (e.g., VNI, flags).
      
      Extend 'struct vxlan_fdb_flush_desc' to include an indication whether
      the default entry should be flushed or not. The default value (false)
      indicates to flush it, adjust all the existing callers to set
      '.ignore_default_entry' to true, so the current behavior will not be
      changed.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77b613ef
    • Amit Cohen's avatar
      vxlan: vxlan_core: Make vxlan_flush() more generic for future use · bfe36bf7
      Amit Cohen authored
      
      
      The function vxlan_flush() gets a boolean called 'do_all' and in case
      that it is false, it does not flush entries with state 'NUD_PERMANENT'
      or 'NUD_NOARP'. The following patches will add support for FDB flush
      with parameters from user space. Make the function more generic, so it
      can be used later.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bfe36bf7
    • Amit Cohen's avatar
      net: Handle bulk delete policy in bridge driver · 38985e8c
      Amit Cohen authored
      The merge commit 92716869
      
       ("Merge branch 'br-flush-filtering'")
      added support for FDB flushing in bridge driver. The following patches
      will extend VXLAN driver to support FDB flushing as well. The netlink
      message for bulk delete is shared between the drivers. With the existing
      implementation, there is no way to prevent user from flushing with
      attributes that are not supported per driver. For example, when VNI will
      be added, user will not get an error for flush FDB entries in bridge
      with VNI, although this attribute is not relevant for bridge.
      
      As preparation for support of FDB flush in VXLAN driver, move the policy
      to be handled in bridge driver, later a new policy for VXLAN will be
      added in VXLAN driver. Do not pass 'vid' as part of ndo_fdb_del_bulk(),
      as this field is relevant only for bridge.
      
      Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38985e8c
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 0e6bb5b7
      Jakub Kicinski authored
      Cross-merge networking fixes after downstream PR.
      
      No conflicts.
      
      Adjacent changes:
      
      kernel/bpf/verifier.c
        82995598 ("bpf: Fix verifier log for async callback return values")
        a923819f
      
       ("bpf: Treat first argument as return value for bpf_throw")
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0e6bb5b7
    • Linus Torvalds's avatar
      Merge tag 'net-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · e8c127b0
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from CAN and BPF.
      
        We have a regression in TC currently under investigation, otherwise
        the things that stand off most are probably the TCP and AF_PACKET
        fixes, with both issues coming from 6.5.
      
        Previous releases - regressions:
      
         - af_packet: fix fortified memcpy() without flex array.
      
         - tcp: fix crashes trying to free half-baked MTU probes
      
         - xdp: fix zero-size allocation warning in xskq_create()
      
         - can: sja1000: always restart the tx queue after an overrun
      
         - eth: mlx5e: again mutually exclude RX-FCS and RX-port-timestamp
      
         - eth: nfp: avoid rmmod nfp crash issues
      
         - eth: octeontx2-pf: fix page pool frag allocation warning
      
        Previous releases - always broken:
      
         - mctp: perform route lookups under a RCU read-side lock
      
         - bpf: s390: fix clobbering the caller's backchain in the trampoline
      
         - phy: lynx-28g: cancel the CDR check work item on the remove path
      
         - dsa: qca8k: fix qca8k driver for Turris 1.x
      
         - eth: ravb: fix use-after-free issue in ravb_tx_timeout_work()
      
         - eth: ixgbe: fix crash with empty VF macvlan list"
      
      * tag 'net-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (54 commits)
        rswitch: Fix imbalance phy_power_off() calling
        rswitch: Fix renesas_eth_sw_remove() implementation
        octeontx2-pf: Fix page pool frag allocation warning
        nfc: nci: assert requested protocol is valid
        af_packet: Fix fortified memcpy() without flex array.
        net: tcp: fix crashes trying to free half-baked MTU probes
        net/smc: Fix pos miscalculation in statistics
        nfp: flower: avoid rmmod nfp crash issues
        net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read
        ethtool: Fix mod state of verbose no_mask bitset
        net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()
        mctp: perform route lookups under a RCU read-side lock
        net: skbuff: fix kernel-doc typos
        s390/bpf: Fix unwinding past the trampoline
        s390/bpf: Fix clobbering the caller's backchain in the trampoline
        net/mlx5e: Again mutually exclude RX-FCS and RX-port-timestamp
        net/smc: Fix dependency of SMC on ISM
        ixgbe: fix crash with empty VF macvlan list
        net/mlx5e: macsec: use update_pn flag instead of PN comparation
        net: phy: mscc: macsec: reject PN update requests
        ...
      e8c127b0
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 9a5a1494
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "AngeloGioacchino Del Regno is stepping in as co-maintainer for the
        MediaTek SoC platform and starts by sending some dts fixes for the
        mt8195 platform that had been pending for a while.
      
        On the ixp4xx platform, Krzysztof Halasa steps down as co-maintainer,
        reflecting that Linus Walleij has been handling this on his own for
        the past few years.
      
        Generic RISC-V kernels are now marked as incompatible with the RZ/Five
        platform that requires custom hacks both for managing its DMA bounce
        buffers and for addressing low virtual memory.
      
       Finally, there is one bugfix for the AMDTEE firmware driver to prevent
       a use-after-free bug"
      
      * tag 'soc-fixes-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        IXP4xx MAINTAINERS entries
        arm64: dts: mediatek: mt8195: Set DSU PMU status to fail
        arm64: dts: mediatek: fix t-phy unit name
        arm64: dts: mediatek: mt8195-demo: update and reorder reserved memory regions
        arm64: dts: mediatek: mt8195-demo: fix the memory size to 8GB
        MAINTAINERS: Add Angelo as MediaTek SoC co-maintainer
        soc: renesas: Make ARCH_R9A07G043 (riscv version) depend on NONPORTABLE
        tee: amdtee: fix use-after-free vulnerability in amdtee_close_session
      9a5a1494
    • Linus Torvalds's avatar
      Merge tag 'pmdomain-v6.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm · 9b1ad4ba
      Linus Torvalds authored
      Pull pmdomain fix from Ulf Hansson:
      
       - imx: scu-pd: Correct the DMA2 channel
      
      * tag 'pmdomain-v6.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
        pmdomain: imx: scu-pd: correct DMA2 channel
      9b1ad4ba
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 82a040a8
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Some pin control fixes for v6.6 which have been stacking up in my
        tree.
      
        Dmitry's fix to some locking in the core is the most substantial, that
        was a really neat fix.
      
        The rest is the usual assorted spray of minor driver fixes.
      
         - Drop some minor code causing warnings in the Lantiq driver
      
         - Fix out of bounds write in the Nuvoton driver
      
         - Fix lost IRQs with CONFIG_PM in the Starfive driver
      
         - Fix a locking issue in find_pinctrl()
      
         - Revert a regressive Tegra debug patch
      
         - Fix the Renesas RZN1 pin muxing"
      
      * tag 'pinctrl-v6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: renesas: rzn1: Enable missing PINMUX
        Revert "pinctrl: tegra: Add support to display pin function"
        pinctrl: avoid unsafe code pattern in find_pinctrl()
        pinctrl: starfive: jh7110: Add system pm ops to save and restore context
        pinctrl: starfive: jh7110: Fix failure to set irq after CONFIG_PM is enabled
        pinctrl: nuvoton: wpcm450: fix out of bounds write
        pinctrl: lantiq: Remove unsued declaration ltq_pinctrl_unregister()
      82a040a8
  2. Oct 12, 2023