]> Git Repo - linux.git/log
linux.git
8 months agoi2c: viai2c: turn common code into a proper module
Arnd Bergmann [Tue, 28 May 2024 12:06:30 +0000 (14:06 +0200)]
i2c: viai2c: turn common code into a proper module

The i2c-viai2c-common.c file is used by two drivers, but is not a proper
abstraction and can get linked into both modules in the same configuration,
which results in a warning:

scripts/Makefile.build:236: drivers/i2c/busses/Makefile: i2c-viai2c-common.o is added to multiple modules: i2c-wmt i2c-zhaoxin

The other problems with this include the incorrect use of a __weak function
when both are built-in, and the fact that the "common" module is sprinked
with 'if (i2c->plat == ...)' checks that have knowledge about the differences
between the drivers using it.

Avoid the link time warning by making the common driver a proper module
with MODULE_LICENCE()/MODULE_AUTHOR() tags, and remove the __weak function
by slightly rearranging the code.

This adds a little more duplication between the two main drivers, but
those versions get more readable in the process.

Fixes: a06b80e83011 ("i2c: add zhaoxin i2c controller driver")
Signed-off-by: Arnd Bergmann <[email protected]>
Tested-by: Hans Hu <[email protected]>
Signed-off-by: Andi Shyti <[email protected]>
8 months agonetfs: Fix netfs_page_mkwrite() to flush conflicting data, not wait
David Howells [Mon, 24 Jun 2024 11:24:03 +0000 (12:24 +0100)]
netfs: Fix netfs_page_mkwrite() to flush conflicting data, not wait

Fix netfs_page_mkwrite() to use filemap_fdatawrite_range(), not
filemap_fdatawait_range() to flush conflicting data.

Fixes: 102a7e2c598c ("netfs: Allow buffered shared-writeable mmap through netfs_page_mkwrite()")
Signed-off-by: David Howells <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
cc: Matthew Wilcox <[email protected]>
cc: Jeff Layton <[email protected]>
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
Signed-off-by: Christian Brauner <[email protected]>
8 months agonetfs: Fix netfs_page_mkwrite() to check folio->mapping is valid
David Howells [Tue, 25 Jun 2024 12:29:06 +0000 (13:29 +0100)]
netfs: Fix netfs_page_mkwrite() to check folio->mapping is valid

Fix netfs_page_mkwrite() to check that folio->mapping is valid once it has
taken the folio lock (as filemap_page_mkwrite() does).  Without this,
generic/247 occasionally oopses with something like the following:

    BUG: kernel NULL pointer dereference, address: 0000000000000000
    #PF: supervisor read access in kernel mode
    #PF: error_code(0x0000) - not-present page

    RIP: 0010:trace_event_raw_event_netfs_folio+0x61/0xc0
    ...
    Call Trace:
     <TASK>
     ? __die_body+0x1a/0x60
     ? page_fault_oops+0x6e/0xa0
     ? exc_page_fault+0xc2/0xe0
     ? asm_exc_page_fault+0x22/0x30
     ? trace_event_raw_event_netfs_folio+0x61/0xc0
     trace_netfs_folio+0x39/0x40
     netfs_page_mkwrite+0x14c/0x1d0
     do_page_mkwrite+0x50/0x90
     do_pte_missing+0x184/0x200
     __handle_mm_fault+0x42d/0x500
     handle_mm_fault+0x121/0x1f0
     do_user_addr_fault+0x23e/0x3c0
     exc_page_fault+0xc2/0xe0
     asm_exc_page_fault+0x22/0x30

This is due to the invalidate_inode_pages2_range() issued at the end of the
DIO write interfering with the mmap'd writes.

Fixes: 102a7e2c598c ("netfs: Allow buffered shared-writeable mmap through netfs_page_mkwrite()")
Signed-off-by: David Howells <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Jeff Layton <[email protected]>
cc: Matthew Wilcox <[email protected]>
cc: Jeff Layton <[email protected]>
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
Signed-off-by: Christian Brauner <[email protected]>
8 months agonetfs: Delete some xarray-wangling functions that aren't used
David Howells [Thu, 6 Jun 2024 10:10:44 +0000 (11:10 +0100)]
netfs: Delete some xarray-wangling functions that aren't used

Delete some xarray-based buffer wangling functions that are intended for
use with bounce buffering, but aren't used because bounce-buffering got
deferred to a later patch series.  Now, however, the intention is to use
something other than an xarray to do this.

Signed-off-by: David Howells <[email protected]>
cc: Jeff Layton <[email protected]>
cc: [email protected]
cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
8 months agonetfs: Fix early issue of write op on partial write to folio tail
David Howells [Wed, 5 Jun 2024 21:18:04 +0000 (22:18 +0100)]
netfs: Fix early issue of write op on partial write to folio tail

During the writeback procedure, at the end of netfs_write_folio(), pending
write operations are flushed if the amount of write-streaming data stored
in a page is less than the size of the folio because if we haven't modified
a folio to the end, it cannot be contiguous with the following folio...
except if the dirty region of the folio is right at the end of the folio
space.

Fix the test to take the offset into the folio into account as well, such
that if the dirty region runs right up to the end of the folio, we leave
the flushing for later.

Fixes: 288ace2f57c9 ("netfs: New writeback implementation")
Signed-off-by: David Howells <[email protected]>
cc: Jeff Layton <[email protected]>
cc: Eric Van Hensbergen <[email protected]>
cc: Latchesar Ionkov <[email protected]>
cc: Dominique Martinet <[email protected]>
cc: Christian Schoenebeck <[email protected]>
cc: Marc Dionne <[email protected]>
cc: Steve French <[email protected]>
cc: Paulo Alcantara <[email protected]> (DFS, global name space)
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
8 months agonetfs: Fix io_uring based write-through
David Howells [Mon, 20 May 2024 15:12:56 +0000 (16:12 +0100)]
netfs: Fix io_uring based write-through

[This was included in v2 of 9b038d004ce95551cb35381c49fe896c5bc11ffe, but
v1 got pushed instead]

Fix netfs_unbuffered_write_iter_locked() to set the total request length in
the netfs_io_request struct rather than leaving it as zero.

Fixes: 288ace2f57c9 ("netfs: New writeback implementation")
Signed-off-by: David Howells <[email protected]>
cc: Jeff Layton <[email protected]>
cc: Steve French <[email protected]>
cc: Enzo Matsumiya <[email protected]>
cc: Christian Brauner <[email protected]>
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
8 months agoASoC: amd: yc: Fix non-functional mic on ASUS M5602RA
Vyacheslav Frantsishko [Wed, 26 Jun 2024 07:03:34 +0000 (10:03 +0300)]
ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA

The Vivobook S 16X IPS needs a quirks-table entry for the internal microphone to function properly.

Signed-off-by: Vyacheslav Frantsishko <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mark Brown <[email protected]>
8 months agoerofs: convert to use super_set_uuid to support for FS_IOC_GETFSUUID
Huang Xiaojia [Mon, 24 Jun 2024 06:37:04 +0000 (14:37 +0800)]
erofs: convert to use super_set_uuid to support for FS_IOC_GETFSUUID

FS_IOC_GETFSUUID ioctl exposes the uuid of a filesystem. To support
the ioctl, init sb->s_uuid with super_set_uuid().

Signed-off-by: Huang Xiaojia <[email protected]>
Reviewed-by: Gao Xiang <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Gao Xiang <[email protected]>
8 months agoerofs: fix possible memory leak in z_erofs_gbuf_exit()
Sandeep Dhavale [Mon, 24 Jun 2024 22:02:05 +0000 (15:02 -0700)]
erofs: fix possible memory leak in z_erofs_gbuf_exit()

Because we incorrectly reused of variable `i` in `z_erofs_gbuf_exit()`
for inner loop, we may exit early from outer loop resulting in memory
leak. Fix this by using separate variable for iterating through inner loop.

Fixes: f36f3010f676 ("erofs: rename per-CPU buffers to global buffer pool and make it configurable")
Signed-off-by: Sandeep Dhavale <[email protected]>
Reviewed-by: Gao Xiang <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Gao Xiang <[email protected]>
8 months agoxfs: honor init_xattrs in xfs_init_new_inode for !ATTR fs
Darrick J. Wong [Wed, 19 Jun 2024 17:32:46 +0000 (10:32 -0700)]
xfs: honor init_xattrs in xfs_init_new_inode for !ATTR fs

xfs_init_new_inode ignores the init_xattrs parameter for filesystems
that do not have ATTR enabled.  As a result, the first init_xattrs file
to be created by the kernel will not have an attr fork created to store
acls.  Storing that first acl will add ATTR to the superblock flags, so
subsequent files will be created with attr forks.  The overhead of this
is so small that chances are that nobody has noticed this behavior.

However, this is disastrous on a filesystem with parent pointers because
it requires that a new linkable file /must/ have a pre-existing attr
fork, and the parent pointers code uses init_xattrs to create that fork.
The preproduction version of mkfs.xfs used to set this, but the V5 sb
verifier only requires ATTR2, not ATTR.  There is no guard for
filesystems with (PARENT && !ATTR).

It turns out that I misunderstood the two flags -- ATTR means that we at
some point created an attr fork to store xattrs in a file; ATTR2
apparently means only that inodes have dynamic fork offsets or that the
filesystem was mounted with the "attr2" option.

Fixes: 2442ee15bb1e ("xfs: eager inode attr fork init needs attr feature awareness")
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
8 months agoxfs: fix direction in XFS_IOC_EXCHANGE_RANGE
Darrick J. Wong [Thu, 20 Jun 2024 22:05:26 +0000 (15:05 -0700)]
xfs: fix direction in XFS_IOC_EXCHANGE_RANGE

The kernel reads userspace's buffer but does not write it back.
Therefore this is really an _IOW ioctl.  Change this before 6.10 final
releases.

Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
8 months agoxfs: allow unlinked symlinks and dirs with zero size
Darrick J. Wong [Wed, 19 Jun 2024 17:32:45 +0000 (10:32 -0700)]
xfs: allow unlinked symlinks and dirs with zero size

For a very very long time, inode inactivation has set the inode size to
zero before unmapping the extents associated with the data fork.
Unfortunately, commit 3c6f46eacd876 changed the inode verifier to
prohibit zero-length symlinks and directories.  If an inode happens to
get logged in this state and the system crashes before freeing the
inode, log recovery will also fail on the broken inode.

