Re: [PATCH 1/1 V2] Selftests: net: Set executable bit for shell script

2024-08-27 Thread David Hunter
From: david.hunter.li...@gmail.com On Mon, 26 Aug 2024 14:40:22 -0700 Jakub Kicinski wrote: > What is linux_mainline and how does one download from it? The Linux Mainline source files can be downloaded using the following command: git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds

Re: [PATCH 1/1 V2] Selftests: net: Set executable bit for shell script

2024-08-27 Thread Jakub Kicinski
On Tue, 27 Aug 2024 17:37:21 -0400 David Hunter wrote: > On Mon, 26 Aug 2024 14:40:22 -0700 Jakub Kicinski wrote: > > What is linux_mainline and how does one download from it? > > The Linux Mainline source files can be downloaded using the following command: > > git clone git://git.kernel.org/

Re: [PATCH net 0/4] mptcp: close subflow when receiving TCP+FIN and misc.

2024-08-27 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Mon, 26 Aug 2024 19:11:17 +0200 you wrote: > Here are different fixes: > > Patch 1 closes the subflow after having received a FIN, instead of > leaving it half-closed until the end of the MPTCP connection. A fix for >

Re: [PATCH net-next v4 0/8] net/selftests: TCP-AO selftests updates

2024-08-27 Thread Dmitry Safonov
On Tue, 27 Aug 2024 at 22:17, Jakub Kicinski wrote: > > On Fri, 23 Aug 2024 23:04:50 +0100 Dmitry Safonov via B4 Relay wrote: > > First 3 patches are more-or-less cleanups/preparations. > > > > Patches 4/5 are fixes for netns file descriptors leaks/open. > > > > Patch 6 was sent to me/contributed

Re: [PATCH bpf-next v1 2/2] selftests/bpf: Fix cross-compile issue for some files and a static compile issue for "-lzstd"

2024-08-27 Thread Andrii Nakryiko
On Tue, Aug 27, 2024 at 6:40 AM Lin Yikai wrote: > > 1. Fix cross-compile issue for some files: > [Issue] > When cross-compiling bpf selftests for arm64 on x86_64 host, the following > error occurs: > progs/loop2.c:20:7: error: incomplete definition of type 'struct user_pt_regs' >20 |

Re: [PATCH v2 05/17] vdso: Avoid call to memset() by getrandom

2024-08-27 Thread Segher Boessenkool
On Tue, Aug 27, 2024 at 11:08:19AM -0700, Eric Biggers wrote: > On Thu, Aug 22, 2024 at 09:13:13AM +0200, Christophe Leroy wrote: > > With the current implementation, __cvdso_getrandom_data() calls > > memset(), which is unexpected in the VDSO. > > > > Rewrite opaque data initialisation to avoid m

Re: [PATCH-cgroup 1/2] cgroup/cpuset: Account for boot time isolated CPUs

2024-08-27 Thread Waiman Long
On 8/27/24 04:01, Michal Koutný wrote: Hi. On Tue, Aug 20, 2024 at 03:55:35PM GMT, Waiman Long wrote: The prstate_housekeeping_conflict() function does check the HK_TYPE_DOMAIN housekeeping cpumask to make sure that CPUs outside of it can only be used in isolated partition. Given the fact th

Re: [PATCH net-next RFC] selftests/net: integrate packetdrill with ksft

2024-08-27 Thread Jakub Kicinski
Very exciting to see packetdrill tests making their way upstream! On Tue, 27 Aug 2024 15:32:29 -0400 Willem de Bruijn wrote: > RFC points for discussion > > ksft: the choice for this python framework introduces a dependency on > the YNL scripts, and some non-obvious code: > - to include the net/l

Re: [PATCH net-next v22 03/13] netdev: support binding dma-buf to netdevice

