Re: [PATCH net-next v9 6/6] vhost/net: Support VIRTIO_NET_F_HASH_REPORT

2025-03-10 Thread Akihiko Odaki
On 2025/03/11 9:42, Jason Wang wrote: On Mon, Mar 10, 2025 at 3:04 PM Akihiko Odaki wrote: On 2025/03/10 13:43, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:02 PM Akihiko Odaki wrote: VIRTIO_NET_F_HASH_REPORT allows to report hash values calculated on the host. When VHOST_NET_F_VIRTIO_NET_HD

Re: [PATCH net-next v9 5/6] selftest: tun: Add tests for virtio-net hashing

2025-03-10 Thread Akihiko Odaki
On 2025/03/10 13:03, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:02 PM Akihiko Odaki wrote: The added tests confirm tun can perform RSS and hash reporting, and reject invalid configurations for them. Let's be more verbose here. E.g what's the network topology used here. The network topology

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Akihiko Odaki
On 2025/03/11 9:38, Jason Wang wrote: On Mon, Mar 10, 2025 at 3:45 PM Akihiko Odaki wrote: On 2025/03/10 12:55, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki wrote: Hash reporting == Allow the guest to reuse the hash value to make receive steering consistent b

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Akihiko Odaki
On 2025/03/11 9:38, Jason Wang wrote: On Mon, Mar 10, 2025 at 3:45 PM Akihiko Odaki wrote: On 2025/03/10 12:55, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki wrote: Hash reporting == Allow the guest to reuse the hash value to make receive steering consistent b

Re: [PATCH net-next v9 1/6] virtio_net: Add functions for hashing

2025-03-10 Thread Akihiko Odaki
On 2025/03/11 9:47, Jason Wang wrote: On Mon, Mar 10, 2025 at 2:53 PM Akihiko Odaki wrote: On 2025/03/10 12:55, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki wrote: They are useful to implement VIRTIO_NET_F_RSS and VIRTIO_NET_F_HASH_REPORT. Signed-off-by: Akihiko Odaki T

Re: [PATCH net-next v7 0/9] Device memory TCP TX

2025-03-10 Thread Jakub Kicinski
On Mon, 10 Mar 2025 18:00:51 +0800 Lei Yang wrote: > QE tested this series with virtio-net regression tests, everything works fine. > > Tested-by: Lei Yang It's a bit unclear to me what exactly you tested here and why you chose this patch set.. If you have a set of automated tests integrating

[PATCH v3 07/17] riscv: misaligned: move emulated access uniformity check in a function

2025-03-10 Thread Clément Léger
Split the code that check for the uniformity of misaligned accesses performance on all cpus from check_unaligned_access_emulated_all_cpus() to its own function which will be used for delegation check. No functional changes intended. Signed-off-by: Clément Léger --- arch/riscv/kernel/traps_misali

Re: [PATCH net-next v9 1/6] virtio_net: Add functions for hashing

2025-03-10 Thread Jason Wang
On Mon, Mar 10, 2025 at 2:53 PM Akihiko Odaki wrote: > > On 2025/03/10 12:55, Jason Wang wrote: > > On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki > > wrote: > >> > >> They are useful to implement VIRTIO_NET_F_RSS and > >> VIRTIO_NET_F_HASH_REPORT. > >> > >> Signed-off-by: Akihiko Odaki > >> Test

Re: [PATCH net-next v9 6/6] vhost/net: Support VIRTIO_NET_F_HASH_REPORT

2025-03-10 Thread Jason Wang
On Mon, Mar 10, 2025 at 3:04 PM Akihiko Odaki wrote: > > On 2025/03/10 13:43, Jason Wang wrote: > > On Fri, Mar 7, 2025 at 7:02 PM Akihiko Odaki > > wrote: > >> > >> VIRTIO_NET_F_HASH_REPORT allows to report hash values calculated on the > >> host. When VHOST_NET_F_VIRTIO_NET_HDR is employed, it

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Jason Wang
On Mon, Mar 10, 2025 at 3:59 PM Akihiko Odaki wrote: > > On 2025/03/10 12:55, Jason Wang wrote: > > On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki > > wrote: > >> > >> Hash reporting > >> == > >> > >> Allow the guest to reuse the hash value to make receive steering > >> consistent betw

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Jason Wang
On Mon, Mar 10, 2025 at 3:45 PM Akihiko Odaki wrote: > > On 2025/03/10 12:55, Jason Wang wrote: > > On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki > > wrote: > >> > >> Hash reporting > >> == > >> > >> Allow the guest to reuse the hash value to make receive steering > >> consistent betw

[PATCH v11 26/27] riscv: Documentation for shadow stack on riscv

2025-03-10 Thread Deepak Gupta
Adding documentation on shadow stack for user mode on riscv and kernel interfaces exposed so that user tasks can enable it. Signed-off-by: Deepak Gupta --- Documentation/arch/riscv/index.rst | 1 + Documentation/arch/riscv/zicfiss.rst | 176 +++ 2 files change

[PATCH v11 07/27] riscv mm: manufacture shadow stack pte

2025-03-10 Thread Deepak Gupta
This patch implements creating shadow stack pte (on riscv). Creating shadow stack PTE on riscv means that clearing RWX and then setting W=1. Signed-off-by: Deepak Gupta Reviewed-by: Alexandre Ghiti --- arch/riscv/include/asm/pgtable.h | 10 ++ 1 file changed, 10 insertions(+) diff --gi