Therefore, allow zero-size symlinks and directories as long as the link
count is zero; nobody will be able to open these files by handle so
there isn't any risk of data exposure.

Fixes: 3c6f46eacd876 ("xfs: sanity check directory inode di_size")
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
8 months agoxfs: restrict when we try to align cow fork delalloc to cowextsz hints
Darrick J. Wong [Wed, 19 Jun 2024 17:32:44 +0000 (10:32 -0700)]
xfs: restrict when we try to align cow fork delalloc to cowextsz hints

xfs/205 produces the following failure when always_cow is enabled:

  --- a/tests/xfs/205.out 2024-02-28 16:20:24.437887970 -0800
  +++ b/tests/xfs/205.out.bad 2024-06-03 21:13:40.584000000 -0700
  @@ -1,4 +1,5 @@
   QA output created by 205
   *** one file
  +   !!! disk full (expected)
   *** one file, a few bytes at a time
   *** done

This is the result of overly aggressive attempts to align cow fork
delalloc reservations to the CoW extent size hint.  Looking at the trace
data, we're trying to append a single fsblock to the "fred" file.
Trying to create a speculative post-eof reservation fails because
there's not enough space.

We then set @prealloc_blocks to zero and try again, but the cowextsz
alignment code triggers, which expands our request for a 1-fsblock
reservation into a 39-block reservation.  There's not enough space for
that, so the whole write fails with ENOSPC even though there's
sufficient space in the filesystem to allocate the single block that we
need to land the write.

There are two things wrong here -- first, we shouldn't be attempting
speculative preallocations beyond what was requested when we're low on
space.  Second, if we've already computed a posteof preallocation, we
shouldn't bother trying to align that to the cowextsize hint.

Fix both of these problems by adding a flag that only enables the
expansion of the delalloc reservation to the cowextsize if we're doing a
non-extending write, and only if we're not doing an ENOSPC retry.  This
requires us to move the ENOSPC retry logic to xfs_bmapi_reserve_delalloc.

I probably should have caught this six years ago when 6ca30729c206d was
being reviewed, but oh well.  Update the comments to reflect what the
code does now.

Fixes: 6ca30729c206d ("xfs: bmap code cleanup")
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
8 months agoxfs: fix freeing speculative preallocations for preallocated files
Christoph Hellwig [Wed, 19 Jun 2024 17:32:43 +0000 (10:32 -0700)]
xfs: fix freeing speculative preallocations for preallocated files

xfs_can_free_eofblocks returns false for files that have persistent
preallocations unless the force flag is passed and there are delayed
blocks.  This means it won't free delalloc reservations for files
with persistent preallocations unless the force flag is set, and it
will also free the persistent preallocations if the force flag is
set and the file happens to have delayed allocations.

Both of these are bad, so do away with the force flag and always free
only post-EOF delayed allocations for files with the XFS_DIFLAG_PREALLOC
or APPEND flags set.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
8 months agonet: rfkill: Correct return value in invalid parameter case
Zijun Hu [Thu, 13 Jun 2024 14:04:36 +0000 (22:04 +0800)]
net: rfkill: Correct return value in invalid parameter case

rfkill_set_hw_state_reason() does not return current combined
block state when its parameter @reason is invalid, that is
wrong according to its comments, fix it by correcting the
value returned.

Also reformat the WARN while at it.

Signed-off-by: Zijun Hu <[email protected]>
Link: https://patch.msgid.link/[email protected]
[edit/reformat commit message, remove unneeded variable]
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: fix NULL dereference at band check in starting tx ba session
Zong-Zhe Yang [Mon, 17 Jun 2024 11:52:17 +0000 (19:52 +0800)]
wifi: mac80211: fix NULL dereference at band check in starting tx ba session

In MLD connection, link_data/link_conf are dynamically allocated. They
don't point to vif->bss_conf. So, there will be no chanreq assigned to
vif->bss_conf and then the chan will be NULL. Tweak the code to check
ht_supported/vht_supported/has_he/has_eht on sta deflink.

Crash log (with rtw89 version under MLO development):
[ 9890.526087] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 9890.526102] #PF: supervisor read access in kernel mode
[ 9890.526105] #PF: error_code(0x0000) - not-present page
[ 9890.526109] PGD 0 P4D 0
[ 9890.526114] Oops: 0000 [#1] PREEMPT SMP PTI
[ 9890.526119] CPU: 2 PID: 6367 Comm: kworker/u16:2 Kdump: loaded Tainted: G           OE      6.9.0 #1
[ 9890.526123] Hardware name: LENOVO 2356AD1/2356AD1, BIOS G7ETB3WW (2.73 ) 11/28/2018
[ 9890.526126] Workqueue: phy2 rtw89_core_ba_work [rtw89_core]
[ 9890.526203] RIP: 0010:ieee80211_start_tx_ba_session (net/mac80211/agg-tx.c:618 (discriminator 1)) mac80211
[ 9890.526279] Code: f7 e8 d5 93 3e ea 48 83 c4 28 89 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc 49 8b 84 24 e0 f1 ff ff 48 8b 80 90 1b 00 00 <83> 38 03 0f 84 37 fe ff ff bb ea ff ff ff eb cc 49 8b 84 24 10 f3
All code
========
   0: f7 e8                 imul   %eax
   2: d5                    (bad)
   3: 93                    xchg   %eax,%ebx
   4: 3e ea                 ds (bad)
   6: 48 83 c4 28           add    $0x28,%rsp
   a: 89 d8                 mov    %ebx,%eax
   c: 5b                    pop    %rbx
   d: 41 5c                 pop    %r12
   f: 41 5d                 pop    %r13
  11: 41 5e                 pop    %r14
  13: 41 5f                 pop    %r15
  15: 5d                    pop    %rbp
  16: c3                    retq
  17: cc                    int3
  18: cc                    int3
  19: cc                    int3
  1a: cc                    int3
  1b: 49 8b 84 24 e0 f1 ff  mov    -0xe20(%r12),%rax
  22: ff
  23: 48 8b 80 90 1b 00 00  mov    0x1b90(%rax),%rax
  2a:* 83 38 03              cmpl   $0x3,(%rax) <-- trapping instruction
  2d: 0f 84 37 fe ff ff     je     0xfffffffffffffe6a
  33: bb ea ff ff ff        mov    $0xffffffea,%ebx
  38: eb cc                 jmp    0x6
  3a: 49                    rex.WB
  3b: 8b                    .byte 0x8b
  3c: 84 24 10              test   %ah,(%rax,%rdx,1)
  3f: f3                    repz

Code starting with the faulting instruction
===========================================
   0: 83 38 03              cmpl   $0x3,(%rax)
   3: 0f 84 37 fe ff ff     je     0xfffffffffffffe40
   9: bb ea ff ff ff        mov    $0xffffffea,%ebx
   e: eb cc                 jmp    0xffffffffffffffdc
  10: 49                    rex.WB
  11: 8b                    .byte 0x8b
  12: 84 24 10              test   %ah,(%rax,%rdx,1)
  15: f3                    repz
[ 9890.526285] RSP: 0018:ffffb8db09013d68 EFLAGS: 00010246
[ 9890.526291] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff9308e0d656c8
[ 9890.526295] RDX: 0000000000000000 RSI: ffffffffab99460b RDI: ffffffffab9a7685
[ 9890.526300] RBP: ffffb8db09013db8 R08: 0000000000000000 R09: 0000000000000873
[ 9890.526304] R10: ffff9308e0d64800 R11: 0000000000000002 R12: ffff9308e5ff6e70
[ 9890.526308] R13: ffff930952500e20 R14: ffff9309192a8c00 R15: 0000000000000000
[ 9890.526313] FS:  0000000000000000(0000) GS:ffff930b4e700000(0000) knlGS:0000000000000000
[ 9890.526316] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 9890.526318] CR2: 0000000000000000 CR3: 0000000391c58005 CR4: 00000000001706f0
[ 9890.526321] Call Trace:
[ 9890.526324]  <TASK>
[ 9890.526327] ? show_regs (arch/x86/kernel/dumpstack.c:479)
[ 9890.526335] ? __die (arch/x86/kernel/dumpstack.c:421 arch/x86/kernel/dumpstack.c:434)
[ 9890.526340] ? page_fault_oops (arch/x86/mm/fault.c:713)
[ 9890.526347] ? search_module_extables (kernel/module/main.c:3256 (discriminator 3))
[ 9890.526353] ? ieee80211_start_tx_ba_session (net/mac80211/agg-tx.c:618 (discriminator 1)) mac80211

Signed-off-by: Zong-Zhe Yang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: fix rs.h kernel-doc
Johannes Berg [Tue, 25 Jun 2024 16:51:23 +0000 (19:51 +0300)]
wifi: iwlwifi: mvm: fix rs.h kernel-doc

Some things are mislabeled here, fix that.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.baa3bd60c8f8.Ibc4886f7fe696d57991689cc2885cde5cecc8f90@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: fw: api: datapath: fix kernel-doc
Johannes Berg [Tue, 25 Jun 2024 16:51:22 +0000 (19:51 +0300)]
wifi: iwlwifi: fw: api: datapath: fix kernel-doc

Fix kernel-doc warnings in datapath.h.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.1a644d4c38f4.I6060819da2bfc948bee089a91626ff474300a896@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: fix remaining mistagged kernel-doc comments
Johannes Berg [Tue, 25 Jun 2024 16:51:21 +0000 (19:51 +0300)]
wifi: iwlwifi: fix remaining mistagged kernel-doc comments

There are some comments left that aren't really kernel-doc,
remove the extra * that tags them.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.98119856de4b.I9ca0cee675b166c4a7d58d619ce3278494398ea2@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: fix prototype mismatch kernel-doc warnings
Johannes Berg [Tue, 25 Jun 2024 16:51:20 +0000 (19:51 +0300)]
wifi: iwlwifi: fix prototype mismatch kernel-doc warnings

Fix all the prototype mismatch and "wrong kernel-doc identifier"
warnings, due to typos in or misformatting of the kernel-doc.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.6ec65cf9b88c.I7804114d7369f352e80a0e8430f7119af8e210de@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: fix kernel-doc in iwl-fh.h
Johannes Berg [Tue, 25 Jun 2024 16:51:19 +0000 (19:51 +0300)]
wifi: iwlwifi: fix kernel-doc in iwl-fh.h

