summaryrefslogtreecommitdiffstats
path: root/rust/helpers/build_bug.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-04-02 18:34:04 -0700
committerJakub Kicinski <kuba@kernel.org>2025-04-04 07:35:38 -0700
commitec304b70d46bd2ed66541c5b57b63276529e05b1 (patch)
treecdf44a3e05d4cb02eaa6b166857cf49d0993df78 /rust/helpers/build_bug.c
parent053f3ff67d7feefc75797863f3d84b47ad47086f (diff)
downloadlinux-ec304b70d46bd2ed66541c5b57b63276529e05b1.tar.gz
linux-ec304b70d46bd2ed66541c5b57b63276529e05b1.tar.bz2
linux-ec304b70d46bd2ed66541c5b57b63276529e05b1.zip
net: move mp dev config validation to __net_mp_open_rxq()
devmem code performs a number of safety checks to avoid having to reimplement all of them in the drivers. Move those to __net_mp_open_rxq() and reuse that function for binding to make sure that io_uring ZC also benefits from them. While at it rename the queue ID variable to rxq_idx in __net_mp_open_rxq(), we touch most of the relevant lines. The XArray insertion is reordered after the netdev_rx_queue_restart() call, otherwise we'd need to duplicate the queue index check or risk inserting an invalid pointer. The XArray allocation failures should be extremely rare. Reviewed-by: Mina Almasry <almasrymina@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Fixes: 6e18ed929d3b ("net: add helpers for setting a memory provider on an rx queue") Link: https://patch.msgid.link/20250403013405.2827250-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions