Skip to content
Permalink
Colin-Foster/F…
Switch branches/tags

Commits on Jan 22, 2022

  1. page_pool: fix NULL dereference crash

    Check for the existence of page pool params before dereferencing. This can
    cause crashes in certain conditions.
    
    Fixes: 35b2e54 ("page_pool: Add callback to init pages when they are
    allocated")
    
    Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
    colin-foster-in-advantage authored and intel-lab-lkp committed Jan 22, 2022

Commits on Jan 21, 2022

  1. Merge branch 'octeontx2-af-fixes'

    Subbaraya Sundeep says:
    
    ====================
    octeontx-af2: Fixes for CN10K and CN9xxx platforms
    
    This patchset has consolidated fixes in Octeontx2 driver
    handling CN10K and CN9xxx platforms. When testing the
    new CN10K hardware some issues resurfaced like accessing
    wrong register for CN10K and enabling loopback on not supported
    interfaces. Some fixes are needed for CN9xxx platforms as well.
    
    Below is the description of patches
    
    Patch 1: AF sets RX RSS action for all the VFs when a VF is
    brought up. But when a PF sets RX action for its VF like Drop/Direct
    to a queue in ntuple filter it is not retained because of AF fixup.
    This patch skips modifying VF RX RSS action if PF has already
    set its action.
    
    Patch 2: When configuring backpressure wrong register is being read for
    LBKs hence fixed it.
    
    Patch 3: Some RVU blocks may take longer time to reset but are guaranteed
    to complete the reset. Hence wait till reset is complete.
    
    Patch 4: For enabling LMAC CN10K needs another register compared
    to CN9xxx platforms. Hence changed it.
    
    Patch 5: Adds missing barrier before submitting memory pointer
    to the aura hardware.
    
    Patch 6: Increase polling time while link credit restore and also
    return proper error code when timeout occurs.
    
    Patch 7: Internal loopback not supported on LPCS interfaces like
    SGMII/QSGMII so do not enable it.
    
    Patch 8: When there is a error in message processing, AF sets the error
    response and replies back to requestor. PF forwards a invalid message to
    VF back if AF reply has error in it. This way VF lacks the actual error set
    by AF for its message. This is changed such that PF simply forwards the
    actual reply and let VF handle the error.
    
    Patch 9: ntuple filter with "flow-type ether proto 0x8842 vlan 0x92e"
    was not working since ethertype 0x8842 is NGIO protocol. Hardware
    parser explicitly parses such NGIO packets and sets the packet as
    NGIO and do not set it as tagged packet. Fix this by changing parser
    such that it sets the packet as both NGIO and tagged by using
    separate layer types.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jan 21, 2022
  2. octeontx2-af: Add KPU changes to parse NGIO as separate layer

    With current KPU profile NGIO is being parsed along with CTAG as
    a single layer. Because of this MCAM/ntuple rules installed with
    ethertype as 0x8842 are not being hit. Adding KPU profile changes
    to parse NGIO in separate ltype and CTAG in separate ltype.
    
    Fixes: f9c49be ("octeontx2-af: Update the default KPU profile and fixes")
    Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Kiran Kumar K authored and davem330 committed Jan 21, 2022
  3. octeontx2-pf: Forward error codes to VF

    PF forwards its VF messages to AF and corresponding
    replies from AF to VF. AF sets proper error code in the
    replies after processing message requests. Currently PF
    checks the error codes in replies and sends invalid
    message to VF. This way VF lacks the information of
    error code set by AF for its messages. This patch
    changes that such that PF simply forwards AF replies
    so that VF can handle error codes.
    
    Fixes: d424b6c ("octeontx2-pf: Enable SRIOV and added VF mbox handling")
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Subbaraya Sundeep authored and davem330 committed Jan 21, 2022
  4. octeontx2-af: cn10k: Do not enable RPM loopback for LPC interfaces

    Internal looback is not supported to low rate LPCS interface like
    SGMII/QSGMII. Hence don't allow to enable for such interfaces.
    
    Fixes: 3ad3f8f ("octeontx2-af: cn10k: MAC internal loopback support")
    Signed-off-by: Geetha sowjanya <gakula@marvell.com>
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Geetha sowjanya authored and davem330 committed Jan 21, 2022
  5. octeontx2-af: Increase link credit restore polling timeout

    It's been observed that sometimes link credit restore takes
    a lot of time than the current timeout. This patch increases
    the default timeout value and return the proper error value
    on failure.
    
    Fixes: 1c74b89 ("octeontx2-af: Wait for TX link idle for credits change")
    Signed-off-by: Geetha sowjanya <gakula@marvell.com>
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Geetha sowjanya authored and davem330 committed Jan 21, 2022
  6. octeontx2-pf: cn10k: Ensure valid pointers are freed to aura

    While freeing SQB pointers to aura, driver first memcpy to
    target address and then triggers lmtst operation to free pointer
    to the aura. We need to ensure(by adding dmb barrier)that memcpy
    is finished before pointers are freed to the aura. This patch also
    adds the missing sq context structure entry in debugfs.
    
    Fixes: ef6c8da ("octeontx2-pf: cn10K: Reserve LMTST lines per core")
    Signed-off-by: Geetha sowjanya <gakula@marvell.com>
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Geetha sowjanya authored and davem330 committed Jan 21, 2022
  7. octeontx2-af: cn10k: Use appropriate register for LMAC enable

    CN10K platforms uses RPM(0..2)_MTI_MAC100(0..3)_COMMAND_CONFIG
    register for lmac TX/RX enable whereas CN9xxx platforms use
    CGX_CMRX_CONFIG register. This config change was missed when
    adding support for CN10K RPM.
    
    Fixes: 91c6945 ("octeontx2-af: cn10k: Add RPM MAC support")
    Signed-off-by: Geetha sowjanya <gakula@marvell.com>
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Geetha sowjanya authored and davem330 committed Jan 21, 2022
  8. octeontx2-af: Retry until RVU block reset complete

    Few RVU blocks like SSO require more time for reset on some
    silicons. Hence retrying the block reset until success.
    
    Fixes: c0fa2cf ("octeontx2-af: Handle return value in block reset")
    Signed-off-by: Geetha sowjanya <gakula@marvell.com>
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Geetha sowjanya authored and davem330 committed Jan 21, 2022
  9. octeontx2-af: Fix LBK backpressure id count

    In rvu_nix_get_bpid() lbk_bpid_cnt is being read from
    wrong register. Due to this backpressure enable is failing
    for LBK VF32 onwards. This patch fixes that.
    
    Fixes: fe1939b ("octeontx2-af: Add SDP interface support")
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: Subbaraya Sundeep <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Sunil Goutham authored and davem330 committed Jan 21, 2022
  10. octeontx2-af: Do not fixup all VF action entries

    AF modifies all the rules destined for VF to use
    the action same as default RSS action. This fixup
    was needed because AF only installs default rules with
    RSS action. But the action in rules installed by a PF
    for its VFs should not be changed by this fixup.
    This is because action can be drop or direct to
    queue as specified by user(ntuple filters).
    This patch fixes that problem.
    
    Fixes: 967db35 ("octeontx2-af: add support for multicast/promisc packet")
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
    Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Subbaraya Sundeep authored and davem330 committed Jan 21, 2022
  11. Merge tag 'wireless-2022-01-21' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/wireless/wireless
    
    Kalle Valo says:
    
    ====================
    wireless fixes for v5.17
    
    First set of fixes for v5.17. This is the first pull request from the
    new wireless tree and only changes to MAINTAINERS file.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jan 21, 2022
  12. Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git…

    …/tnguy/net-queue
    
    Tony Nguyen says:
    
    ====================
    Intel Wired LAN Driver Updates 2022-01-20
    
    This series contains updates to i40e driver only.
    
    Jedrzej increases delay for EMP reset and adds checks to ensure a VF
    request to change queues can be met.
    
    Sylwester moves the placement of the Flow Director queue as to not
    fragment the queue pile which would cause later re-allocation issues.
    
    Karen prevents VF reset being invoked while another is still occurring
    to avoid reading invalid data.
    
    Joe Damato fixes some statistics fields to match the values of the
    fields they are based on.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jan 21, 2022
  13. Merge branch 'mptcp-a-few-fixes'

    Mat Martineau says:
    
    ====================
    mptcp: A few fixes
    
    Patch 1 fixes a RCU locking issue when processing a netlink command that
    updates endpoint flags in the in-kernel MPTCP path manager.
    
    Patch 2 fixes a typo affecting available endpoint id tracking.
    
    Patch 3 fixes IPv6 routing in the MPTCP self tests.
    ====================
    
    Link: https://lore.kernel.org/r/20220121003529.54930-1-mathew.j.martineau@linux.intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Jan 21, 2022
  14. selftests: mptcp: fix ipv6 routing setup

    MPJ ipv6 selftests currently lack per link route to the server
    net. Additionally, ipv6 subflows endpoints are created without any
    interface specified. The end-result is that in ipv6 self-tests
    subflows are created all on the same link, leading to expected delays
    and sporadic self-tests failures.
    
    Fix the issue by adding the missing setup bits.
    
    Fixes: 523514e ("selftests: mptcp: add ADD_ADDR IPv6 test cases")
    Reported-and-tested-by: Geliang Tang <geliang.tang@suse.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Paolo Abeni authored and Jakub Kicinski committed Jan 21, 2022
  15. mptcp: fix removing ids bitmap setting

    In mptcp_pm_nl_rm_addr_or_subflow(), the bit of rm_list->ids[i] in the
    id_avail_bitmap should be set, not rm_list->ids[1]. This patch fixed it.
    
    Fixes: 86e39e0 ("mptcp: keep track of local endpoint still available for each msk")
    Acked-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Geliang Tang <geliang.tang@suse.com>
    Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    geliangtang authored and Jakub Kicinski committed Jan 21, 2022
  16. mptcp: fix msk traversal in mptcp_nl_cmd_set_flags()

    The MPTCP endpoint list is under RCU protection, guarded by the
    pernet spinlock. mptcp_nl_cmd_set_flags() traverses the list
    without acquiring the spin-lock nor under the RCU critical section.
    
    This change addresses the issue performing the lookup and the endpoint
    update under the pernet spinlock.
    
    Fixes: 0f9f696 ("mptcp: add set_flags command in PM netlink")
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Paolo Abeni authored and Jakub Kicinski committed Jan 21, 2022
  17. Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

    Pablo Neira Ayuso says:
    
    ====================
    Netfilter fixes for net
    
    1) Incorrect helper module alias in netbios_ns, from Florian Westphal.
    
    2) Remove unused variable in nf_tables.
    
    3) Uninitialized last expression in nf_tables register tracking.
    
    4) Memleak in nft_connlimit after moving stateful data out of the
       expression data area.
    
    5) Bogus invalid stats update when NF_REPEAT is returned, from Florian.
    
    * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf:
      netfilter: conntrack: don't increment invalid counter on NF_REPEAT
      netfilter: nft_connlimit: memleak if nf_ct_netns_get() fails
      netfilter: nf_tables: set last expression in register tracking area
      netfilter: nf_tables: remove unused variable
      netfilter: nf_conntrack_netbios_ns: fix helper module alias
    ====================
    
    Link: https://lore.kernel.org/r/20220120125212.991271-1-pablo@netfilter.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Jan 21, 2022
  18. ipv6: annotate accesses to fn->fn_sernum

    struct fib6_node's fn_sernum field can be
    read while other threads change it.
    
    Add READ_ONCE()/WRITE_ONCE() annotations.
    
    Do not change existing smp barriers in fib6_get_cookie_safe()
    and __fib6_update_sernum_upto_root()
    
    syzbot reported:
    
    BUG: KCSAN: data-race in fib6_clean_node / inet6_csk_route_socket
    
    write to 0xffff88813df62e2c of 4 bytes by task 1920 on cpu 1:
     fib6_clean_node+0xc2/0x260 net/ipv6/ip6_fib.c:2178
     fib6_walk_continue+0x38e/0x430 net/ipv6/ip6_fib.c:2112
     fib6_walk net/ipv6/ip6_fib.c:2160 [inline]
     fib6_clean_tree net/ipv6/ip6_fib.c:2240 [inline]
     __fib6_clean_all+0x1a9/0x2e0 net/ipv6/ip6_fib.c:2256
     fib6_flush_trees+0x6c/0x80 net/ipv6/ip6_fib.c:2281
     rt_genid_bump_ipv6 include/net/net_namespace.h:488 [inline]
     addrconf_dad_completed+0x57f/0x870 net/ipv6/addrconf.c:4230
     addrconf_dad_work+0x908/0x1170
     process_one_work+0x3f6/0x960 kernel/workqueue.c:2307
     worker_thread+0x616/0xa70 kernel/workqueue.c:2454
     kthread+0x1bf/0x1e0 kernel/kthread.c:359
     ret_from_fork+0x1f/0x30
    
    read to 0xffff88813df62e2c of 4 bytes by task 15701 on cpu 0:
     fib6_get_cookie_safe include/net/ip6_fib.h:285 [inline]
     rt6_get_cookie include/net/ip6_fib.h:306 [inline]
     ip6_dst_store include/net/ip6_route.h:234 [inline]
     inet6_csk_route_socket+0x352/0x3c0 net/ipv6/inet6_connection_sock.c:109
     inet6_csk_xmit+0x91/0x1e0 net/ipv6/inet6_connection_sock.c:121
     __tcp_transmit_skb+0x1323/0x1840 net/ipv4/tcp_output.c:1402
     tcp_transmit_skb net/ipv4/tcp_output.c:1420 [inline]
     tcp_write_xmit+0x1450/0x4460 net/ipv4/tcp_output.c:2680
     __tcp_push_pending_frames+0x68/0x1c0 net/ipv4/tcp_output.c:2864
     tcp_push+0x2d9/0x2f0 net/ipv4/tcp.c:725
     mptcp_push_release net/mptcp/protocol.c:1491 [inline]
     __mptcp_push_pending+0x46c/0x490 net/mptcp/protocol.c:1578
     mptcp_sendmsg+0x9ec/0xa50 net/mptcp/protocol.c:1764
     inet6_sendmsg+0x5f/0x80 net/ipv6/af_inet6.c:643
     sock_sendmsg_nosec net/socket.c:705 [inline]
     sock_sendmsg net/socket.c:725 [inline]
     kernel_sendmsg+0x97/0xd0 net/socket.c:745
     sock_no_sendpage+0x84/0xb0 net/core/sock.c:3086
     inet_sendpage+0x9d/0xc0 net/ipv4/af_inet.c:834
     kernel_sendpage+0x187/0x200 net/socket.c:3492
     sock_sendpage+0x5a/0x70 net/socket.c:1007
     pipe_to_sendpage+0x128/0x160 fs/splice.c:364
     splice_from_pipe_feed fs/splice.c:418 [inline]
     __splice_from_pipe+0x207/0x500 fs/splice.c:562
     splice_from_pipe fs/splice.c:597 [inline]
     generic_splice_sendpage+0x94/0xd0 fs/splice.c:746
     do_splice_from fs/splice.c:767 [inline]
     direct_splice_actor+0x80/0xa0 fs/splice.c:936
     splice_direct_to_actor+0x345/0x650 fs/splice.c:891
     do_splice_direct+0x106/0x190 fs/splice.c:979
     do_sendfile+0x675/0xc40 fs/read_write.c:1245
     __do_sys_sendfile64 fs/read_write.c:1310 [inline]
     __se_sys_sendfile64 fs/read_write.c:1296 [inline]
     __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1296
     do_syscall_x64 arch/x86/entry/common.c:50 [inline]
     do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
     entry_SYSCALL_64_after_hwframe+0x44/0xae
    
    value changed: 0x0000026f -> 0x00000271
    
    Reported by Kernel Concurrency Sanitizer on:
    CPU: 0 PID: 15701 Comm: syz-executor.2 Not tainted 5.16.0-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    
    The Fixes tag I chose is probably arbitrary, I do not think
    we need to backport this patch to older kernels.
    
    Fixes: c5cff85 ("ipv6: add rcu grace period before freeing fib6_node")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: syzbot <syzkaller@googlegroups.com>
    Link: https://lore.kernel.org/r/20220120174112.1126644-1-eric.dumazet@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    neebe000 authored and Jakub Kicinski committed Jan 21, 2022
  19. tcp: add a missing sk_defer_free_flush() in tcp_splice_read()

    Without it, splice users can hit the warning
    added in commit 79074a7 ("net: Flush deferred skb free on socket destroy")
    
    Fixes: f35f821 ("tcp: defer skb freeing after socket lock is released")
    Fixes: 79074a7 ("net: Flush deferred skb free on socket destroy")
    Suggested-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Gal Pressman <gal@nvidia.com>
    Link: https://lore.kernel.org/r/20220120124530.925607-1-eric.dumazet@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    neebe000 authored and Jakub Kicinski committed Jan 21, 2022
  20. tcp: Add a stub for sk_defer_free_flush()

    When compiling the kernel with CONFIG_INET disabled, the
    sk_defer_free_flush() should be defined as a nop.
    
    This resolves the following compilation error:
      ld: net/core/sock.o: in function `sk_defer_free_flush':
      ./include/net/tcp.h:1378: undefined reference to `__sk_defer_free_flush'
    
    Fixes: 79074a7 ("net: Flush deferred skb free on socket destroy")
    Reported-by: kernel test robot <lkp@intel.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Gal Pressman <gal@nvidia.com>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/r/20220120123440.9088-1-gal@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Gal Pressman authored and Jakub Kicinski committed Jan 21, 2022
  21. phylib: fix potential use-after-free

    Commit bafbdd5 ("phylib: Add device reset GPIO support") added call
    to phy_device_reset(phydev) after the put_device() call in phy_detach().
    
    The comment before the put_device() call says that the phydev might go
    away with put_device().
    
    Fix potential use-after-free by calling phy_device_reset() before
    put_device().
    
    Fixes: bafbdd5 ("phylib: Add device reset GPIO support")
    Signed-off-by: Marek Behún <kabel@kernel.org>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Link: https://lore.kernel.org/r/20220119162748.32418-1-kabel@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    elkablo authored and Jakub Kicinski committed Jan 21, 2022

Commits on Jan 20, 2022

  1. i40e: fix unsigned stat widths

    Change i40e_update_vsi_stats and struct i40e_vsi to use u64 fields to match
    the width of the stats counters in struct i40e_rx_queue_stats.
    
    Update debugfs code to use the correct format specifier for u64.
    
    Fixes: 41c445f ("i40e: main driver core")
    Signed-off-by: Joe Damato <jdamato@fastly.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Tested-by: Gurucharan G <gurucharanx.g@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    jdamato-fsly authored and anguy11 committed Jan 20, 2022
  2. i40e: Fix for failed to init adminq while VF reset

    Fix for failed to init adminq: -53 while VF is resetting via MAC
    address changing procedure.
    Added sync module to avoid reading deadbeef value in reinit adminq
    during software reset.
    Without this patch it is possible to trigger VF reset procedure
    during reinit adminq. This resulted in an incorrect reading of
    value from the AQP registers and generated the -53 error.
    
    Fixes: 5c3c48a ("i40e: implement virtual device interface")
    Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
    Signed-off-by: Karen Sornek <karen.sornek@intel.com>
    Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    ksornek authored and anguy11 committed Jan 20, 2022
  3. i40e: Fix queues reservation for XDP

    When XDP was configured on a system with large number of CPUs
    and X722 NIC there was a call trace with NULL pointer dereference.
    
    i40e 0000:87:00.0: failed to get tracking for 256 queues for VSI 0 err -12
    i40e 0000:87:00.0: setup of MAIN VSI failed
    
    BUG: kernel NULL pointer dereference, address: 0000000000000000
    RIP: 0010:i40e_xdp+0xea/0x1b0 [i40e]
    Call Trace:
    ? i40e_reconfig_rss_queues+0x130/0x130 [i40e]
    dev_xdp_install+0x61/0xe0
    dev_xdp_attach+0x18a/0x4c0
    dev_change_xdp_fd+0x1e6/0x220
    do_setlink+0x616/0x1030
    ? ahci_port_stop+0x80/0x80
    ? ata_qc_issue+0x107/0x1e0
    ? lock_timer_base+0x61/0x80
    ? __mod_timer+0x202/0x380
    rtnl_setlink+0xe5/0x170
    ? bpf_lsm_binder_transaction+0x10/0x10
    ? security_capable+0x36/0x50
    rtnetlink_rcv_msg+0x121/0x350
    ? rtnl_calcit.isra.0+0x100/0x100
    netlink_rcv_skb+0x50/0xf0
    netlink_unicast+0x1d3/0x2a0
    netlink_sendmsg+0x22a/0x440
    sock_sendmsg+0x5e/0x60
    __sys_sendto+0xf0/0x160
    ? __sys_getsockname+0x7e/0xc0
    ? _copy_from_user+0x3c/0x80
    ? __sys_setsockopt+0xc8/0x1a0
    __x64_sys_sendto+0x20/0x30
    do_syscall_64+0x33/0x40
    entry_SYSCALL_64_after_hwframe+0x44/0xae
    RIP: 0033:0x7f83fa7a39e0
    
    This was caused by PF queue pile fragmentation due to
    flow director VSI queue being placed right after main VSI.
    Because of this main VSI was not able to resize its
    queue allocation for XDP resulting in no queues allocated
    for main VSI when XDP was turned on.
    
    Fix this by always allocating last queue in PF queue pile
    for a flow director VSI.
    
    Fixes: 41c445f ("i40e: main driver core")
    Fixes: 74608d1 ("i40e: add support for XDP_TX action")
    Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
    Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
    Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    sylwesterdziedziuch authored and anguy11 committed Jan 20, 2022
  4. i40e: Fix issue when maximum queues is exceeded

    Before this patch VF interface vanished when
    maximum queue number was exceeded. Driver tried
    to add next queues even if there was not enough
    space. PF sent incorrect number of queues to
    the VF when there were not enough of them.
    
    Add an additional condition introduced to check
    available space in 'qp_pile' before proceeding.
    This condition makes it impossible to add queues
    if they number is greater than the number resulting
    from available space.
    Also add the search for free space in PF queue
    pair piles.
    
    Without this patch VF interfaces are not seen
    when available space for queues has been
    exceeded and following logs appears permanently
    in dmesg:
    "Unable to get VF config (-32)".
    "VF 62 failed opcode 3, retval: -5"
    "Unable to get VF config due to PF error condition, not retrying"
    
    Fixes: 7daa6bf ("i40e: driver core headers")
    Fixes: 41c445f ("i40e: main driver core")
    Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
    Signed-off-by: Slawomir Laba <slawomirx.laba@intel.com>
    Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
    Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    jjagielsk authored and anguy11 committed Jan 20, 2022
  5. i40e: Increase delay to 1 s after global EMP reset

    Recently simplified i40e_rebuild causes that FW sometimes
    is not ready after NVM update, the ping does not return.
    
    Increase the delay in case of EMP reset.
    Old delay of 300 ms was introduced for specific cards for 710 series.
    Now it works for all the cards and delay was increased.
    
    Fixes: 1fa51a6 ("i40e: Add delay after EMP reset for firmware to recover")
    Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
    Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
    Tested-by: Gurucharan G <gurucharanx.g@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    jjagielsk authored and anguy11 committed Jan 20, 2022
  6. Merge branch 'stmmac-fixes'

    Yuji Ishikawa says:
    
    ====================
    net: stmmac: dwmac-visconti: Fix bit definitions and clock configuration for RMII mode
    
    This series is a fix for RMII/MII operation mode of the dwmac-visconti driver.
    It is composed of two parts:
    
    * 1/2: fix constant definitions for cleared bits in ETHER_CLK_SEL register
    * 2/2: fix configuration of ETHER_CLK_SEL register for running in RMII operation mode.
    
      net: stmmac: dwmac-visconti: Fix bit definitions for ETHER_CLK_SEL
        v1 -> v2:
          - added Fixes tag to commit message
    
      net: stmmac: dwmac-visconti: Fix clock configuration for RMII mode
        v1 -> v2:
          - added Fixes tag to commit message
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jan 20, 2022
  7. net: stmmac: dwmac-visconti: Fix clock configuration for RMII mode

    Bit pattern of the ETHER_CLOCK_SEL register for RMII/MII mode should be fixed.
    Also, some control bits should be modified with a specific sequence.
    
    Fixes: b38dd98 ("net: stmmac: Add Toshiba Visconti SoCs glue driver")
    Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
    Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Yuji Ishikawa authored and davem330 committed Jan 20, 2022
  8. net: stmmac: dwmac-visconti: Fix bit definitions for ETHER_CLK_SEL

    just 0 should be used to represent cleared bits
    
    * ETHER_CLK_SEL_DIV_SEL_20
    * ETHER_CLK_SEL_TX_CLK_EXT_SEL_IN
    * ETHER_CLK_SEL_RX_CLK_EXT_SEL_IN
    * ETHER_CLK_SEL_TX_CLK_O_TX_I
    * ETHER_CLK_SEL_RMII_CLK_SEL_IN
    
    Fixes: b38dd98 ("net: stmmac: Add Toshiba Visconti SoCs glue driver")
    Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
    Reviewed-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Yuji Ishikawa authored and davem330 committed Jan 20, 2022
  9. ipv6_tunnel: Rate limit warning messages

    The warning messages can be invoked from the data path for every packet
    transmitted through an ip6gre netdev, leading to high CPU utilization.
    
    Fix that by rate limiting the messages.
    
    Fixes: 09c6bbf ("[IPV6]: Do mandatory IPv6 tunnel endpoint checks in realtime")
    Reported-by: Maksym Yaremchuk <maksymy@nvidia.com>
    Tested-by: Maksym Yaremchuk <maksymy@nvidia.com>
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Amit Cohen <amcohen@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    idosch authored and davem330 committed Jan 20, 2022
  10. ethtool: Fix link extended state for big endian

    The link extended sub-states are assigned as enum that is an integer
    size but read from a union as u8, this is working for small values on
    little endian systems but for big endian this always give 0. Fix the
    variable in the union to match the enum size.
    
    Fixes: ecc31c6 ("ethtool: Add link extended state")
    Signed-off-by: Moshe Tal <moshet@nvidia.com>
    Reviewed-by: Ido Schimmel <idosch@nvidia.com>
    Tested-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Gal Pressman <gal@nvidia.com>
    Reviewed-by: Amit Cohen <amcohen@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Moshe Tal authored and davem330 committed Jan 20, 2022
  11. net: phy: broadcom: hook up soft_reset for BCM54616S

    A problem was encountered with the Bel-Fuse 1GBT-SFP05 SFP module (which
    is a 1 Gbps copper module operating in SGMII mode with an internal
    BCM54616S PHY device) using the Xilinx AXI Ethernet MAC core, where the
    module would work properly on the initial insertion or boot of the
    device, but after the device was rebooted, the link would either only
    come up at 100 Mbps speeds or go up and down erratically.
    
    I found no meaningful changes in the PHY configuration registers between
    the working and non-working boots, but the status registers seemed to
    have a lot of error indications set on the SERDES side of the device on
    the non-working boot. I suspect the problem is that whatever happens on
    the SGMII link when the device is rebooted and the FPGA logic gets
    reloaded ends up putting the module's onboard PHY into a bad state.
    
    Since commit 6e2d85e ("net: phy: Stop with excessive soft reset")
    the genphy_soft_reset call is not made automatically by the PHY core
    unless the callback is explicitly specified in the driver structure. For
    most of these Broadcom devices, there is probably a hardware reset that
    gets asserted to reset the PHY during boot, however for SFP modules
    (where the BCM54616S is commonly found) no such reset line exists, so if
    the board keeps the SFP cage powered up across a reboot, it will end up
    with no reset occurring during reboots.
    
    Hook up the genphy_soft_reset callback for BCM54616S to ensure that a
    PHY reset is performed before the device is initialized. This appears to
    fix the issue with erratic operation after a reboot with this SFP
    module.
    
    Fixes: 6e2d85e ("net: phy: Stop with excessive soft reset")
    Signed-off-by: Robert Hancock <robert.hancock@calian.com>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    robhancocksed authored and davem330 committed Jan 20, 2022
  12. net: sched: Clarify error message when qdisc kind is unknown

    When adding a tc rule with a qdisc kind that is not supported or not
    compiled into the kernel, the kernel emits the following error: "Error:
    Specified qdisc not found.". Found via tdc testing when ETS qdisc was not
    compiled in and it was not obvious right away what the message meant
    without looking at the kernel code.
    
    Change the error message to be more explicit and say the qdisc kind is
    unknown.
    
    Signed-off-by: Victor Nogueira <victor@mojatatu.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vbnogueira authored and davem330 committed Jan 20, 2022
  13. net: fix information leakage in /proc/net/ptype

    In one net namespace, after creating a packet socket without binding
    it to a device, users in other net namespaces can observe the new
    `packet_type` added by this packet socket by reading `/proc/net/ptype`
    file. This is minor information leakage as packet socket is
    namespace aware.
    
    Add a net pointer in `packet_type` to keep the net namespace of
    of corresponding packet socket. In `ptype_seq_show`, this net pointer
    must be checked when it is not NULL.
    
    Fixes: 2feb27d ("[NETNS]: Minor information leak via /proc/net/ptype file.")
    Signed-off-by: Congyu Liu <liu3101@purdue.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Congyu-Liu authored and davem330 committed Jan 20, 2022
Older