Some blocks aren't really kernel-doc, and some are misformatted
or with mismatched names. Fix that.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.16865e5503ac.I5401edbf9ecbc25e07aad929bb56255410173711@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: fix kernel-doc in iwl-trans.h
Johannes Berg [Tue, 25 Jun 2024 16:51:18 +0000 (19:51 +0300)]
wifi: iwlwifi: fix kernel-doc in iwl-trans.h

One mismatched enum name, and some missing docs.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.4846bf27dec1.I31fdfad01abc82b1340c59e51ece3db2242c8816@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: pcie: fix kernel-doc
Johannes Berg [Tue, 25 Jun 2024 16:51:17 +0000 (19:51 +0300)]
wifi: iwlwifi: pcie: fix kernel-doc

One typo, and a few things were missing. Fix that.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.c667bc035757.Iae0e5903a35f8e42f86deb27429131f22329b8dd@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: dvm: fix kernel-doc warnings
Johannes Berg [Tue, 25 Jun 2024 16:51:16 +0000 (19:51 +0300)]
wifi: iwlwifi: dvm: fix kernel-doc warnings

Mostly the docs just aren't kernel-doc anyway, and one is a typo.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.8b12f56bf8c0.I64fa9df72ca0e862b96647c062b8c9464318e649@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: don't log error for failed UATS table read
Benjamin Berg [Tue, 25 Jun 2024 16:51:15 +0000 (19:51 +0300)]
wifi: iwlwifi: mvm: don't log error for failed UATS table read

This causes unnecessary error level kernel messages if the platform
does not have any UATS table.

Signed-off-by: Benjamin Berg <[email protected]>
Reviewed-by: Mukesh Sisodiya <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.306b7eed8671.I6e9294335378dab38ef957866a0d39ec1a2df7f8@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: trans: make bad state warnings
Johannes Berg [Tue, 25 Jun 2024 16:51:14 +0000 (19:51 +0300)]
wifi: iwlwifi: trans: make bad state warnings

Kalle reported that this triggers very occasionally, but
we don't even know which place, except that it wasn't one
with a warning. Make all of them warnings since this is
really not meant to happen and indicates driver bugs.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.be7a3a95afae.Ie8606d36783818c043c971bf0bc6f4df6a6e8f5b@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: fw: api: fix some kernel-doc
Johannes Berg [Tue, 25 Jun 2024 16:51:13 +0000 (19:51 +0300)]
wifi: iwlwifi: fw: api: fix some kernel-doc

There are naming issues of structs vs. kernel-doc,
fix some that I noticed now.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.4c530804b4ff.I68b894b9cdbd9560d86b92646e9b6b17a6d5117e@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: remove init_dbg module parameter
Miri Korenblit [Tue, 25 Jun 2024 16:51:12 +0000 (19:51 +0300)]
wifi: iwlwifi: mvm: remove init_dbg module parameter

This is no longer used

Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Emmanuel Grumbach <[email protected]>
Link: https://patch.msgid.link/20240625194805.17a1484f2485.I095c7482ac517111081f8ff40312b48ffdd7ff94@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: update the BA notification API
Emmanuel Grumbach [Tue, 25 Jun 2024 16:51:11 +0000 (19:51 +0300)]
wifi: iwlwifi: update the BA notification API

We don't use the new field, but at least, document the change.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.3d7887e2e374.I37bf709969d069ff0392e0976e62e06fb7a87bc9@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: always unblock EMLSR on ROC end
Johannes Berg [Tue, 25 Jun 2024 16:51:10 +0000 (19:51 +0300)]
wifi: iwlwifi: mvm: always unblock EMLSR on ROC end

Since we always block EMLSR for ROC, we also need to always
unblock it, even if we don't have a P2P device interface.
Fix this.

Fixes: a1efeb823084 ("wifi: iwlwifi: mvm: Block EMLSR when a p2p/softAP vif is active")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.96bbf98b716d.Id5a36954f8ebaa95142fd3d3a7a52bab5363b0bd@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: use IWL_FW_CHECK for link ID check
Johannes Berg [Tue, 25 Jun 2024 16:51:09 +0000 (19:51 +0300)]
wifi: iwlwifi: mvm: use IWL_FW_CHECK for link ID check

The lookup function iwl_mvm_rcu_fw_link_id_to_link_conf() is
normally called with input from the firmware, so it should use
IWL_FW_CHECK() instead of WARN_ON().

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.4ea8fb7c47d4.I1c22af213f97f69bfc14674502511c1bc504adfb@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: don't flush BSSes on restart with MLD API
Johannes Berg [Tue, 25 Jun 2024 16:51:08 +0000 (19:51 +0300)]
wifi: iwlwifi: mvm: don't flush BSSes on restart with MLD API

If the firmware has MLD APIs, it will handle all timing and we
don't need to give it timestamps. Therefore, we don't care about
the timestamps stored in the BSS table, so there's no need to
flush the BSS table.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.c6d86dc2377e.I246d0fae0d23ed34b7cd9c3400edb004eb5ac1d0@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: remove MVM prefix from scan API
Daniel Gabay [Tue, 25 Jun 2024 16:51:07 +0000 (19:51 +0300)]
wifi: iwlwifi: remove MVM prefix from scan API

These are not MVM specific.

Signed-off-by: Daniel Gabay <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240625194805.09f672318944.Idffeab6a4dfc12effebd1c50815ae5c540afca74@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: remove AX101, AX201 and AX203 support from LNL
Golan Ben Ami [Thu, 13 Jun 2024 14:11:23 +0000 (17:11 +0300)]
wifi: iwlwifi: remove AX101, AX201 and AX203 support from LNL

LNL is the codename for the upcoming Series 2 Core Ultra
processors designed by Intel. AX101, AX201 and AX203 devices
are not shiped on LNL platforms, so don't support them.

Signed-off-by: Golan Ben Ami <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240613171043.f24a228dfd96.I989a2d3f1513211bc49ac8143ee4e9e341e1ee67@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: don't limit VLP/AFC to UATS-enabled
Johannes Berg [Tue, 18 Jun 2024 16:59:45 +0000 (19:59 +0300)]
wifi: iwlwifi: mvm: don't limit VLP/AFC to UATS-enabled

When UATS isn't enabled (no VLP/AFC AP support), we need to still
set the right bits in the channel/regulatory flags, so remove the
uats_enabled argument to the parsing etc.

Also, firmware deals just fine with getting the UATS table if it
supports the command even if the bits aren't set, so always send
it, since it's also needed if BIT(31) is set, but the driver need
not have any knowledge of that. Remove 'uats_enabled' entirely.

Fixes: 0d2fc8821a7d ("wifi: iwlwifi: nvm: parse the VLP/AFC bit from regulatory")
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618195731.a81e7234c4f6.Ic0131180d38e0f1ead2f7fa0e7583407ceaa0bd1@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: enable VLP AP on VLP channels
Johannes Berg [Tue, 18 Jun 2024 16:44:13 +0000 (19:44 +0300)]
wifi: iwlwifi: mvm: enable VLP AP on VLP channels

If channels are marked VLP, then we're actually also
allowed to be VLP AP/GO. Enable this.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618194245.e15f24fc6bc8.I33ed7d141fec731e79370ba6c7cfbe28776944a0@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mei: clarify iwl_mei_pldr_req() docs
Johannes Berg [Tue, 18 Jun 2024 16:44:12 +0000 (19:44 +0300)]
wifi: iwlwifi: mei: clarify iwl_mei_pldr_req() docs

This isn't related to whether or not "fw can be loaded",
but rather requesting that ME go into a state where doing
a product reset is safe. This is related to FW load only
in the specific case of where it's used today in iwlmvm,
notably when it's known that the firmware itself will (or
at least may) do a product reset during load.

Clarify the documentation.

I was tempted to rename things too, but on the ME side it
really is also called PLDR (which is a Windows term and
may not even match the complete behaviour since doing a
full product reset from the driver also requires calling
an ACPI method first.) So keep the name aligned with ME.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618194245.ca2c55121a04.I889cd47210367ca9110411472ee696b796a37ab5@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: rename 'pldr_sync'
Johannes Berg [Tue, 18 Jun 2024 16:44:11 +0000 (19:44 +0300)]
wifi: iwlwifi: mvm: rename 'pldr_sync'

PLDR (product level device reset) is a Windows term, and
is something the driver triggers there, AFAICT.

Really what 'pldr_sync' here wants to capture is whether
or not the firmware will/may do a product reset during
initialization, which makes the device drop off the bus,
requiring a rescan. If this is the case, obviously the
init will fail/time out, so we don't want to report all
kinds of errors etc., hence this tracking variable.

Rename it to 'fw_product_reset' to capture the meaning
better.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618194245.ccf849642af8.I01dded6b2393771b7baf8b4b17336784d987c7c2@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: Fix associated initiator key setting
Ilan Peer [Tue, 18 Jun 2024 16:44:10 +0000 (19:44 +0300)]
wifi: iwlwifi: mvm: Fix associated initiator key setting

When setting the keys for secure measurement with an AP the station
is associated with, the TK should only be referenced and not copied.

In addition set the cipher only when the correct station is found.

Fixes: 626be4bf99f6 ("wifi: iwlwifi: mvm: modify iwl_mvm_ftm_set_secured_ranging() parameters")
Signed-off-by: Ilan Peer <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618194245.be2a5327554d.Ie53220b075dacb23a8d073f6008aafd339368592@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: dissolve iwl_mvm_mac_remove_interface_common()
Johannes Berg [Tue, 18 Jun 2024 16:44:09 +0000 (19:44 +0300)]
wifi: iwlwifi: mvm: dissolve iwl_mvm_mac_remove_interface_common()

Since the function isn't actually common (any more), just
dissolve it.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618194245.adf54ab5bc4a.I90339f152bba73b622e05063d16ae914ae20053f@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: trans: remove unused status bits
Emmanuel Grumbach [Tue, 18 Jun 2024 16:44:08 +0000 (19:44 +0300)]
wifi: iwlwifi: trans: remove unused status bits

Those bits are never used.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618194245.cd26318d9513.I035ec7f3f022cdc19a650eca3b89455e3b5eca18@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: don't assume op_mode_nic_config exists
Emmanuel Grumbach [Tue, 18 Jun 2024 16:44:07 +0000 (19:44 +0300)]
wifi: iwlwifi: don't assume op_mode_nic_config exists