2024-08-27 Thread Jakub Kicinski
On Sun, 25 Aug 2024 04:15:01 + Mina Almasry wrote: > +u32 dev_get_min_mp_channel_count(const struct net_device *dev) > +{ > + u32 i, max = 0; > + > + ASSERT_RTNL(); > + > + for (i = 0; i < dev->real_num_rx_queues; i++) > + if (dev->_rx[i].mp_params.mp_priv) > +

Re: [PATCH net-next v22 04/13] netdev: netdevice devmem allocator

2024-08-27 Thread Jakub Kicinski
On Sun, 25 Aug 2024 04:15:02 + Mina Almasry wrote: > +void net_devmem_free_dmabuf(struct net_iov *niov) > +{ > + struct net_devmem_dmabuf_binding *binding = net_iov_binding(niov); > + unsigned long dma_addr = net_devmem_get_dma_addr(niov); > + > + if (gen_pool_has_addr(binding->chun

Re: [PATCH net-next v22 05/13] page_pool: devmem support

2024-08-27 Thread Jakub Kicinski
On Sun, 25 Aug 2024 04:15:03 + Mina Almasry wrote: > + /* Assume net_iov are on the preferred node without actually > + * checking... > + * > + * This check is only used to check for recycling memory in the page > + * pool's fast paths. Currently the only implementation

Re: Re: [PATCH bpf-next v1 1/2] selftests/bpf: Update "vmtest.sh" for cross-compile arm64 on x86_64 host.

2024-08-27 Thread yikai....@vivo.com
On 2024-08-28 at 11:10:38, yikai@vivo.com reply: > >On 2024/8/27 21:39, Lin Yikai wrote: >> Identify "$CROSS_COMPILE" to enable vm_test for cross-compile situation. >> Additionally, use "-cpu cortex-a57" flag to accommodate the majority of QEMU >> CPU lists, >> avoiding using

[PATCH] selftests: splice: Add splice_read.sh and hint

2024-08-27 Thread Rong Tao
From: Rong Tao Add test scripts and prompts. Signed-off-by: Rong Tao --- tools/testing/selftests/splice/splice_read.c | 1 + tools/testing/selftests/splice/splice_read.sh | 9 + 2 files changed, 10 insertions(+) create mode 100755 tools/testing/selftests/splice/splice_read.sh diff -

Re: [PATCH] selftests/arm64: Fix build warnings for abi

2024-08-27 Thread Dev Jain
On 8/27/24 18:03, Will Deacon wrote: On Tue, Aug 27, 2024 at 10:48:51AM +0530, Dev Jain wrote: A "%s" is missing in ksft_exit_fail_msg(); instead, use the newly introduced ksft_exit_fail_perror(). Also, uint64_t corresponds to unsigned 64-bit integer, so use %lx instead of %llx. What's wrong

[PATCH 00/16] mm: Introduce MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
++ 20 files changed, 216 insertions(+), 50 deletions(-) --- base-commit: 5be63fc19fcaa4c236b307420483578a56986a37 change-id: 20240827-patches-below_hint_mmap-b13d79ae1c55 -- - Charlie

[PATCH 01/16] mm: Add MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Some applications rely on placing data in free bits addresses allocated by mmap. Various architectures (eg. x86, arm64, powerpc) restrict the address returned by mmap to be less than the maximum address space, unless the hint address is greater than this value. To make this behavior explicit and m

[PATCH 02/16] riscv: mm: Do not restrict mmap address based on hint

2024-08-27 Thread Charlie Jenkins
The hint address should not forcefully restrict the addresses returned by mmap as this causes mmap to report ENOMEM when there is memory still available. Signed-off-by: Charlie Jenkins Fixes: b5b4287accd7 ("riscv: mm: Use hint address in mmap if available") Fixes: add2cc6b6515 ("RISC-V: mm: Restr

[PATCH 03/16] mm: Add flag and len param to arch_get_mmap_base()

2024-08-27 Thread Charlie Jenkins
The flag and len param is required in arch_get_mmap_base() to implement MAP_BELOW_HINT. Signed-off-by: Charlie Jenkins --- arch/arm64/include/asm/processor.h | 2 +- arch/powerpc/include/asm/task_size_64.h | 2 +- arch/riscv/include/asm/processor.h | 2 +- fs/hugetlbfs/inode.c

[PATCH 04/16] mm: Add generic MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Make the generic implementation of arch_get_mmap_base() and arch_get_mmap_end() support MAP_BELOW_HINT. Signed-off-by: Charlie Jenkins --- include/linux/sched/mm.h | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/include/linux/sched/mm.h b/i

[PATCH 05/16] riscv: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
When adding support for MAP_BELOW_HINT, the riscv implementation becomes identical to the default implementation, so arch_get_mmap_base() and arch_get_mmap_end() can be removed. Signed-off-by: Charlie Jenkins --- arch/riscv/include/asm/processor.h | 10 -- 1 file changed, 10 deletions(-)

[PATCH 06/16] arm64: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to arch_get_mmap_base() and arch_get_mmap_end(). Signed-off-by: Charlie Jenkins --- arch/arm64/include/asm/processor.h | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/processor.h b/arch

[PATCH 07/16] powerpc: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to arch_get_mmap_base() and arch_get_mmap_end(). Signed-off-by: Charlie Jenkins --- arch/powerpc/include/asm/task_size_64.h | 36 +++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/task_size_64.

[PATCH 08/16] x86: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr when the flag is enabled. Signed-off-by: Charlie Jenkins --- arch/x86/kernel/sys_x86_64.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x8

[PATCH 09/16] loongarch: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr when the flag is enabled. Signed-off-by: Charlie Jenkins --- arch/loongarch/mm/mmap.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/loongarch/mm/mmap.c b/arch/loongarch/mm/mmap.c index 889030985135..

[PATCH 10/16] arm: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr when the flag is enabled. Signed-off-by: Charlie Jenkins --- arch/arm/mm/mmap.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c index d65d0e6ed10a..fa0c79447b78 100644

[PATCH 11/16] mips: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr when the flag is enabled. Signed-off-by: Charlie Jenkins --- arch/mips/mm/mmap.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/mips/mm/mmap.c b/arch/mips/mm/mmap.c index 7e11d7b58761..1595fda284cd 100644

[PATCH 12/16] parisc: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr when the flag is enabled. Signed-off-by: Charlie Jenkins --- arch/parisc/include/uapi/asm/mman.h | 1 + arch/parisc/kernel/sys_parisc.c | 9 + tools/arch/parisc/include/uapi/asm/mman.h | 1 + 3 files

[PATCH 13/16] s390: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr when the flag is enabled. Signed-off-by: Charlie Jenkins --- arch/s390/mm/mmap.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index 206756946589..29e20351ca85 100

[PATCH 14/16] sh: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr when the flag is enabled. Signed-off-by: Charlie Jenkins --- arch/sh/mm/mmap.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c index bee329d4149a..867f6598b7d0 100644 --

[PATCH 15/16] sparc: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Charlie Jenkins
Add support for MAP_BELOW_HINT to mmap by restricting high_limit to addr when the flag is enabled. Signed-off-by: Charlie Jenkins --- arch/sparc/kernel/sys_sparc_64.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c i

[PATCH 16/16] selftests/mm: Create MAP_BELOW_HINT test

2024-08-27 Thread Charlie Jenkins
Add a selftest for MAP_BELOW_HINT that maps until it runs out of space below the hint address. Signed-off-by: Charlie Jenkins --- tools/testing/selftests/mm/Makefile | 1 + tools/testing/selftests/mm/map_below_hint.c | 29 + 2 files changed, 30 insertions(+)

[PATCH net v2 00/15] mptcp: more fixes for the in-kernel PM

2024-08-27 Thread Matthieu Baerts (NGI0)
Here is a new batch of fixes for the MPTCP in-kernel path-manager: Patch 1 ensures the address ID is set to 0 when the path-manager sends an ADD_ADDR for the address of the initial subflow. The same fix is applied when a new subflow is created re-using this special address. A fix for v6.0. Patch

[PATCH net v2 01/15] mptcp: pm: reuse ID 0 after delete and re-add

2024-08-27 Thread Matthieu Baerts (NGI0)
When the endpoint used by the initial subflow is removed and re-added later, the PM has to force the ID 0, it is a special case imposed by the MPTCP specs. Note that the endpoint should then need to be re-added reusing the same ID. Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking"

[PATCH net v2 02/15] mptcp: pm: fix RM_ADDR ID for the initial subflow

2024-08-27 Thread Matthieu Baerts (NGI0)
The initial subflow has a special local ID: 0. When an endpoint is being deleted, it is then important to check if its address is not linked to the initial subflow to send the right ID. If there was an endpoint linked to the initial subflow, msk's mpc_endpoint_id field will be set. We can then use

[PATCH net v2 03/15] selftests: mptcp: join: check removing ID 0 endpoint

2024-08-27 Thread Matthieu Baerts (NGI0)
Removing the endpoint linked to the initial subflow should trigger a RM_ADDR for the right ID, and the removal of the subflow. That's what is now being verified in the "delete and re-add" test. Note that removing the initial subflow will not decrement the 'subflows' counters, which corresponds to

[PATCH net v2 04/15] mptcp: pm: send ACK on an active subflow

2024-08-27 Thread Matthieu Baerts (NGI0)
Taking the first one on the list doesn't work in some cases, e.g. if the initial subflow is being removed. Pick another one instead of not sending anything. Fixes: 84dfe3677a6f ("mptcp: send out dedicated ADD_ADDR packet") Cc: sta...@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matth

[PATCH net v2 05/15] mptcp: pm: skip connecting to already established sf

2024-08-27 Thread Matthieu Baerts (NGI0)
The lookup_subflow_by_daddr() helper checks if there is already a subflow connected to this address. But there could be a subflow that is closing, but taking time due to some reasons: latency, losses, data to process, etc. If an ADD_ADDR is received while the endpoint is being closed, it is better

[PATCH net v2 06/15] mptcp: pm: reset MPC endp ID when re-added

2024-08-27 Thread Matthieu Baerts (NGI0)
The initial subflow has a special local ID: 0. It is specific per connection. When a global endpoint is deleted and re-added later, it can have a different ID -- most services managing the endpoints automatically don't force the ID to be the same as before. It is then important to track these modi

[PATCH net v2 07/15] selftests: mptcp: join: check re-adding init endp with != id

2024-08-27 Thread Matthieu Baerts (NGI0)
The initial subflow has a special local ID: 0. It is specific per connection. When a global endpoint is deleted and re-added later, it can have a different ID, but the kernel should still use the ID 0 if it corresponds to the initial address. This test validates this behaviour: the endpoint linke

[PATCH net v2 08/15] selftests: mptcp: join: no extra msg if no counter

2024-08-27 Thread Matthieu Baerts (NGI0)
The checksum and fail counters might not be available. Then no need to display an extra message with missing info. While at it, fix the indentation around, which is wrong since the same commit. Fixes: 47867f0a7e83 ("selftests: mptcp: join: skip check if MIB counter not supported") Cc: sta...@vge

[PATCH net v2 09/15] mptcp: pm: do not remove already closed subflows

2024-08-27 Thread Matthieu Baerts (NGI0)
It is possible to have in the list already closed subflows, e.g. the initial subflow has been already closed, but still in the list. No need to try to close it again, and increments the related counters again. Fixes: 0ee4261a3681 ("mptcp: implement mptcp_pm_remove_subflow") Cc: sta...@vger.kernel.

[PATCH net v2 10/15] mptcp: pm: fix ID 0 endp usage after multiple re-creations

2024-08-27 Thread Matthieu Baerts (NGI0)
'local_addr_used' and 'add_addr_accepted' are decremented for addresses not related to the initial subflow (ID0), because the source and destination addresses of the initial subflows are known from the beginning: they don't count as "additional local address being used" or "ADD_ADDR being accepted"

[PATCH net v2 11/15] selftests: mptcp: join: check re-re-adding ID 0 endp

2024-08-27 Thread Matthieu Baerts (NGI0)
This test extends "delete and re-add" to validate the previous commit: when the endpoint linked to the initial subflow (ID 0) is re-added multiple times, it was no longer being used, because the internal linked counters are not decremented for this special endpoint: it is not an additional endpoint

[PATCH net v2 12/15] mptcp: avoid duplicated SUB_CLOSED events

2024-08-27 Thread Matthieu Baerts (NGI0)
The initial subflow might have already been closed, but still in the connection list. When the worker is instructed to close the subflows that have been marked as closed, it might then try to close the initial subflow again. A consequence of that is that the SUB_CLOSED event can be seen twice:

[PATCH net v2 13/15] selftests: mptcp: join: validate event numbers

2024-08-27 Thread Matthieu Baerts (NGI0)
This test extends "delete and re-add" and "delete re-add signal" to validate the previous commit: the number of MPTCP events are checked to make sure there are no duplicated or unexpected ones. A new helper has been introduced to easily check these events. The missing events have been added to the

[PATCH net v2 14/15] mptcp: pm: ADD_ADDR 0 is not a new address

2024-08-27 Thread Matthieu Baerts (NGI0)
The ADD_ADDR 0 with the address from the initial subflow should not be considered as a new address: this is not something new. If the host receives it, it simply means that the address is available again. When receiving an ADD_ADDR for the ID 0, the PM already doesn't consider it as new by not inc

[PATCH net v2 15/15] selftests: mptcp: join: check re-re-adding ID 0 signal

2024-08-27 Thread Matthieu Baerts (NGI0)
This test extends "delete re-add signal" to validate the previous commit: when the 'signal' endpoint linked to the initial subflow (ID 0) is re-added multiple times, it will re-send the ADD_ADDR with id 0. The client should still be able to re-create this subflow, even if the add_addr_accepted limi

Re: [PATCH 07/16] powerpc: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Christophe Leroy
Hi Charlie, Le 28/08/2024 à 07:49, Charlie Jenkins a écrit : Add support for MAP_BELOW_HINT to arch_get_mmap_base() and arch_get_mmap_end(). Signed-off-by: Charlie Jenkins --- arch/powerpc/include/asm/task_size_64.h | 36 +++-- 1 file changed, 30 insertions(+), 6

<    1   2