Skip to content
Snippets Groups Projects
  1. Mar 12, 2025
  2. Mar 11, 2025
  3. Mar 10, 2025
    • Edward Cree's avatar
      MAINTAINERS: sfc: remove Martin Habets · 77b2ab31
      Edward Cree authored
      
      Martin has left AMD and no longer works on the sfc driver.
      
      Signed-off-by: default avatarEdward Cree <ecree.xilinx@gmail.com>
      Link: https://patch.msgid.link/20250307154731.211368-1-edward.cree@amd.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      77b2ab31
    • Jakub Kicinski's avatar
      Merge branch 'eth-bnxt-fix-several-bugs-in-the-bnxt-module' · 547d2db0
      Jakub Kicinski authored
      Taehee Yoo says:
      
      ====================
      eth: bnxt: fix several bugs in the bnxt module
      
      The first fixes setting incorrect skb->truesize.
      When xdp-mb prog returns XDP_PASS, skb is allocated and initialized.
      Currently, The truesize is calculated as BNXT_RX_PAGE_SIZE *
      sinfo->nr_frags, but sinfo->nr_frags is flushed by napi_build_skb().
      So, it stores sinfo before calling napi_build_skb() and then use it
      for calculate truesize.
      
      The second fixes kernel panic in the bnxt_queue_mem_alloc().
      The bnxt_queue_mem_alloc() accesses rx ring descriptor.
      rx ring descriptors are allocated when the interface is up and it's
      freed when the interface is down.
      So, if bnxt_queue_mem_alloc() is called when the interface is down,
      kernel panic occurs.
      This patch makes the bnxt_queue_mem_alloc() return -ENETDOWN if rx ring
      descriptors are not allocated.
      
      The third patch fixes kernel panic in the bnxt_queue_{start | stop}().
      When a queue is restarted bnxt_queue_{start | stop}() are called.
      These functions set MRU to 0 to stop packet flow and then to set up the
      remaining things.
      MRU variable is a member of vnic_info[] the first vnic_info is for
      default and the second is for ntuple.
      The first vnic_info is always allocated when interface is up, but the
      second is allocated only when ntuple is enabled.
      (ethtool -K eth0 ntuple <on | off>).
      Currently, the bnxt_queue_{start | stop}() access
      vnic_info[BNXT_VNIC_NTUPLE] regardless of whether ntuple is enabled or
      not.
      So kernel panic occurs.
      This patch make the bnxt_queue_{start | stop}() use bp->nr_vnics instead
      of BNXT_VNIC_NTUPLE.
      
      The fourth patch fixes a warning due to checksum state.
      The bnxt_rx_pkt() checks whether skb->ip_summed is not CHECKSUM_NONE
      before updating ip_summed. if ip_summed is not CHECKSUM_NONE, it WARNS
      about it. However, the bnxt_xdp_build_skb() is called in XDP-MB-PASS
      path and it updates ip_summed earlier than bnxt_rx_pkt().
      So, in the XDP-MB-PASS path, the bnxt_rx_pkt() always warns about
      checksum.
      Updating ip_summed at the bnxt_xdp_build_skb() is unnecessary and
      duplicate, so it is removed.
      
      The fifth patch fixes a kernel panic in the
      bnxt_get_queue_stats{rx | tx}().
      The bnxt_get_queue_stats{rx | tx}() callback functions are called when
      a queue is resetting.
      These internally access rx and tx rings without null check, but rings
      are allocated and initialized when the interface is up.
      So, these functions are called when the interface is down, it
      occurs a kernel panic.
      
      The sixth patch fixes memory leak in queue reset logic.
      When a queue is resetting, tpa_info is allocated for the new queue and
      tpa_info for an old queue is not used anymore.
      So it should be freed, but not.
      
      The seventh patch makes net_devmem_unbind_dmabuf() ignore -ENETDOWN.
      When devmem socket is closed, net_devmem_unbind_dmabuf() is called to
      unbind/release resources.
      If interface is down, the driver returns -ENETDOWN.
      The -ENETDOWN return value is not an actual error, because the interface
      will release resources when the interface is down.
      So, net_devmem_unbind_dmabuf() needs to ignore -ENETDOWN.
      
      The last patch adds XDP testcases to
      tools/testing/selftests/drivers/net/ping.py.
      ====================
      
      Link: https://patch.msgid.link/20250309134219.91670-1-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      547d2db0
    • Taehee Yoo's avatar
      selftests: drv-net: add xdp cases for ping.py · 75cc19c8
      Taehee Yoo authored
      
      ping.py has 3 cases, test_v4, test_v6 and test_tcp.
      But these cases are not executed on the XDP environment.
      So, it adds XDP environment, existing tests(test_v4, test_v6, and
      test_tcp) are executed too on the below XDP environment.
      So, it adds XDP cases.
      1. xdp-generic + single-buffer
      2. xdp-generic + multi-buffer
      3. xdp-native + single-buffer
      4. xdp-native + multi-buffer
      5. xdp-offload
      
      It also makes test_{v4 | v6 | tcp} sending large size packets. this may
      help to check whether multi-buffer is working or not.
      
      Note that the physical interface may be down and then up when xdp is
      attached or detached.
      This takes some period to activate traffic. So sleep(10) is
      added if the test interface is the physical interface.
      netdevsim and veth type interfaces skip sleep.
      
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Link: https://patch.msgid.link/20250309134219.91670-9-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      75cc19c8
    • Taehee Yoo's avatar
      net: devmem: do not WARN conditionally after netdev_rx_queue_restart() · a70f891e
      Taehee Yoo authored
      
      When devmem socket is closed, netdev_rx_queue_restart() is called to
      reset queue by the net_devmem_unbind_dmabuf(). But callback may return
      -ENETDOWN if the interface is down because queues are already freed
      when the interface is down so queue reset is not needed.
      So, it should not warn if the return value is -ENETDOWN.
      
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Reviewed-by: default avatarMina Almasry <almasrymina@google.com>
      Link: https://patch.msgid.link/20250309134219.91670-8-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a70f891e
    • Taehee Yoo's avatar
      eth: bnxt: fix memory leak in queue reset · 87dd2850
      Taehee Yoo authored
      
      When the queue is reset, the bnxt_alloc_one_tpa_info() is called to
      allocate tpa_info for the new queue.
      And then the old queue's tpa_info should be removed by the
      bnxt_free_one_tpa_info(), but it is not called.
      So memory leak occurs.
      It adds the bnxt_free_one_tpa_info() in the bnxt_queue_mem_free().
      
      unreferenced object 0xffff888293cc0000 (size 16384):
        comm "ncdevmem", pid 2076, jiffies 4296604081
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 40 75 78 93 82 88 ff ff  ........@ux.....
          40 75 78 93 02 00 00 00 00 00 00 00 00 00 00 00  @ux.............
        backtrace (crc 5d7d4798):
          ___kmalloc_large_node+0x10d/0x1b0
          __kmalloc_large_node_noprof+0x17/0x60
          __kmalloc_noprof+0x3f6/0x520
          bnxt_alloc_one_tpa_info+0x5f/0x300 [bnxt_en]
          bnxt_queue_mem_alloc+0x8e8/0x14f0 [bnxt_en]
          netdev_rx_queue_restart+0x233/0x620
          net_devmem_bind_dmabuf_to_queue+0x2a3/0x600
          netdev_nl_bind_rx_doit+0xc00/0x10a0
          genl_family_rcv_msg_doit+0x1d4/0x2b0
          genl_rcv_msg+0x3fb/0x6c0
          netlink_rcv_skb+0x12c/0x360
          genl_rcv+0x24/0x40
          netlink_unicast+0x447/0x710
          netlink_sendmsg+0x712/0xbc0
          __sys_sendto+0x3fd/0x4d0
          __x64_sys_sendto+0xdc/0x1b0
      
      Fixes: 2d694c27 ("bnxt_en: implement netdev_queue_mgmt_ops")
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Link: https://patch.msgid.link/20250309134219.91670-7-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      87dd2850
    • Taehee Yoo's avatar
      eth: bnxt: fix kernel panic in the bnxt_get_queue_stats{rx | tx} · f09af5fd
      Taehee Yoo authored
      
      When qstats-get operation is executed, callbacks of netdev_stats_ops
      are called. The bnxt_get_queue_stats{rx | tx} collect per-queue stats
      from sw_stats in the rings.
      But {rx | tx | cp}_ring are allocated when the interface is up.
      So, these rings are not allocated when the interface is down.
      
      The qstats-get is allowed even if the interface is down. However,
      the bnxt_get_queue_stats{rx | tx}() accesses cp_ring and tx_ring
      without null check.
      So, it needs to avoid accessing rings if the interface is down.
      
      Reproducer:
       ip link set $interface down
       ./cli.py --spec netdev.yaml --dump qstats-get
      OR
       ip link set $interface down
       python ./stats.py
      
      Splat looks like:
       BUG: kernel NULL pointer dereference, address: 0000000000000000
       #PF: supervisor read access in kernel mode
       #PF: error_code(0x0000) - not-present page
       PGD 1680fa067 P4D 1680fa067 PUD 16be3b067 PMD 0
       Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
       CPU: 0 UID: 0 PID: 1495 Comm: python3 Not tainted 6.14.0-rc4+ #32 5cd0f999d5a15c574ac72b3e4b907341
       Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021
       RIP: 0010:bnxt_get_queue_stats_rx+0xf/0x70 [bnxt_en]
       Code: c6 87 b5 18 00 00 02 eb a2 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 01
       RSP: 0018:ffffabef43cdb7e0 EFLAGS: 00010282
       RAX: 0000000000000000 RBX: ffffffffc04c8710 RCX: 0000000000000000
       RDX: ffffabef43cdb858 RSI: 0000000000000000 RDI: ffff8d504e850000
       RBP: ffff8d506c9f9c00 R08: 0000000000000004 R09: ffff8d506bcd901c
       R10: 0000000000000015 R11: ffff8d506bcd9000 R12: 0000000000000000
       R13: ffffabef43cdb8c0 R14: ffff8d504e850000 R15: 0000000000000000
       FS:  00007f2c5462b080(0000) GS:ffff8d575f600000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000000000000000 CR3: 0000000167fd0000 CR4: 00000000007506f0
       PKRU: 55555554
       Call Trace:
        <TASK>
        ? __die+0x20/0x70
        ? page_fault_oops+0x15a/0x460
        ? sched_balance_find_src_group+0x58d/0xd10
        ? exc_page_fault+0x6e/0x180
        ? asm_exc_page_fault+0x22/0x30
        ? bnxt_get_queue_stats_rx+0xf/0x70 [bnxt_en cdd546fd48563c280cfd30e9647efa420db07bf1]
        netdev_nl_stats_by_netdev+0x2b1/0x4e0
        ? xas_load+0x9/0xb0
        ? xas_find+0x183/0x1d0
        ? xa_find+0x8b/0xe0
        netdev_nl_qstats_get_dumpit+0xbf/0x1e0
        genl_dumpit+0x31/0x90
        netlink_dump+0x1a8/0x360
      
      Fixes: af7b3b4a ("eth: bnxt: support per-queue statistics")
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Reviewed-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
      Link: https://patch.msgid.link/20250309134219.91670-6-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f09af5fd
    • Taehee Yoo's avatar
      eth: bnxt: do not update checksum in bnxt_xdp_build_skb() · c03e7d05
      Taehee Yoo authored
      
      The bnxt_rx_pkt() updates ip_summed value at the end if checksum offload
      is enabled.
      When the XDP-MB program is attached and it returns XDP_PASS, the
      bnxt_xdp_build_skb() is called to update skb_shared_info.
      The main purpose of bnxt_xdp_build_skb() is to update skb_shared_info,
      but it updates ip_summed value too if checksum offload is enabled.
      This is actually duplicate work.
      
      When the bnxt_rx_pkt() updates ip_summed value, it checks if ip_summed
      is CHECKSUM_NONE or not.
      It means that ip_summed should be CHECKSUM_NONE at this moment.
      But ip_summed may already be updated to CHECKSUM_UNNECESSARY in the
      XDP-MB-PASS path.
      So the by skb_checksum_none_assert() WARNS about it.
      
      This is duplicate work and updating ip_summed in the
      bnxt_xdp_build_skb() is not needed.
      
      Splat looks like:
      WARNING: CPU: 3 PID: 5782 at ./include/linux/skbuff.h:5155 bnxt_rx_pkt+0x479b/0x7610 [bnxt_en]
      Modules linked in: bnxt_re bnxt_en rdma_ucm rdma_cm iw_cm ib_cm ib_uverbs veth xt_nat xt_tcpudp xt_conntrack nft_chain_nat xt_MASQUERADE nf_]
      CPU: 3 UID: 0 PID: 5782 Comm: socat Tainted: G        W          6.14.0-rc4+ #27
      Tainted: [W]=WARN
      Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021
      RIP: 0010:bnxt_rx_pkt+0x479b/0x7610 [bnxt_en]
      Code: 54 24 0c 4c 89 f1 4c 89 ff c1 ea 1f ff d3 0f 1f 00 49 89 c6 48 85 c0 0f 84 4c e5 ff ff 48 89 c7 e8 ca 3d a0 c8 e9 8f f4 ff ff <0f> 0b f
      RSP: 0018:ffff88881ba09928 EFLAGS: 00010202
      RAX: 0000000000000000 RBX: 00000000c7590303 RCX: 0000000000000000
      RDX: 1ffff1104e7d1610 RSI: 0000000000000001 RDI: ffff8881c91300b8
      RBP: ffff88881ba09b28 R08: ffff888273e8b0d0 R09: ffff888273e8b070
      R10: ffff888273e8b010 R11: ffff888278b0f000 R12: ffff888273e8b080
      R13: ffff8881c9130e00 R14: ffff8881505d3800 R15: ffff888273e8b000
      FS:  00007f5a2e7be080(0000) GS:ffff88881ba00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007fff2e708ff8 CR3: 000000013e3b0000 CR4: 00000000007506f0
      PKRU: 55555554
      Call Trace:
       <IRQ>
       ? __warn+0xcd/0x2f0
       ? bnxt_rx_pkt+0x479b/0x7610
       ? report_bug+0x326/0x3c0
       ? handle_bug+0x53/0xa0
       ? exc_invalid_op+0x14/0x50
       ? asm_exc_invalid_op+0x16/0x20
       ? bnxt_rx_pkt+0x479b/0x7610
       ? bnxt_rx_pkt+0x3e41/0x7610
       ? __pfx_bnxt_rx_pkt+0x10/0x10
       ? napi_complete_done+0x2cf/0x7d0
       __bnxt_poll_work+0x4e8/0x1220
       ? __pfx___bnxt_poll_work+0x10/0x10
       ? __pfx_mark_lock.part.0+0x10/0x10
       bnxt_poll_p5+0x36a/0xfa0
       ? __pfx_bnxt_poll_p5+0x10/0x10
       __napi_poll.constprop.0+0xa0/0x440
       net_rx_action+0x899/0xd00
      ...
      
      Following ping.py patch adds xdp-mb-pass case. so ping.py is going
      to be able to reproduce this issue.
      
      Fixes: 1dc4c557 ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff")
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Reviewed-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
      Link: https://patch.msgid.link/20250309134219.91670-5-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c03e7d05
    • Taehee Yoo's avatar
      eth: bnxt: do not use BNXT_VNIC_NTUPLE unconditionally in queue restart logic · 66195855
      Taehee Yoo authored
      
      When a queue is restarted, it sets MRU to 0 for stopping packet flow.
      MRU variable is a member of vnic_info[], the first vnic_info is default
      and the second is ntuple.
      Only when ntuple is enabled(ethtool -K eth0 ntuple on), vnic_info for
      ntuple is allocated in init logic.
      The bp->nr_vnics indicates how many vnic_info are allocated.
      However bnxt_queue_{start | stop}() accesses vnic_info[BNXT_VNIC_NTUPLE]
      regardless of ntuple state.
      
      Reviewed-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
      Fixes: b9d2956e ("bnxt_en: stop packet flow during bnxt_queue_stop/start")
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Link: https://patch.msgid.link/20250309134219.91670-4-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      66195855
    • Taehee Yoo's avatar
      eth: bnxt: return fail if interface is down in bnxt_queue_mem_alloc() · ca2456e0
      Taehee Yoo authored
      
      The bnxt_queue_mem_alloc() is called to allocate new queue memory when
      a queue is restarted.
      It internally accesses rx buffer descriptor corresponding to the index.
      The rx buffer descriptor is allocated and set when the interface is up
      and it's freed when the interface is down.
      So, if queue is restarted if interface is down, kernel panic occurs.
      
      Splat looks like:
       BUG: unable to handle page fault for address: 000000000000b240
       #PF: supervisor read access in kernel mode
       #PF: error_code(0x0000) - not-present page
       PGD 0 P4D 0
       Oops: Oops: 0000 [#1] PREEMPT SMP NOPTI
       CPU: 3 UID: 0 PID: 1563 Comm: ncdevmem2 Not tainted 6.14.0-rc2+ #9 844ddba6e7c459cafd0bf4db9a3198e
       Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 0603 11/01/2021
       RIP: 0010:bnxt_queue_mem_alloc+0x3f/0x4e0 [bnxt_en]
       Code: 41 54 4d 89 c4 4d 69 c0 c0 05 00 00 55 48 89 f5 53 48 89 fb 4c 8d b5 40 05 00 00 48 83 ec 15
       RSP: 0018:ffff9dcc83fef9e8 EFLAGS: 00010202
       RAX: ffffffffc0457720 RBX: ffff934ed8d40000 RCX: 0000000000000000
       RDX: 000000000000001f RSI: ffff934ea508f800 RDI: ffff934ea508f808
       RBP: ffff934ea508f800 R08: 000000000000b240 R09: ffff934e84f4b000
       R10: ffff9dcc83fefa30 R11: ffff934e84f4b000 R12: 000000000000001f
       R13: ffff934ed8d40ac0 R14: ffff934ea508fd40 R15: ffff934e84f4b000
       FS:  00007fa73888c740(0000) GS:ffff93559f780000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 000000000000b240 CR3: 0000000145a2e000 CR4: 00000000007506f0
       PKRU: 55555554
       Call Trace:
        <TASK>
        ? __die+0x20/0x70
        ? page_fault_oops+0x15a/0x460
        ? exc_page_fault+0x6e/0x180
        ? asm_exc_page_fault+0x22/0x30
        ? __pfx_bnxt_queue_mem_alloc+0x10/0x10 [bnxt_en 7f85e76f4d724ba07471d7e39d9e773aea6597b7]
        ? bnxt_queue_mem_alloc+0x3f/0x4e0 [bnxt_en 7f85e76f4d724ba07471d7e39d9e773aea6597b7]
        netdev_rx_queue_restart+0xc5/0x240
        net_devmem_bind_dmabuf_to_queue+0xf8/0x200
        netdev_nl_bind_rx_doit+0x3a7/0x450
        genl_family_rcv_msg_doit+0xd9/0x130
        genl_rcv_msg+0x184/0x2b0
        ? __pfx_netdev_nl_bind_rx_doit+0x10/0x10
        ? __pfx_genl_rcv_msg+0x10/0x10
        netlink_rcv_skb+0x54/0x100
        genl_rcv+0x24/0x40
      ...
      
      Reviewed-by: default avatarSomnath Kotur <somnath.kotur@broadcom.com>
      Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
      Fixes: 2d694c27 ("bnxt_en: implement netdev_queue_mgmt_ops")
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Reviewed-by: default avatarMina Almasry <almasrymina@google.com>
      Link: https://patch.msgid.link/20250309134219.91670-3-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ca2456e0
    • Taehee Yoo's avatar
      eth: bnxt: fix truesize for mb-xdp-pass case · 9f7b2aa5
      Taehee Yoo authored
      
      When mb-xdp is set and return is XDP_PASS, packet is converted from
      xdp_buff to sk_buff with xdp_update_skb_shared_info() in
      bnxt_xdp_build_skb().
      bnxt_xdp_build_skb() passes incorrect truesize argument to
      xdp_update_skb_shared_info().
      The truesize is calculated as BNXT_RX_PAGE_SIZE * sinfo->nr_frags but
      the skb_shared_info was wiped by napi_build_skb() before.
      So it stores sinfo->nr_frags before bnxt_xdp_build_skb() and use it
      instead of getting skb_shared_info from xdp_get_shared_info_from_buff().
      
      Splat looks like:
       ------------[ cut here ]------------
       WARNING: CPU: 2 PID: 0 at net/core/skbuff.c:6072 skb_try_coalesce+0x504/0x590
       Modules linked in: xt_nat xt_tcpudp veth af_packet xt_conntrack nft_chain_nat xt_MASQUERADE nf_conntrack_netlink xfrm_user xt_addrtype nft_coms
       CPU: 2 UID: 0 PID: 0 Comm: swapper/2 Not tainted 6.14.0-rc2+ #3
       RIP: 0010:skb_try_coalesce+0x504/0x590
       Code: 4b fd ff ff 49 8b 34 24 40 80 e6 40 0f 84 3d fd ff ff 49 8b 74 24 48 40 f6 c6 01 0f 84 2e fd ff ff 48 8d 4e ff e9 25 fd ff ff <0f> 0b e99
       RSP: 0018:ffffb62c4120caa8 EFLAGS: 00010287
       RAX: 0000000000000003 RBX: ffffb62c4120cb14 RCX: 0000000000000ec0
       RDX: 0000000000001000 RSI: ffffa06e5d7dc000 RDI: 0000000000000003
       RBP: ffffa06e5d7ddec0 R08: ffffa06e6120a800 R09: ffffa06e7a119900
       R10: 0000000000002310 R11: ffffa06e5d7dcec0 R12: ffffe4360575f740
       R13: ffffe43600000000 R14: 0000000000000002 R15: 0000000000000002
       FS:  0000000000000000(0000) GS:ffffa0755f700000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 00007f147b76b0f8 CR3: 00000001615d4000 CR4: 00000000007506f0
       PKRU: 55555554
       Call Trace:
        <IRQ>
        ? __warn+0x84/0x130
        ? skb_try_coalesce+0x504/0x590
        ? report_bug+0x18a/0x1a0
        ? handle_bug+0x53/0x90
        ? exc_invalid_op+0x14/0x70
        ? asm_exc_invalid_op+0x16/0x20
        ? skb_try_coalesce+0x504/0x590
        inet_frag_reasm_finish+0x11f/0x2e0
        ip_defrag+0x37a/0x900
        ip_local_deliver+0x51/0x120
        ip_sublist_rcv_finish+0x64/0x70
        ip_sublist_rcv+0x179/0x210
        ip_list_rcv+0xf9/0x130
      
      How to reproduce:
      <Node A>
      ip link set $interface1 xdp obj xdp_pass.o
      ip link set $interface1 mtu 9000 up
      ip a a 10.0.0.1/24 dev $interface1
      <Node B>
      ip link set $interfac2 mtu 9000 up
      ip a a 10.0.0.2/24 dev $interface2
      ping 10.0.0.1 -s 65000
      
      Following ping.py patch adds xdp-mb-pass case. so ping.py is going to be
      able to reproduce this issue.
      
      Fixes: 1dc4c557 ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff")
      Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
      Link: https://patch.msgid.link/20250309134219.91670-2-ap420073@gmail.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9f7b2aa5
    • Oleksij Rempel's avatar
      net: usb: lan78xx: Sanitize return values of register read/write functions · cfa693bf
      Oleksij Rempel authored
      
      usb_control_msg() returns the number of transferred bytes or a negative
      error code. The current implementation propagates the transferred byte
      count, which is unintended. This affects code paths that assume a
      boolean success/failure check, such as the EEPROM detection logic.
      
      Fix this by ensuring lan78xx_read_reg() and lan78xx_write_reg() return
      only 0 on success and preserve negative error codes.
      
      This approach is consistent with existing usage, as the transferred byte
      count is not explicitly checked elsewhere.
      
      Fixes: 8b1b2ca8 ("net: usb: lan78xx: Improve error handling in EEPROM and OTP operations")
      Reported-by: default avatarMark Brown <broonie@kernel.org>
      Closes: https://lore.kernel.org/all/ac965de8-f320-430f-80f6-b16f4e1ba06d@sirena.org.uk
      
      
      Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Tested-by: default avatarMark Brown <broonie@kernel.org>
      Link: https://patch.msgid.link/20250307101223.3025632-1-o.rempel@pengutronix.de
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      cfa693bf
    • Kory Maincent's avatar
      net: ethtool: tsinfo: Fix dump command · d0a4a1b3
      Kory Maincent authored
      
      Fix missing initialization of ts_info->phc_index in the dump command,
      which could cause a netdev interface to incorrectly display a PTP provider
      at index 0 instead of "none".
      Fix it by initializing the phc_index to -1.
      
      In the same time, restore missing initialization of ts_info.cmd for the
      IOCTL case, as it was before the transition from ethnl_default_dumpit to
      custom ethnl_tsinfo_dumpit.
      
      Also, remove unnecessary zeroing of ts_info, as it is embedded within
      reply_data, which is fully zeroed two lines earlier.
      
      Fixes: b9e3f7dc ("net: ethtool: tsinfo: Enhance tsinfo to support several hwtstamp by net topology")
      Signed-off-by: default avatarKory Maincent <kory.maincent@bootlin.com>
      Reviewed-by: default avatarVadim Fedorenko <vadim.fedorenko@linux.dev>
      Link: https://patch.msgid.link/20250307091255.463559-1-kory.maincent@bootlin.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d0a4a1b3
    • Wentao Liang's avatar
      net/mlx5: handle errors in mlx5_chains_create_table() · eab03963
      Wentao Liang authored
      
      In mlx5_chains_create_table(), the return value of mlx5_get_fdb_sub_ns()
      and mlx5_get_flow_namespace() must be checked to prevent NULL pointer
      dereferences. If either function fails, the function should log error
      message with mlx5_core_warn() and return error pointer.
      
      Fixes: 39ac237c ("net/mlx5: E-Switch, Refactor chains and priorities")
      Signed-off-by: default avatarWentao Liang <vulab@iscas.ac.cn>
      Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
      Link: https://patch.msgid.link/20250307021820.2646-1-vulab@iscas.ac.cn
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      eab03963
  4. Mar 08, 2025
  5. Mar 07, 2025
Loading