[PATCH v3 05/17] riscv: misaligned: use on_each_cpu() for scalar misaligned access probing

2025-03-10 Thread Clément Léger
schedule_on_each_cpu() was used without any good reason while documented as very slow. This call was in the boot path, so better use on_each_cpu() for scalar misaligned checking. Vector misaligned check still needs to use schedule_on_each_cpu() since it requires irqs to be enabled but that's less o

[PATCH v11 01/27] mm: VM_SHADOW_STACK definition for riscv

2025-03-10 Thread Deepak Gupta
VM_HIGH_ARCH_5 is used for riscv Signed-off-by: Deepak Gupta --- include/linux/mm.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 7b1068ddcbb7..1ef231cbc8fe 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -378,6 +378,13 @@ ex

[PATCH v11 04/27] riscv: zicfiss / zicfilp extension csr and bit definitions

2025-03-10 Thread Deepak Gupta
zicfiss and zicfilp extension gets enabled via b3 and b2 in *envcfg CSR. menvcfg controls enabling for S/HS mode. henvcfg control enabling for VS while senvcfg controls enabling for U/VU mode. zicfilp extension extends *status CSR to hold `expected landing pad` bit. A trap or interrupt can occur b

[PATCH v3 09/17] riscv: misaligned: factorize trap handling

2025-03-10 Thread Clément Léger
misaligned accesses traps are not nmi and should be treated as normal one using irqentry_enter()/exit(). Since both load/store and user/kernel should use almost the same path and that we are going to add some code around that, factorize it. Signed-off-by: Clément Léger --- arch/riscv/kernel/trap

[PATCH v11 09/27] riscv mmu: write protect and shadow stack

2025-03-10 Thread Deepak Gupta
`fork` implements copy on write (COW) by making pages readonly in child and parent both. ptep_set_wrprotect and pte_wrprotect clears _PAGE_WRITE in PTE. Assumption is that page is readable and on fault copy on write happens. To implement COW on shadow stack pages, clearing up W bit makes them XWR

[PATCH v11 00/27] riscv control-flow integrity for usermode

2025-03-10 Thread Deepak Gupta
Basics and overview === Software with larger attack surfaces (e.g. network facing apps like databases, browsers or apps relying on browser runtimes) suffer from memory corruption issues which can be utilized by attackers to bend control flow of the program to eventually gain contro

[PATCH v11 05/27] riscv: usercfi state for task and save/restore of CSR_SSP on trap entry/exit

2025-03-10 Thread Deepak Gupta
Carves out space in arch specific thread struct for cfi status and shadow stack in usermode on riscv. This patch does following - defines a new structure cfi_status with status bit for cfi feature - defines shadow stack pointer, base and size in cfi_status structure - defines offsets to new member

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Akihiko Odaki
On 2025/03/10 13:01, Jason Wang wrote: On Mon, Mar 10, 2025 at 11:55 AM Jason Wang wrote: On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki wrote: Hash reporting == Allow the guest to reuse the hash value to make receive steering consistent between the host and guest, and to save ha

Re: [PATCH net-next v9 6/6] vhost/net: Support VIRTIO_NET_F_HASH_REPORT

2025-03-10 Thread Akihiko Odaki
On 2025/03/10 13:43, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:02 PM Akihiko Odaki wrote: VIRTIO_NET_F_HASH_REPORT allows to report hash values calculated on the host. When VHOST_NET_F_VIRTIO_NET_HDR is employed, it will report no hash values (i.e., the hash_report member is always set to VIR

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Akihiko Odaki
On 2025/03/10 12:55, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki wrote: Hash reporting == Allow the guest to reuse the hash value to make receive steering consistent between the host and guest, and to save hash computation. RSS === RSS is a receive steering al

RE: [PATCH bpf-next v12 5/5] igc: Add launch time support to XDP ZC

2025-03-10 Thread Bouska, Zdenek
> -Original Message- > From: Song, Yoong Siang > Sent: Friday, March 7, 2025 3:21 PM > > On Friday, March 7, 2025 9:25 PM, Bouska, Zdenek > wrote: > > [...] > > >> @@ -2996,7 +3035,13 @@ static void igc_xdp_xmit_zc(struct igc_ring *ring) > >>ntu = ring->next_to_use; > >>budget

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Akihiko Odaki
On 2025/03/10 12:55, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki wrote: Hash reporting == Allow the guest to reuse the hash value to make receive steering consistent between the host and guest, and to save hash computation. RSS === RSS is a receive steering al

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Akihiko Odaki
On 2025/03/10 12:55, Jason Wang wrote: On Fri, Mar 7, 2025 at 7:01 PM Akihiko Odaki wrote: Hash reporting == Allow the guest to reuse the hash value to make receive steering consistent between the host and guest, and to save hash computation. RSS === RSS is a receive steering al

Re: [PATCH net-next v9 3/6] tun: Introduce virtio-net hash feature

2025-03-10 Thread Akihiko Odaki
On 2025/03/09 4:32, Willem de Bruijn wrote: Akihiko Odaki wrote: Hash reporting == Allow the guest to reuse the hash value to make receive steering consistent between the host and guest, and to save hash computation. RSS === RSS is a receive steering algorithm that can be negotiat