The new op_mode won't have this callback.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Link: https://patch.msgid.link/20240618194245.718983e7b832.I02fb130aa3d2044958cba7dced357031b92e33bb@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: bump FW API to 92 for BZ/SC devices
Miri Korenblit [Tue, 18 Jun 2024 16:44:06 +0000 (19:44 +0300)]
wifi: iwlwifi: bump FW API to 92 for BZ/SC devices

Start supporting API version 92 for new devices.

Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618194245.433cfbb6f042.I914da5bd0e2ed25148726f9fb55e7a60b895edfd@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: trans: remove unused function parameter
Miri Korenblit [Tue, 18 Jun 2024 16:44:05 +0000 (19:44 +0300)]
wifi: iwlwifi: trans: remove unused function parameter

iwl_trans_pcie_gen2_fw_alive doesn't use the scd_addr parameter,
it was there only because we needed the functio to have a prototype same
as iwl_trans_ops::fw_alive callback.
But now the ops is removed so no reason to keep the parameter.

Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Emmanuel Grumbach <[email protected]>
Link: https://patch.msgid.link/20240618194245.1aa8bf13aea9.I9662c10c1db545dd8849af4bb4ab47708d4548d8@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: remove IWL_MVM_PARSE_NVM
Miri Korenblit [Tue, 18 Jun 2024 16:44:04 +0000 (19:44 +0300)]
wifi: iwlwifi: mvm: remove IWL_MVM_PARSE_NVM

This debug is not in use anymore. Remove it.

Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Link: https://patch.msgid.link/20240618194245.bded22049fae.I980c4a941d769f93cf74bfc90a7d7d9fb384dea1@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: support fast resume
Emmanuel Grumbach [Tue, 18 Jun 2024 16:44:03 +0000 (19:44 +0300)]
wifi: iwlwifi: support fast resume

This will allow to suspend / resume the system without resetting the
firmware. This will allow to reduce the resume time.
In case the fast_resume fails, stop the device and bring it up from
scratch.

Raise the timeout for the D3_END notification since in some iterations,
it took 240ms.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618194245.03b8d2801044.I613d17c712de7a0d611cde4e14f37ebbe0c3c964@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: fix iwl_mvm_get_valid_rx_ant()
Daniel Gabay [Tue, 18 Jun 2024 17:03:03 +0000 (20:03 +0300)]
wifi: iwlwifi: fix iwl_mvm_get_valid_rx_ant()

Fix incorrect use of _tx_ valid ant data in the function.

Fixes: 4ea1ed1d14d8 ("wifi: iwlwifi: mvm: support set_antenna()")
Signed-off-by: Daniel Gabay <[email protected]>
Reviewed-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618200104.b7c6a320c7dc.I3092eb5275056f2162b9694e583c310c38568b2a@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: mvm: unify and fix interface combinations
Johannes Berg [Tue, 18 Jun 2024 17:03:02 +0000 (20:03 +0300)]
wifi: iwlwifi: mvm: unify and fix interface combinations

AP interfaces fundamentally cannot leave the channel, so multi-
channel operation with them isn't really possible. We shouldn't
advertise support for such, at least not as long as we don't
have full multi-radio support. Thus, remove the AP bit from the
interface combinations for two channels and add another set for
just one channel that has it.

Also, to avoid duplicating everything even more, unify the NAN
and non-NAN cases.

Signed-off-by: Johannes Berg <[email protected]>
Reviewed-by: Ilan Peer <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618200104.3213638262ef.I2a0031b37623d7763fd0c5405477ea7206a3e923@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: iwlwifi: pcie: fix a few legacy register accesses for new devices
Emmanuel Grumbach [Tue, 18 Jun 2024 17:03:01 +0000 (20:03 +0300)]
wifi: iwlwifi: pcie: fix a few legacy register accesses for new devices

Do not access legacy bits for new devices, this has no effect.
Somehow, wowlan worked despite the usage of the wrong bits. Now
that we want to keep the firmware loaded during suspend even without
wowlan, this change is needed.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618200104.399d4d215210.Id12e7fdb7bab9f2c4c0d292519b5c1b4753a8c84@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: inform the low level if drv_stop() is a suspend
Emmanuel Grumbach [Tue, 18 Jun 2024 16:25:56 +0000 (19:25 +0300)]
wifi: mac80211: inform the low level if drv_stop() is a suspend

This will allow the low level driver to take different actions for
different flows.

Signed-off-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Miri Korenblit <[email protected]>
Link: https://patch.msgid.link/20240618192529.739036208b6e.Ie18a2fe8e02bf2717549d39420b350cfdaf3d317@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: disable softirqs for queued frame handling
Johannes Berg [Wed, 26 Jun 2024 07:15:59 +0000 (09:15 +0200)]
wifi: mac80211: disable softirqs for queued frame handling

As noticed by syzbot, calling ieee80211_handle_queued_frames()
(and actually handling frames there) requires softirqs to be
disabled, since we call into the RX code. Fix that in the case
of cleaning up frames left over during shutdown.

Fixes: 177c6ae9725d ("wifi: mac80211: handle tasklet frames before stopping")
Reported-by: [email protected]
Link: https://patch.msgid.link/20240626091559.cd6f08105a6e.I74778610a5ff2cf8680964698131099d2960352a@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: cfg80211: restrict NL80211_ATTR_TXQ_QUANTUM values
Eric Dumazet [Sat, 15 Jun 2024 16:08:00 +0000 (16:08 +0000)]
wifi: cfg80211: restrict NL80211_ATTR_TXQ_QUANTUM values

syzbot is able to trigger softlockups, setting NL80211_ATTR_TXQ_QUANTUM
to 2^31.

We had a similar issue in sch_fq, fixed with commit
d9e15a273306 ("pkt_sched: fq: do not accept silly TCA_FQ_QUANTUM")

