1. 16 Aug, 2024 27 commits
  2. 15 Aug, 2024 13 commits
    • Linus Torvalds's avatar
      Merge tag 'net-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · a4a35f6c
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from wireless and netfilter
      
        Current release - regressions:
      
         - udp: fall back to software USO if IPv6 extension headers are
           present
      
         - wifi: iwlwifi: correctly lookup DMA address in SG table
      
        Current release - new code bugs:
      
         - eth: mlx5e: fix queue stats access to non-existing channels splat
      
        Previous releases - regressions:
      
         - eth: mlx5e: take state lock during tx timeout reporter
      
         - eth: mlxbf_gige: disable RX filters until RX path initialized
      
         - eth: igc: fix reset adapter logics when tx mode change
      
        Previous releases - always broken:
      
         - tcp: update window clamping condition
      
         - netfilter:
            - nf_queue: drop packets with cloned unconfirmed conntracks
            - nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests
      
         - vsock: fix recursive ->recvmsg calls
      
         - dsa: vsc73xx: fix MDIO bus access and PHY opera
      
         - eth: gtp: pull network headers in gtp_dev_xmit()
      
         - eth: igc: fix packet still tx after gate close by reducing i226 MAC
           retry buffer
      
         - eth: mana: fix RX buf alloc_size alignment and atomic op panic
      
         - eth: hns3: fix a deadlock problem when config TC during resetting"
      
      * tag 'net-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (58 commits)
        net: hns3: use correct release function during uninitialization
        net: hns3: void array out of bound when loop tnl_num
        net: hns3: fix a deadlock problem when config TC during resetting
        net: hns3: use the user's cfg after reset
        net: hns3: fix wrong use of semaphore up
        selftests: net: lib: kill PIDs before del netns
        pse-core: Conditionally set current limit during PI regulator registration
        net: thunder_bgx: Fix netdev structure allocation
        net: ethtool: Allow write mechanism of LPL and both LPL and EPL
        vsock: fix recursive ->recvmsg calls
        selftest: af_unix: Fix kselftest compilation warnings
        netfilter: nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests
        netfilter: nf_tables: Introduce nf_tables_getobj_single
        netfilter: nf_tables: Audit log dump reset after the fact
        selftests: netfilter: add test for br_netfilter+conntrack+queue combination
        netfilter: nf_queue: drop packets with cloned unconfirmed conntracks
        netfilter: flowtable: initialise extack before use
        netfilter: nfnetlink: Initialise extack before use in ACKs
        netfilter: allow ipv6 fragments to arrive on different devices
        tcp: Update window clamping condition
        ...
      a4a35f6c
    • Linus Torvalds's avatar
      Merge tag 'media/v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 20573d8e
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       "Two regression fixes:
      
         - fix atomisp support for ISP2400
      
         - fix dvb-usb regression for TeVii s480 dual DVB-S2 S660 board"
      
      * tag 'media/v6.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        media: atomisp: Fix streaming no longer working on BYT / ISP2400 devices
        media: Revert "media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()"
      20573d8e
    • Linus Torvalds's avatar
      Merge tag 'ata-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux · 6e80a1fd
      Linus Torvalds authored
      Pull ata fix from Niklas Cassel:
      
       - Revert a recent change to sense data generation.
      
         Sense data can be in either fixed format or descriptor format.
      
         The D_SENSE bit in the Control mode page controls which format to
         generate. All places but one respected the D_SENSE bit.
      
         The recent change fixed the one place that didn't respect the D_SENSE
         bit. However, it turns out that hdparm, hddtemp and udisks
         (incorrectly) assumes sense data in descriptor format.
      
         Therefore, even while the change was technically correct, revert it,
         since even if these user space programs are fixed to (correctly) look
         at the format type before parsing the data, older versions of these
         tools will be around roughly forever.
      
      * tag 'ata-6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
        Revert "ata: libata-scsi: Honor the D_SENSE bit for CK_COND=1 and no error"
      6e80a1fd
    • Paolo Abeni's avatar
      Merge tag 'nf-24-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 9c5af2d7
      Paolo Abeni authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      1) Ignores ifindex for types other than mcast/linklocal in ipv6 frag
         reasm, from Tom Hughes.
      
      2) Initialize extack for begin/end netlink message marker in batch,
         from Donald Hunter.
      
      3) Initialize extack for flowtable offload support, also from Donald.
      
      4) Dropped packets with cloned unconfirmed conntracks in nfqueue,
         later it should be possible to explore lookup after reinject but
         Florian prefers this approach at this stage. From Florian Westphal.
      
      5) Add selftest for cloned unconfirmed conntracks in nfqueue for
         previous update.
      
      6) Audit after filling netlink header successfully in object dump,
         from Phil Sutter.
      
      7-8) Fix concurrent dump and reset which could result in underflow
           counter / quota objects.
      
      netfilter pull request 24-08-15
      
      * tag 'nf-24-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests
        netfilter: nf_tables: Introduce nf_tables_getobj_single
        netfilter: nf_tables: Audit log dump reset after the fact
        selftests: netfilter: add test for br_netfilter+conntrack+queue combination
        netfilter: nf_queue: drop packets with cloned unconfirmed conntracks
        netfilter: flowtable: initialise extack before use
        netfilter: nfnetlink: Initialise extack before use in ACKs
        netfilter: allow ipv6 fragments to arrive on different devices
      ====================
      
      Link: https://patch.msgid.link/20240814222042.150590-1-pablo@netfilter.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      9c5af2d7
    • Paolo Abeni's avatar
      Merge branch 'there-are-some-bugfix-for-the-hns3-ethernet-driver' · 34dfdf21
      Paolo Abeni authored
      Jijie Shao says:
      
      ====================
      There are some bugfix for the HNS3 ethernet driver
      ====================
      
      Link: https://patch.msgid.link/20240813141024.1707252-1-shaojijie@huawei.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      34dfdf21
    • Peiyang Wang's avatar
      net: hns3: use correct release function during uninitialization · 7660833d
      Peiyang Wang authored
      pci_request_regions is called to apply for PCI I/O and memory resources
      when the driver is initialized, Therefore, when the driver is uninstalled,
      pci_release_regions should be used to release PCI I/O and memory resources
      instead of pci_release_mem_regions is used to release memory reasouces
      only.
      Signed-off-by: default avatarPeiyang Wang <wangpeiyang1@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      7660833d
    • Peiyang Wang's avatar
      net: hns3: void array out of bound when loop tnl_num · 86db7bfb
      Peiyang Wang authored
      When query reg inf of SSU, it loops tnl_num times. However, tnl_num comes
      from hardware and the length of array is a fixed value. To void array out
      of bound, make sure the loop time is not greater than the length of array
      Signed-off-by: default avatarPeiyang Wang <wangpeiyang1@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      86db7bfb
    • Jie Wang's avatar
      net: hns3: fix a deadlock problem when config TC during resetting · be5e816d
      Jie Wang authored
      When config TC during the reset process, may cause a deadlock, the flow is
      as below:
                                   pf reset start
                                       │
                                       ▼
                                    ......
      setup tc                         │
          │                            ▼
          ▼                      DOWN: napi_disable()
      napi_disable()(skip)             │
          │                            │
          ▼                            ▼
        ......                      ......
          │                            │
          ▼                            │
      napi_enable()                    │
                                       ▼
                                 UINIT: netif_napi_del()
                                       │
                                       ▼
                                    ......
                                       │
                                       ▼
                                 INIT: netif_napi_add()
                                       │
                                       ▼
                                    ......                 global reset start
                                       │                      │
                                       ▼                      ▼
                                 UP: napi_enable()(skip)    ......
                                       │                      │
                                       ▼                      ▼
                                    ......                 napi_disable()
      
      In reset process, the driver will DOWN the port and then UINIT, in this
      case, the setup tc process will UP the port before UINIT, so cause the
      problem. Adds a DOWN process in UINIT to fix it.
      
      Fixes: bb6b94a8 ("net: hns3: Add reset interface implementation in client")
      Signed-off-by: default avatarJie Wang <wangjie125@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      be5e816d
    • Peiyang Wang's avatar
      net: hns3: use the user's cfg after reset · 30545e17
      Peiyang Wang authored
      Consider the followed case that the user change speed and reset the net
      interface. Before the hw change speed successfully, the driver get old
      old speed from hw by timer task. After reset, the previous speed is config
      to hw. As a result, the new speed is configed successfully but lost after
      PF reset. The followed pictured shows more dirrectly.
      
      +------+              +----+                 +----+
      | USER |              | PF |                 | HW |
      +---+--+              +-+--+                 +-+--+
          |  ethtool -s 100G  |                      |
          +------------------>|   set speed 100G     |
          |                   +--------------------->|
          |                   |  set successfully    |
          |                   |<---------------------+---+
          |                   |query cfg (timer task)|   |
          |                   +--------------------->|   | handle speed
          |                   |     return 200G      |   | changing event
          |  ethtool --reset  |<---------------------+   | (100G)
          +------------------>|  cfg previous speed  |<--+
          |                   |  after reset (200G)  |
          |                   +--------------------->|
          |                   |                      +---+
          |                   |query cfg (timer task)|   |
          |                   +--------------------->|   | handle speed
          |                   |     return 100G      |   | changing event
          |                   |<---------------------+   | (200G)
          |                   |                      |<--+
          |                   |query cfg (timer task)|
          |                   +--------------------->|
          |                   |     return 200G      |
          |                   |<---------------------+
          |                   |                      |
          v                   v                      v
      
      This patch save new speed if hw change speed successfully, which will be
      used after reset successfully.
      
      Fixes: 2d03eacc ("net: hns3: Only update mac configuation when necessary")
      Signed-off-by: default avatarPeiyang Wang <wangpeiyang1@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      30545e17
    • Jie Wang's avatar
      net: hns3: fix wrong use of semaphore up · 8445d9d3
      Jie Wang authored
      Currently, if hns3 PF or VF FLR reset failed after five times retry,
      the reset done process will directly release the semaphore
      which has already released in hclge_reset_prepare_general.
      This will cause down operation fail.
      
      So this patch fixes it by adding reset state judgement. The up operation is
      only called after successful PF FLR reset.
      
      Fixes: 8627bded ("net: hns3: refactor the precedure of PF FLR")
      Fixes: f28368bb ("net: hns3: refactor the procedure of VF FLR")
      Signed-off-by: default avatarJie Wang <wangjie125@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      8445d9d3
    • Matthieu Baerts (NGI0)'s avatar
      selftests: net: lib: kill PIDs before del netns · 7965a7f3
      Matthieu Baerts (NGI0) authored
      When deleting netns, it is possible to still have some tasks running,
      e.g. background tasks like tcpdump running in the background, not
      stopped because the test has been interrupted.
      
      Before deleting the netns, it is then safer to kill all attached PIDs,
      if any. That should reduce some noises after the end of some tests, and
      help with the debugging of some issues. That's why this modification is
      seen as a "fix".
      
      Fixes: 25ae948b ("selftests/net: add lib.sh")
      Acked-by: default avatarMat Martineau <martineau@kernel.org>
      Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
      Acked-by: default avatarFlorian Westphal <fw@strlen.de>
      Reviewed-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Link: https://patch.msgid.link/20240813-upstream-net-20240813-selftests-net-lib-kill-v1-1-27b689b248b8@kernel.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      7965a7f3
    • Oleksij Rempel's avatar
      pse-core: Conditionally set current limit during PI regulator registration · cdc90f75
      Oleksij Rempel authored
      Fix an issue where `devm_regulator_register()` would fail for PSE
      controllers that do not support current limit control, such as simple
      GPIO-based controllers like the podl-pse-regulator. The
      `REGULATOR_CHANGE_CURRENT` flag and `max_uA` constraint are now
      conditionally set only if the `pi_set_current_limit` operation is
      supported. This change prevents the regulator registration routine from
      attempting to call `pse_pi_set_current_limit()`, which would return
      `-EOPNOTSUPP` and cause the registration to fail.
      
      Fixes: 4a83abce ("net: pse-pd: Add new power limit get and set c33 features")
      Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Reviewed-by: default avatarKory Maincent <kory.maincent@bootlin.com>
      Tested-by: default avatarKyle Swenson <kyle.swenson@est.tech>
      Link: https://patch.msgid.link/20240813073719.2304633-1-o.rempel@pengutronix.deSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      cdc90f75
    • Marc Zyngier's avatar
      net: thunder_bgx: Fix netdev structure allocation · 1f1b1942
      Marc Zyngier authored
      Commit 94833add ("net: thunderx: Unembed netdev structure") had
      a go at dynamically allocating the netdev structures for the thunderx_bgx
      driver.  This change results in my ThunderX box catching fire (to be fair,
      it is what it does best).
      
      The issues with this change are that:
      
      - bgx_lmac_enable() is called *after* bgx_acpi_register_phy() and
        bgx_init_of_phy(), both expecting netdev to be a valid pointer.
      
      - bgx_init_of_phy() populates the MAC addresses for *all* LMACs
        attached to a given BGX instance, and thus needs netdev for each of
        them to have been allocated.
      
      There is a few things to be said about how the driver mixes LMAC and
      BGX states which leads to this sorry state, but that's beside the point.
      
      To address this, go back to a situation where all netdev structures
      are allocated before the driver starts relying on them, and move the
      freeing of these structures to driver removal. Someone brave enough
      can always go and restructure the driver if they want.
      
      Fixes: 94833add ("net: thunderx: Unembed netdev structure")
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Cc: Breno Leitao <leitao@debian.org>
      Cc: Sunil Goutham <sgoutham@marvell.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Reviewed-by: default avatarBreno Leitao <leitao@debian.org>
      Link: https://patch.msgid.link/20240812141322.1742918-1-maz@kernel.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      1f1b1942