watchdog: BUG: soft lockup - CPU#1 stuck for 26s! [kworker/1:0:24]
Modules linked in:
irq event stamp: 131135
 hardirqs last  enabled at (131134): [<ffff80008ae8778c>] __exit_to_kernel_mode arch/arm64/kernel/entry-common.c:85 [inline]
 hardirqs last  enabled at (131134): [<ffff80008ae8778c>] exit_to_kernel_mode+0xdc/0x10c arch/arm64/kernel/entry-common.c:95
 hardirqs last disabled at (131135): [<ffff80008ae85378>] __el1_irq arch/arm64/kernel/entry-common.c:533 [inline]
 hardirqs last disabled at (131135): [<ffff80008ae85378>] el1_interrupt+0x24/0x68 arch/arm64/kernel/entry-common.c:551
 softirqs last  enabled at (125892): [<ffff80008907e82c>] neigh_hh_init net/core/neighbour.c:1538 [inline]
 softirqs last  enabled at (125892): [<ffff80008907e82c>] neigh_resolve_output+0x268/0x658 net/core/neighbour.c:1553
 softirqs last disabled at (125896): [<ffff80008904166c>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19
CPU: 1 PID: 24 Comm: kworker/1:0 Not tainted 6.9.0-rc7-syzkaller-gfda5695d692c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Workqueue: mld mld_ifc_work
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : __list_del include/linux/list.h:195 [inline]
 pc : __list_del_entry include/linux/list.h:218 [inline]
 pc : list_move_tail include/linux/list.h:310 [inline]
 pc : fq_tin_dequeue include/net/fq_impl.h:112 [inline]
 pc : ieee80211_tx_dequeue+0x6b8/0x3b4c net/mac80211/tx.c:3854
 lr : __list_del_entry include/linux/list.h:218 [inline]
 lr : list_move_tail include/linux/list.h:310 [inline]
 lr : fq_tin_dequeue include/net/fq_impl.h:112 [inline]
 lr : ieee80211_tx_dequeue+0x67c/0x3b4c net/mac80211/tx.c:3854
sp : ffff800093d36700
x29: ffff800093d36a60 x28: ffff800093d36960 x27: dfff800000000000
x26: ffff0000d800ad50 x25: ffff0000d800abe0 x24: ffff0000d800abf0
x23: ffff0000e0032468 x22: ffff0000e00324d4 x21: ffff0000d800abf0
x20: ffff0000d800abf8 x19: ffff0000d800abf0 x18: ffff800093d363c0
x17: 000000000000d476 x16: ffff8000805519dc x15: ffff7000127a6cc8
x14: 1ffff000127a6cc8 x13: 0000000000000004 x12: ffffffffffffffff
x11: ffff7000127a6cc8 x10: 0000000000ff0100 x9 : 0000000000000000
x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000
x5 : ffff80009287aa08 x4 : 0000000000000008 x3 : ffff80008034c7fc
x2 : ffff0000e0032468 x1 : 00000000da0e46b8 x0 : ffff0000e0032470
Call trace:
  __list_del include/linux/list.h:195 [inline]
  __list_del_entry include/linux/list.h:218 [inline]
  list_move_tail include/linux/list.h:310 [inline]
  fq_tin_dequeue include/net/fq_impl.h:112 [inline]
  ieee80211_tx_dequeue+0x6b8/0x3b4c net/mac80211/tx.c:3854
  wake_tx_push_queue net/mac80211/util.c:294 [inline]
  ieee80211_handle_wake_tx_queue+0x118/0x274 net/mac80211/util.c:315
  drv_wake_tx_queue net/mac80211/driver-ops.h:1350 [inline]
  schedule_and_wake_txq net/mac80211/driver-ops.h:1357 [inline]
  ieee80211_queue_skb+0x18e8/0x2244 net/mac80211/tx.c:1664
  ieee80211_tx+0x260/0x400 net/mac80211/tx.c:1966
  ieee80211_xmit+0x278/0x354 net/mac80211/tx.c:2062
  __ieee80211_subif_start_xmit+0xab8/0x122c net/mac80211/tx.c:4338
  ieee80211_subif_start_xmit+0xe0/0x438 net/mac80211/tx.c:4532
  __netdev_start_xmit include/linux/netdevice.h:4903 [inline]
  netdev_start_xmit include/linux/netdevice.h:4917 [inline]
  xmit_one net/core/dev.c:3531 [inline]
  dev_hard_start_xmit+0x27c/0x938 net/core/dev.c:3547
  __dev_queue_xmit+0x1678/0x33fc net/core/dev.c:4341
  dev_queue_xmit include/linux/netdevice.h:3091 [inline]
  neigh_resolve_output+0x558/0x658 net/core/neighbour.c:1563
  neigh_output include/net/neighbour.h:542 [inline]
  ip6_finish_output2+0x104c/0x1ee8 net/ipv6/ip6_output.c:137
  ip6_finish_output+0x428/0x7a0 net/ipv6/ip6_output.c:222
  NF_HOOK_COND include/linux/netfilter.h:303 [inline]
  ip6_output+0x270/0x594 net/ipv6/ip6_output.c:243
  dst_output include/net/dst.h:450 [inline]
  NF_HOOK+0x160/0x4f0 include/linux/netfilter.h:314
  mld_sendpack+0x7b4/0x10f4 net/ipv6/mcast.c:1818
  mld_send_cr net/ipv6/mcast.c:2119 [inline]
  mld_ifc_work+0x840/0xd0c net/ipv6/mcast.c:2650
  process_one_work+0x7b8/0x15d4 kernel/workqueue.c:3267
  process_scheduled_works kernel/workqueue.c:3348 [inline]
  worker_thread+0x938/0xef4 kernel/workqueue.c:3429
  kthread+0x288/0x310 kernel/kthread.c:388
  ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860

Fixes: 52539ca89f36 ("cfg80211: Expose TXQ stats and parameters to userspace")
Signed-off-by: Eric Dumazet <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: cfg80211: Always call tracing
Ilan Peer [Fri, 14 Jun 2024 07:35:41 +0000 (09:35 +0200)]
wifi: cfg80211: Always call tracing

Call the tracing function even if the cfg80211 callbacks
are not set. This would allow better understanding of
user space actions.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Signed-off-by: Ilan Peer <[email protected]>
Link: https://patch.msgid.link/20240614093541.018cb816e176.I28f68740a6b42144346f5c175c7874b0a669a364@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: check SSID in beacon
Johannes Berg [Wed, 12 Jun 2024 12:38:10 +0000 (14:38 +0200)]
wifi: mac80211: check SSID in beacon

Check that the SSID in beacons is correct, if it's not hidden
and beacon protection is enabled (otherwise there's no value).
If it doesn't match, disconnect.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143809.8b24a3d26a3d.I3e3ef31dbd2ec606be74d502a9d00dd9514c6885@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: correcty limit wider BW TDLS STAs
Johannes Berg [Wed, 12 Jun 2024 12:35:57 +0000 (14:35 +0200)]
wifi: mac80211: correcty limit wider BW TDLS STAs

When updating a channel context, the code can apply wider
bandwidth TDLS STA channel definitions to each and every
channel context used by the device, an approach that will
surely lead to problems if there is ever more than one.

Restrict the wider BW TDLS STA consideration to only TDLS
STAs that are actually related to links using the channel
context being updated.

Fixes: 0fabfaafec3a ("mac80211: upgrade BW of TDLS peers when possible")
Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143707.1ad989acecde.I5c75c94d95c3f4ea84f8ff4253189f4b13bad5c3@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: add ieee80211_tdls_sta_link_id()
Johannes Berg [Wed, 12 Jun 2024 12:35:56 +0000 (14:35 +0200)]
wifi: mac80211: add ieee80211_tdls_sta_link_id()

We've open-coded this twice and will need it again,
add ieee80211_tdls_sta_link_id() to get the one link
ID for a TDLS STA.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143707.9f8141ae1725.I343822bbba0ae08dedb2f54a0ce87f2ae5ebeb2b@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: update STA/chandef width during switch
Johannes Berg [Wed, 12 Jun 2024 12:32:06 +0000 (14:32 +0200)]
wifi: mac80211: update STA/chandef width during switch

In channel switch without an additional channel context,
where the reassign logic kicks in, we also need to update
the station bandwidth and chandef minimum width correctly
to avoid having station rate control configured to wider
bandwidth than the channel context. Do that now.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143418.0bc3d28231b3.I51e76df86212057ca0469e235ba9bf4461cbee75@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: make ieee80211_chan_bw_change() able to use reserved
Johannes Berg [Wed, 12 Jun 2024 12:32:05 +0000 (14:32 +0200)]
wifi: mac80211: make ieee80211_chan_bw_change() able to use reserved

Make ieee80211_chan_bw_change() able to use the reserved chanreq
(really the chandef part of it) for the calculations, so it can
be used _without_ applying the changes first. Remove the comment
that indicates this is required, since it no longer is. However,
this capability only gets used later.

Also, this is not ideal, we really should not different so much
between reserved and non-reserved usage, to simplify. That's a
further cleanup later though.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143418.1a08cf83b8cb.Ie567bb272eb25ce487651088f13ad041f549651c@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: optionally pass chandef to ieee80211_sta_cur_vht_bw()
Johannes Berg [Wed, 12 Jun 2024 12:32:04 +0000 (14:32 +0200)]
wifi: mac80211: optionally pass chandef to ieee80211_sta_cur_vht_bw()

We'll need this as well for channel switching cases, so
add the ability now to pass the chandef to calculate for.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143418.f70e05d9f306.Ifa0ce267de4f0ef3c21d063fb0cbf50e84d7d6ff@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: optionally pass chandef to ieee80211_sta_cap_rx_bw()
Johannes Berg [Wed, 12 Jun 2024 12:32:03 +0000 (14:32 +0200)]
wifi: mac80211: optionally pass chandef to ieee80211_sta_cap_rx_bw()

We'll need this function to take a new chandef in
(some) channel switching cases, so prepare for that
by allowing that to be passed and using it if so.
Clean up the code a little bit while at it.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143418.772313f08b6a.If9708249e5870671e745d4c2b02e03b25092bea3@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: handle protected dual of public action
Johannes Berg [Wed, 12 Jun 2024 12:28:37 +0000 (14:28 +0200)]
wifi: mac80211: handle protected dual of public action

The code currently handles ECSA (extended channel switch
announcement) public action frames. Handle also their
protected dual, which actually is protected.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143037.db642feb8b2e.I184fa5c9bffb68099171701e403c2aa733f60fde@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: restrict public action ECSA frame handling
Johannes Berg [Wed, 12 Jun 2024 12:28:36 +0000 (14:28 +0200)]
wifi: mac80211: restrict public action ECSA frame handling

Public action extended channel switch announcement (ECSA)
frames cannot be protected well, the spec is unclear about
what should happen in the presence of stations that can
receive protected dual and stations that cannot.

Mitigate these issues by not treating public action frames
as the absolute truth, only treat them as a hint to stop
transmitting (quiet mode), and do the remainder of the CSA
handling only when receiving the next beacon (or protected
action frame) that contains the CSA; or, if it doesn't,
simply stop being quiet and continue operating normally.

This limits the exposure to malicious ECSA public action
frames, since they cannot cause a disconnect now, only a
short interruption in traffic.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143037.ec7ccc45903e.Ife17d55c7ecbf98060f9c52889f3c8ba48798970@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agowifi: mac80211: refactor CSA queue block/unblock
Johannes Berg [Wed, 12 Jun 2024 12:28:35 +0000 (14:28 +0200)]
wifi: mac80211: refactor CSA queue block/unblock

This code is duplicated many times, refactor it into
new separate functions.

Reviewed-by: Miriam Rachel Korenblit <[email protected]>
Link: https://patch.msgid.link/20240612143037.1ad22f10392d.If21490c2c67aae28f3c54038363181ee920ce3d1@changeid
Signed-off-by: Johannes Berg <[email protected]>
8 months agogpio: graniterapids: Add missing raw_spinlock_init()
Aapo Vienamo [Tue, 25 Jun 2024 13:53:43 +0000 (16:53 +0300)]
gpio: graniterapids: Add missing raw_spinlock_init()

Add the missing raw_spin_lock_init() call to gnr_gpio_probe().

Fixes: ecc4b1418e23 ("gpio: Add Intel Granite Rapids-D vGPIO driver")
Signed-off-by: Aapo Vienamo <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>
8 months agoALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook 645/665 G11.
Dirk Su [Wed, 26 Jun 2024 02:14:36 +0000 (10:14 +0800)]
ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook 645/665 G11.

HP EliteBook 645/665 G11 needs ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to
make mic-mute/audio-mute working.

Signed-off-by: Dirk Su <[email protected]>
Cc: <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
8 months agoALSA: hda/realtek: Fix conflicting quirk for PCI SSID 17aa:3820
Takashi Iwai [Tue, 25 Jun 2024 15:52:12 +0000 (17:52 +0200)]
ALSA: hda/realtek: Fix conflicting quirk for PCI SSID 17aa:3820

The recent fix for Lenovo IdeaPad 330-17IKB replaced the quirk entry,
and this eventually breaks the existing quirk for Lenovo Yoga Duet 7
13ITL6 equipped with the same PCI SSID 17aa:3820.

For applying a proper quirk for each model, check the codec SSID
additionally.  Fortunately Yoga Duet has a different codec SSID,
0x17aa3802.

(Interestingly, 17aa:3802 has another conflict of SSID between another
Yoga model vs 14IRP8 which we had to work around similarly.)

Fixes: b1fd0d1285b1 ("ALSA: hda/realtek: Enable headset mic on IdeaPad 330-17IKB 81DM")
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
8 months agoscsi: scsi_debug: Fix create target debugfs failure
Ming Lei [Wed, 19 Jun 2024 01:38:03 +0000 (09:38 +0800)]
scsi: scsi_debug: Fix create target debugfs failure

Target debugfs entry is removed via async_schedule() which isn't drained
when adding same name target, so failure of "Directory 'target11:0:0' with
parent 'scsi_debug' already present!" can be triggered easily.

Fix it by switching to domain async schedule, and draining it before
adding new target debugfs entry.

Cc: Wenchao Hao <[email protected]>
Fixes: f084fe52c640 ("scsi: scsi_debug: Add debugfs interface to fail target reset")
Signed-off-by: Ming Lei <[email protected]>
Acked-by: Wenchao Hao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>
8 months agoMerge branch 'add-ethernet-driver-for-tehuti-networks-tn40xx-chips'
Jakub Kicinski [Wed, 26 Jun 2024 01:44:21 +0000 (18:44 -0700)]
Merge branch 'add-ethernet-driver-for-tehuti-networks-tn40xx-chips'

FUJITA Tomonori says:

====================
add ethernet driver for Tehuti Networks TN40xx chips

This patchset adds a new 10G ethernet driver for Tehuti Networks
TN40xx chips. Note in mainline, there is a driver for Tehuti Networks
(drivers/net/ethernet/tehuti/tehuti.[hc]), which supports TN30xx
chips.

Multiple vendors (DLink, Asus, Edimax, QNAP, etc) developed adapters
based on TN40xx chips. Tehuti Networks went out of business but the
drivers are still distributed under GPL2 with some of the hardware
(and also available on some sites). With some changes, I try to
upstream this driver with a new PHY driver in Rust.

The major change is replacing the PHY abstraction layer in the original
driver with phylink. TN40xx chips are used with various PHY hardware
(AMCC QT2025, TI TLK10232, Aqrate AQR105, and Marvell MV88X3120,
MV88X3310, and MV88E2010).

I've also been working on a new PHY driver for QT2025 in Rust [1]. For
now, I enable only adapters using QT2025 PHY in the PCI ID table of
this driver. I've tested this driver and the QT2025 PHY driver with
Edimax EN-9320 10G adapter and 10G-SR SFP+. In mainline, there are PHY
drivers for AQR105 and Marvell PHYs, which could work for some TN40xx
adapters with this driver.

To make reviewing easier, this patchset has only basic functions. Once
merged, I'll submit features like ethtool support.

v11: https://lore.kernel.org/netdev/20240618051608[email protected]/
v10: https://lore.kernel.org/netdev/20240611045217[email protected]/
v9: https://lore.kernel.org/netdev/20240605232608[email protected]/
v8: https://lore.kernel.org/netdev/20240603064955[email protected]/
v7: https://lore.kernel.org/netdev/20240527203928[email protected]/
v6: https://lore.kernel.org/netdev/20240512085611[email protected]/
v5: https://lore.kernel.org/netdev/20240508113947[email protected]/
v4: https://lore.kernel.org/netdev/20240501230552[email protected]/
v3: https://lore.kernel.org/netdev/20240429043827[email protected]/
v2: https://lore.kernel.org/netdev/20240425010354[email protected]/
v1: https://lore.kernel.org/netdev/20240415104352[email protected]/

[1] https://lore.kernel.org/netdev/20240415104701[email protected]/
====================

Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agonet: tn40xx: add phylink support
FUJITA Tomonori [Sun, 23 Jun 2024 23:55:07 +0000 (08:55 +0900)]
net: tn40xx: add phylink support

This patch adds supports for multiple PHY hardware with phylink. The
adapters with TN40xx chips use multiple PHY hardware; AMCC QT2025, TI
TLK10232, Aqrate AQR105, and Marvell 88X3120, 88X3310, and MV88E2010.

For now, the PCI ID table of this driver enables adapters using only
QT2025 PHY. I've tested this driver and the QT2025 PHY driver (SFP+
10G SR) with Edimax EN-9320 10G adapter.

Signed-off-by: FUJITA Tomonori <[email protected]>
Reviewed-by: Hans-Frieder Vogt <[email protected]>
Reviewed-by: Russell King (Oracle) <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agonet: tn40xx: add mdio bus support
FUJITA Tomonori [Sun, 23 Jun 2024 23:55:06 +0000 (08:55 +0900)]
net: tn40xx: add mdio bus support

This patch adds supports for mdio bus. A later path adds PHYLIB
support on the top of this.

Signed-off-by: FUJITA Tomonori <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agonet: tn40xx: add basic Rx handling
FUJITA Tomonori [Sun, 23 Jun 2024 23:55:05 +0000 (08:55 +0900)]
net: tn40xx: add basic Rx handling

This patch adds basic Rx handling. The Rx logic uses three major data
structures; two ring buffers with NIC and one database. One ring
buffer is used to send information to NIC about memory to be stored
packets to be received. The other is used to get information from NIC
about received packets. The database is used to keep the information
about DMA mapping. After a packet arrived, the db is used to pass the
packet to the network stack.

Signed-off-by: FUJITA Tomonori <[email protected]>
Reviewed-by: Hans-Frieder Vogt <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agonet: tn40xx: add basic Tx handling
FUJITA Tomonori [Sun, 23 Jun 2024 23:55:04 +0000 (08:55 +0900)]
net: tn40xx: add basic Tx handling

This patch adds device specific structures to initialize the hardware
with basic Tx handling. The original driver loads the embedded
firmware in the header file. This driver is implemented to use the
firmware APIs.

The Tx logic uses three major data structures; two ring buffers with
NIC and one database. One ring buffer is used to send information
about packets to be sent for NIC. The other is used to get information
from NIC about packet that are sent. The database is used to keep the
information about DMA mapping. After a packet is sent, the db is used
to free the resource used for the packet.

Signed-off-by: FUJITA Tomonori <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agonet: tn40xx: add register defines
FUJITA Tomonori [Sun, 23 Jun 2024 23:55:03 +0000 (08:55 +0900)]
net: tn40xx: add register defines

This adds several defines to handle registers in Tehuti Networks
TN40xx chips for later patches.

Signed-off-by: FUJITA Tomonori <[email protected]>
Reviewed-by: Hans-Frieder Vogt <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agonet: tn40xx: add pci driver for Tehuti Networks TN40xx chips
FUJITA Tomonori [Sun, 23 Jun 2024 23:55:02 +0000 (08:55 +0900)]
net: tn40xx: add pci driver for Tehuti Networks TN40xx chips

This just adds the scaffolding for an ethernet driver for Tehuti
Networks TN40xx chips.

Signed-off-by: FUJITA Tomonori <[email protected]>
Reviewed-by: Jakub Kicinski <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agoPCI: Add Edimax Vendor ID to pci_ids.h
FUJITA Tomonori [Sun, 23 Jun 2024 23:55:01 +0000 (08:55 +0900)]
PCI: Add Edimax Vendor ID to pci_ids.h

Add the Edimax Vendor ID (0x1432) for an ethernet driver for Tehuti
Networks TN40xx chips. This ID can be used for Realtek 8180 and Ralink
rt28xx wireless drivers.

Signed-off-by: FUJITA Tomonori <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agodt-bindings: net: dsa: mediatek,mt7530: Minor wording fixes
Chris Packham [Mon, 24 Jun 2024 21:18:57 +0000 (09:18 +1200)]
dt-bindings: net: dsa: mediatek,mt7530: Minor wording fixes

Update the mt7530 binding with some minor updates that make the document
easier to read.

Signed-off-by: Chris Packham <[email protected]>
Acked-by: Arınç ÃœNAL <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agobcachefs: Fix kmalloc bug in __snapshot_t_mut
Pei Li [Wed, 26 Jun 2024 00:39:56 +0000 (17:39 -0700)]
bcachefs: Fix kmalloc bug in __snapshot_t_mut

When allocating too huge a snapshot table, we should fail gracefully
in __snapshot_t_mut() instead of fail in kmalloc().

Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=770e99b65e26fa023ab1
Tested-by: [email protected]
Signed-off-by: Pei Li <[email protected]>
Signed-off-by: Kent Overstreet <[email protected]>
8 months agoMerge branch 'gve-add-flow-steering-support'
Jakub Kicinski [Wed, 26 Jun 2024 00:48:35 +0000 (17:48 -0700)]
Merge branch 'gve-add-flow-steering-support'

Ziwei Xiao says:

====================
gve: Add flow steering support

To support flow steering in GVE driver, there are two adminq changes
need to be made in advance.

The first one is adding adminq mutex lock, which is to allow the
incoming flow steering operations to be able to temporarily drop the
rtnl_lock to reduce the latency for registering flow rules among
several NICs at the same time. This could be achieved by the future
changes to reduce the drivers' dependencies on the rtnl lock for
particular ethtool ops.

The second one is to add the extended adminq command so that we can
support larger adminq command such as configure_flow_rule command. In
that patch, there is a new added function called
gve_adminq_execute_extended_cmd with the attribute of __maybe_unused.
That attribute will be removed in the third patch of this series where
it will use the previously unused function.

And the other three patches are needed for the actual flow steering
feature support in driver.
====================

Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agogve: Add flow steering ethtool support
Jeroen de Borst [Tue, 25 Jun 2024 00:12:31 +0000 (00:12 +0000)]
gve: Add flow steering ethtool support

Implement the ethtool commands that can be used to configure and query
flow-steering rules.

A large part of this change consists of translating the ethtool
representation of 'ntuples' to our internal gve_flow_rule and vice-versa
in the new created gve_flow_rule.c

Considering the possible large amount of flow rules, the driver doesn't
store all the rules locally. When the user runs 'ethtool -n <nic>' to
check the registered rules, the driver will send adminq command to
query a limited amount of rules/rule ids(that filled in a 4096 bytes dma
memory) at a time as a cache for the ethtool queries. The adminq query
commands will be repeated for several times until the ethtool has
queried all the needed rules.

Signed-off-by: Jeroen de Borst <[email protected]>
Co-developed-by: Ziwei Xiao <[email protected]>
Signed-off-by: Ziwei Xiao <[email protected]>
Reviewed-by: Praveen Kaligineedi <[email protected]>
Reviewed-by: Harshitha Ramamurthy <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agogve: Add flow steering adminq commands
Jeroen de Borst [Tue, 25 Jun 2024 00:12:30 +0000 (00:12 +0000)]
gve: Add flow steering adminq commands

Add new adminq commands for the driver to configure and query flow rules
that are stored in the device. Flow steering rules are assigned with a
location that determines the relative order of the rules.

Flow rules can run up to an order of millions. In such cases, storing
a full copy of the rules in the driver to prepare for the ethtool query
is infeasible while querying them from the device is better. That needs
to be optimized too so that we don't send a lot of adminq commands. The
solution here is to store a limited number of rules/rule ids in the
driver in a cache. Use dma_pool to allocate 4k bytes which lets device
write at most 46 flow rules(4096/88) or 1024 rule ids(4096/4) at a time.

For configuring flow rules, there are 3 sub-commands:
- ADD which adds a rule at the location supplied
- DEL which deletes the rule at the location supplied
- RESET which clears all currently active rules in the device

For querying flow rules, there are also 3 sub-commands:
- QUERY_RULES corresponds to ETHTOOL_GRXCLSRULE. It fills the rules in
  the allocated cache after querying the device
- QUERY_RULES_IDS corresponds to ETHTOOL_GRXCLSRLALL. It fills the
  rule_ids in the allocated cache after querying the device
- QUERY_RULES_STATS corresponds to ETHTOOL_GRXCLSRLCNT. It queries the
  device's current flow rule number and the supported max flow rule
  limit

Signed-off-by: Jeroen de Borst <[email protected]>
Co-developed-by: Ziwei Xiao <[email protected]>
Signed-off-by: Ziwei Xiao <[email protected]>
Reviewed-by: Praveen Kaligineedi <[email protected]>
Reviewed-by: Harshitha Ramamurthy <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agogve: Add flow steering device option
Jeroen de Borst [Tue, 25 Jun 2024 00:12:29 +0000 (00:12 +0000)]
gve: Add flow steering device option

Add a new device option to signal to the driver that the device supports
flow steering. This device option also carries the maximum number of
flow steering rules that the device can store.

Signed-off-by: Jeroen de Borst <[email protected]>
Co-developed-by: Ziwei Xiao <[email protected]>
Signed-off-by: Ziwei Xiao <[email protected]>
Reviewed-by: Praveen Kaligineedi <[email protected]>
Reviewed-by: Harshitha Ramamurthy <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agogve: Add adminq extended command
Jeroen de Borst [Tue, 25 Jun 2024 00:12:28 +0000 (00:12 +0000)]
gve: Add adminq extended command

The adminq command is limited to 64 bytes per entry and it's 56 bytes
for the command itself at maximum. To support larger commands, we need
to dma_alloc a separate memory to put the command in that memory and
send the dma memory address instead of the actual command.

Introduce an extended adminq command to wrap the real command with the
inner opcode and the allocated dma memory address specified. Once the
device receives it, it can get the real command from the given dma
memory address. As designed with the device, all the extended commands
will use inner opcode larger than 0xFF.

Signed-off-by: Jeroen de Borst <[email protected]>
Co-developed-by: Ziwei Xiao <[email protected]>
Signed-off-by: Ziwei Xiao <[email protected]>
Reviewed-by: Praveen Kaligineedi <[email protected]>
Reviewed-by: Harshitha Ramamurthy <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agogve: Add adminq mutex lock
Ziwei Xiao [Tue, 25 Jun 2024 00:12:27 +0000 (00:12 +0000)]
gve: Add adminq mutex lock

We were depending on the rtnl_lock to make sure there is only one adminq
command running at a time. But some commands may take too long to hold
the rtnl_lock, such as the upcoming flow steering operations. For such
situations, it can temporarily drop the rtnl_lock, and replace it for
these operations with a new adminq lock, which can ensure the adminq
command execution to be thread-safe.

Signed-off-by: Ziwei Xiao <[email protected]>
Reviewed-by: Praveen Kaligineedi <[email protected]>
Reviewed-by: Harshitha Ramamurthy <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agotcp: fix tcp_rcv_fastopen_synack() to enter TCP_CA_Loss for failed TFO
Neal Cardwell [Mon, 24 Jun 2024 14:43:23 +0000 (14:43 +0000)]
tcp: fix tcp_rcv_fastopen_synack() to enter TCP_CA_Loss for failed TFO

Testing determined that the recent commit 9e046bb111f1 ("tcp: clear
tp->retrans_stamp in tcp_rcv_fastopen_synack()") has a race, and does
not always ensure retrans_stamp is 0 after a TFO payload retransmit.

If transmit completion for the SYN+data skb happens after the client
TCP stack receives the SYNACK (which sometimes happens), then
retrans_stamp can erroneously remain non-zero for the lifetime of the
connection, causing a premature ETIMEDOUT later.

Testing and tracing showed that the buggy scenario is the following
somewhat tricky sequence:

+ Client attempts a TFO handshake. tcp_send_syn_data() sends SYN + TFO
  cookie + data in a single packet in the syn_data skb. It hands the
  syn_data skb to tcp_transmit_skb(), which makes a clone. Crucially,
  it then reuses the same original (non-clone) syn_data skb,
  transforming it by advancing the seq by one byte and removing the
  FIN bit, and enques the resulting payload-only skb in the
  sk->tcp_rtx_queue.

+ Client sets retrans_stamp to the start time of the three-way
  handshake.

+ Cookie mismatches or server has TFO disabled, and server only ACKs
  SYN.

+ tcp_ack() sees SYN is acked, tcp_clean_rtx_queue() clears
  retrans_stamp.

+ Since the client SYN was acked but not the payload, the TFO failure
  code path in tcp_rcv_fastopen_synack() tries to retransmit the
  payload skb.  However, in some cases the transmit completion for the
  clone of the syn_data (which had SYN + TFO cookie + data) hasn't
  happened.  In those cases, skb_still_in_host_queue() returns true
  for the retransmitted TFO payload, because the clone of the syn_data
  skb has not had its tx completetion.

+ Because skb_still_in_host_queue() finds skb_fclone_busy() is true,
  it sets the TSQ_THROTTLED bit and the retransmit does not happen in
  the tcp_rcv_fastopen_synack() call chain.

+ The tcp_rcv_fastopen_synack() code next implicitly assumes the
  retransmit process is finished, and sets retrans_stamp to 0 to clear
  it, but this is later overwritten (see below).

+ Later, upon tx completion, tcp_tsq_write() calls
  tcp_xmit_retransmit_queue(), which puts the retransmit in flight and
  sets retrans_stamp to a non-zero value.

+ The client receives an ACK for the retransmitted TFO payload data.

+ Since we're in CA_Open and there are no dupacks/SACKs/DSACKs/ECN to
  make tcp_ack_is_dubious() true and make us call
  tcp_fastretrans_alert() and reach a code path that clears
  retrans_stamp, retrans_stamp stays nonzero.

+ Later, if there is a TLP, RTO, RTO sequence, then the connection
  will suffer an early ETIMEDOUT due to the erroneously ancient
  retrans_stamp.

The fix: this commit refactors the code to have
tcp_rcv_fastopen_synack() retransmit by reusing the relevant parts of
tcp_simple_retransmit() that enter CA_Loss (without changing cwnd) and
call tcp_xmit_retransmit_queue(). We have tcp_simple_retransmit() and
tcp_rcv_fastopen_synack() share code in this way because in both cases
we get a packet indicating non-congestion loss (MTU reduction or TFO
failure) and thus in both cases we want to retransmit as many packets
as cwnd allows, without reducing cwnd. And given that retransmits will
set retrans_stamp to a non-zero value (and may do so in a later
calling context due to TSQ), we also want to enter CA_Loss so that we
track when all retransmitted packets are ACked and clear retrans_stamp
when that happens (to ensure later recurring RTOs are using the
correct retrans_stamp and don't declare ETIMEDOUT prematurely).

Fixes: 9e046bb111f1 ("tcp: clear tp->retrans_stamp in tcp_rcv_fastopen_synack()")
Fixes: a7abf3cd76e1 ("tcp: consider using standard rtx logic in tcp_rcv_fastopen_synack()")
Signed-off-by: Neal Cardwell <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agoMerge branch 'ethtool-provide-the-dim-profile-fine-tuning-channel'
Jakub Kicinski [Wed, 26 Jun 2024 00:15:10 +0000 (17:15 -0700)]
Merge branch 'ethtool-provide-the-dim-profile-fine-tuning-channel'

Heng Qi says:

====================
ethtool: provide the dim profile fine-tuning channel

The NetDIM library provides excellent acceleration for many modern
network cards. However, the default profiles of DIM limits its maximum
capabilities for different NICs, so providing a way which the NIC can
be custom configured is necessary.

Currently, the way is based on the commonly used "ethtool -C".

For example,
on the server side, the virtio-net NIC with rx dim enabled has 8
queues and runs nginx.
The client uses the following command to send traffic to the server:
  ./wrk http://server_ip:80 -c 64 -t 5 -d 30

Then adjust the default rx-profile for server dim to

  {.usec =   1, .pkts = 256, .comps = n/a,},
  {.usec =   8, .pkts = 256, .comps = n/a,},
  {.usec =  30, .pkts = 256, .comps = n/a,},
  {.usec =  64, .pkts = 256, .comps = n/a,},
  {.usec = 128, .pkts = 256, .comps = n/a,}

The server PPS is improved by 20%+.
====================

Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agovirtio-net: support dim profile fine-tuning
Heng Qi [Fri, 21 Jun 2024 10:13:53 +0000 (18:13 +0800)]
virtio-net: support dim profile fine-tuning

Virtio-net has different types of back-end device implementations.
In order to effectively optimize the dim library's gains for different
device implementations, let's use the new interface params to
initialize and query dim results from a customized profile list.

Signed-off-by: Heng Qi <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agodim: add new interfaces for initialization and getting results
Heng Qi [Fri, 21 Jun 2024 10:13:52 +0000 (18:13 +0800)]
dim: add new interfaces for initialization and getting results

DIM-related mode and work have been collected in one same place,
so new interfaces are added to provide convenience.

Signed-off-by: Heng Qi <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agoethtool: provide customized dim profile management
Heng Qi [Fri, 21 Jun 2024 10:13:51 +0000 (18:13 +0800)]
ethtool: provide customized dim profile management

The NetDIM library, currently leveraged by an array of NICs, delivers
excellent acceleration benefits. Nevertheless, NICs vary significantly
in their dim profile list prerequisites.

Specifically, virtio-net backends may present diverse sw or hw device
implementation, making a one-size-fits-all parameter list impractical.
On Alibaba Cloud, the virtio DPU's performance under the default DIM
profile falls short of expectations, partly due to a mismatch in
parameter configuration.

I also noticed that ice/idpf/ena and other NICs have customized
profilelist or placed some restrictions on dim capabilities.

Motivated by this, I tried adding new params for "ethtool -C" that provides
a per-device control to modify and access a device's interrupt parameters.

Usage
========
The target NIC is named ethx.

Assume that ethx only declares support for rx profile setting
(with DIM_PROFILE_RX flag set in profile_flags) and supports modification
of usec and pkt fields.

1. Query the currently customized list of the device

$ ethtool -c ethx
...
rx-profile:
{.usec =   1, .pkts = 256, .comps = n/a,},
{.usec =   8, .pkts = 256, .comps = n/a,},
{.usec =  64, .pkts = 256, .comps = n/a,},
{.usec = 128, .pkts = 256, .comps = n/a,},
{.usec = 256, .pkts = 256, .comps = n/a,}
tx-profile:   n/a

2. Tune
$ ethtool -C ethx rx-profile 1,1,n_2,n,n_3,3,n_4,4,n_n,5,n
"n" means do not modify this field.
$ ethtool -c ethx
...
rx-profile:
{.usec =   1, .pkts =   1, .comps = n/a,},
{.usec =   2, .pkts = 256, .comps = n/a,},
{.usec =   3, .pkts =   3, .comps = n/a,},
{.usec =   4, .pkts =   4, .comps = n/a,},
{.usec = 256, .pkts =   5, .comps = n/a,}
tx-profile:   n/a

3. Hint
If the device does not support some type of customized dim profiles,
the corresponding "n/a" will display.

If the "n/a" field is being modified, -EOPNOTSUPP will be reported.

Signed-off-by: Heng Qi <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agodim: make DIMLIB dependent on NET
Heng Qi [Fri, 21 Jun 2024 10:13:50 +0000 (18:13 +0800)]
dim: make DIMLIB dependent on NET

DIMLIB's capabilities are supplied by the dim, net_dim, and
rdma_dim objects, and dim's interfaces solely act as a base for
net_dim and rdma_dim and are not explicitly used anywhere else.
rdma_dim is utilized by the infiniband driver, while net_dim
is for network devices, excluding the soc/fsl driver.

In this patch, net_dim relies on some NET's interfaces, thus
DIMLIB needs to explicitly depend on the NET Kconfig.

The soc/fsl driver uses the functions provided by net_dim, so
it also needs to depend on NET.

Signed-off-by: Heng Qi <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agolinux/dim: move useful macros to .h file
Heng Qi [Fri, 21 Jun 2024 10:13:49 +0000 (18:13 +0800)]
linux/dim: move useful macros to .h file

Useful macros will be used effectively elsewhere.
These will be utilized in subsequent patches.

Signed-off-by: Heng Qi <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agoMerge branch 'ravb-add-mii-support-for-r-car-v4m'
Jakub Kicinski [Wed, 26 Jun 2024 00:07:06 +0000 (17:07 -0700)]
Merge branch 'ravb-add-mii-support-for-r-car-v4m'

Geert Uytterhoeven says:

====================
ravb: Add MII support for R-Car V4M

All EtherAVB instances on R-Car Gen3/Gen4 SoCs support the RGMII
interface.  In addition, the first two EtherAVB instances on R-Car V4M
also support the MII interface, but this is not yet supported by the
driver.  This patch series adds support for MII on R-Car Gen4, after the
customary cleanup.

The corresponding pin control support is available in [1].

Compile-tested only, as all AVB interfaces on the Gray Hawk Single
development board are connected to RGMII PHYs.
No regressions on R-Car V4H.

[1] "[PATCH/RFC] pinctrl: renesas: r8a779h0: Add AVB MII pins and groups"
    https://lore.kernel.org/4a0a12227f2145ef53b18bc08f45b19dcd745fc6.1718378739[email protected]/

v1: https://lore.kernel.org/f0ef3e00aec461beb33869ab69ccb44a23d78f51.1718378166[email protected]
====================

Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agoravb: Add MII support for R-Car V4M
Geert Uytterhoeven [Mon, 24 Jun 2024 13:25:25 +0000 (15:25 +0200)]
ravb: Add MII support for R-Car V4M

All EtherAVB instances on R-Car Gen3/Gen4 SoCs support the RGMII
interface.  In addition, the first two EtherAVB instances on R-Car V4M
also support the MII interface, but this is not yet supported by the
driver.

Add support for MII on R-Car Gen4 by adding an R-Car Gen4-specific EMAC
initialization function that selects the MII clock instead of the RGMII
clock when the PHY interface is MII.  Note that all implementations of
EtherAVB on R-Car Gen4 SoCs have the APSR register, but only MII-capable
instances are documented to have the MIISELECT bit, which has a
documented value of zero when reserved.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Niklas Söderlund <[email protected]>
Reviewed-by: Sergey Shtylyov <[email protected]>
Link: https://patch.msgid.link/3a21d1d6680864aa85afff9260234c2b8054020a.1719234830.git.geert+renesas@glider.be
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agoravb: Improve ravb_hw_info instance order
Geert Uytterhoeven [Mon, 24 Jun 2024 13:25:24 +0000 (15:25 +0200)]
ravb: Improve ravb_hw_info instance order

Move ravb_gen2_hw_info before ravb_gen3_hw_info to match
ravb_match_table[] order.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Niklas Söderlund <[email protected]>
Reviewed-by: Sergey Shtylyov <[email protected]>
Link: https://patch.msgid.link/a76febe3737e26365a784e9193da9363f22aa550.1719234830.git.geert+renesas@glider.be
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agoionic: use dev_consume_skb_any outside of napi
Shannon Nelson [Mon, 24 Jun 2024 17:50:15 +0000 (10:50 -0700)]
ionic: use dev_consume_skb_any outside of napi

If we're not in a NAPI softirq context, we need to be careful
about how we call napi_consume_skb(), specifically we need to
call it with budget==0 to signal to it that we're not in a
safe context.

This was found while running some configuration stress testing
of traffic and a change queue config loop running, and this
curious note popped out:

[ 4371.402645] BUG: using smp_processor_id() in preemptible [00000000] code: ethtool/20545
[ 4371.402897] caller is napi_skb_cache_put+0x16/0x80
[ 4371.403120] CPU: 25 PID: 20545 Comm: ethtool Kdump: loaded Tainted: G           OE      6.10.0-rc3-netnext+ #8
[ 4371.403302] Hardware name: HPE ProLiant DL360 Gen10/ProLiant DL360 Gen10, BIOS U32 01/23/2021
[ 4371.403460] Call Trace:
[ 4371.403613]  <TASK>
[ 4371.403758]  dump_stack_lvl+0x4f/0x70
[ 4371.403904]  check_preemption_disabled+0xc1/0xe0
[ 4371.404051]  napi_skb_cache_put+0x16/0x80
[ 4371.404199]  ionic_tx_clean+0x18a/0x240 [ionic]
[ 4371.404354]  ionic_tx_cq_service+0xc4/0x200 [ionic]
[ 4371.404505]  ionic_tx_flush+0x15/0x70 [ionic]
[ 4371.404653]  ? ionic_lif_qcq_deinit.isra.23+0x5b/0x70 [ionic]
[ 4371.404805]  ionic_txrx_deinit+0x71/0x190 [ionic]
[ 4371.404956]  ionic_reconfigure_queues+0x5f5/0xff0 [ionic]
[ 4371.405111]  ionic_set_ringparam+0x2e8/0x3e0 [ionic]
[ 4371.405265]  ethnl_set_rings+0x1f1/0x300
[ 4371.405418]  ethnl_default_set_doit+0xbb/0x160
[ 4371.405571]  genl_family_rcv_msg_doit+0xff/0x130
[...]

I found that ionic_tx_clean() calls napi_consume_skb() which calls
napi_skb_cache_put(), but before that last call is the note
    /* Zero budget indicate non-NAPI context called us, like netpoll */
and
    DEBUG_NET_WARN_ON_ONCE(!in_softirq());

Those are pretty big hints that we're doing it wrong.  We can pass a
context hint down through the calls to let ionic_tx_clean() know what
we're doing so it can call napi_consume_skb() correctly.

Fixes: 386e69865311 ("ionic: Make use napi_consume_skb")
Signed-off-by: Shannon Nelson <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agovirtio_net: Remove u64_stats_update_begin()/end() for stats fetch
Li RongQing [Fri, 21 Jun 2024 09:45:52 +0000 (17:45 +0800)]
virtio_net: Remove u64_stats_update_begin()/end() for stats fetch

This place is fetching the stats, u64_stats_update_begin()/end()
should not be used, and the fetcher of stats is in the same context
as the updater of the stats, so don't need any protection

Suggested-by: Jakub Kicinski <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Li RongQing <[email protected]>
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
8 months agonetfilter: nf_tables: rise cap on SELinux secmark context
Pablo Neira Ayuso [Mon, 3 Jun 2024 18:16:59 +0000 (20:16 +0200)]
netfilter: nf_tables: rise cap on SELinux secmark context

secmark context is artificially limited 256 bytes, rise it to 4Kbytes.

Fixes: fb961945457f ("netfilter: nf_tables: add SECMARK support")
Signed-off-by: Pablo Neira Ayuso <[email protected]>
8 months agonetfilter: cttimeout: remove 'l3num' attr check
Lin Ma [Fri, 31 May 2024 01:28:47 +0000 (09:28 +0800)]
netfilter: cttimeout: remove 'l3num' attr check

After commit dd2934a95701 ("netfilter: conntrack: remove l3->l4 mapping
information"), the attribute of type `CTA_TIMEOUT_L3PROTO` is not used
any more in function cttimeout_default_set.

However, the previous commit ea9cf2a55a7b ("netfilter: cttimeout: remove
set but not used variable 'l3num'") forgot to remove the attribute
present check when removing the related variable.

This commit removes that check to ensure consistency.

Signed-off-by: Lin Ma <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
8 months agonetfilter: nf_conncount: fix wrong variable type
Yunjian Wang [Fri, 31 May 2024 03:48:47 +0000 (11:48 +0800)]
netfilter: nf_conncount: fix wrong variable type

Now there is a issue is that code checks reports a warning: implicit
narrowing conversion from type 'unsigned int' to small type 'u8' (the
'keylen' variable). Fix it by removing the 'keylen' variable.

Signed-off-by: Yunjian Wang <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
8 months agoipvs: Avoid unnecessary calls to skb_is_gso_sctp
Ismael Luceno [Thu, 23 May 2024 16:54:44 +0000 (18:54 +0200)]
ipvs: Avoid unnecessary calls to skb_is_gso_sctp

In the context of the SCTP SNAT/DNAT handler, these calls can only
return true.

Fixes: e10d3ba4d434 ("ipvs: Fix checksumming on GSO of SCTP packets")
Signed-off-by: Ismael Luceno <[email protected]>
Acked-by: Julian Anastasov <[email protected]>
Acked-by: Simon Horman <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
8 months agobcachefs: Discard, invalidate workers are now per device
Kent Overstreet [Sun, 23 Jun 2024 04:53:44 +0000 (00:53 -0400)]
bcachefs: Discard, invalidate workers are now per device

There's no reason for discards to be single threaded across all devices;
this will improve performance on multi device setups.

Additionally, making them per-device simplifies the refcounting on
bch_dev->io_ref; we now hold it for the duration that the discard path
is running, which fixes a race between the discard path and device
removal.

Signed-off-by: Kent Overstreet <[email protected]>
This page took 0.132497 seconds and 4 git commands to generate.