Re: [PATCH v5] rust: str: Use `core::CStr`, remove the custom `CStr` implementation

2024-07-17 Thread Andrew Lunn
> v3 -> v4: > - Provide the `CStrExt` trait with `display()` method, which returns a > `CStrDisplay` wrapper with `Display` implementation. This addresses > the lack of `Display` implementation for `core::ffi::CStr`. > - Provide `from_bytes_with_nul_unchecked_mut()` method in `CStrExt`, > whi

Re: [PATCH net-next v10 05/14] netdev: netdevice devmem allocator

2024-06-04 Thread Andrew Lunn
> How is the compiler going to know which path is going to be taken the most? > There's two main paths in the ring buffer logic. One when an event stays on > the sub-buffer, the other when the event crosses over to a new sub buffer. > As there's 100s of events that happen on the same sub-buffer for

Re: [PATCH net-next v10 05/14] netdev: netdevice devmem allocator

2024-06-04 Thread Andrew Lunn
> Interesting, as I sped up the ftrace ring buffer by a substantial amount by > adding strategic __always_inline, noinline, likely() and unlikely() > throughout the code. It had to do with what was considered the fast path > and slow path, and not actually the size of the function. gcc got it > hor

Re: [PATCH net-next 6/6] selftests: drv-net-hw: add test for memory allocation failures with page pool

2024-04-29 Thread Andrew Lunn
On Fri, Apr 26, 2024 at 04:23:59PM -0700, Jakub Kicinski wrote: > Bugs in memory allocation failure paths are quite common. > Add a test exercising those paths based on qstat and page pool > failure hook. > > Running on bnxt: > > # ./drivers/net/hw/pp_alloc_fail.py > KTAP version 1 > 1..1 >

Re: [PATCH net-next 0/6] selftests: net: page_poll allocation error injection

2024-04-29 Thread Andrew Lunn
> I'm not super happy with the traffic generation using iperf3, > my initial approach was to use mausezahn. But it turned out to be > 5x slower in terms of PPS. Hopefully this is good enough for now. How important is PPS? In order to get 'Maintained' status, automotive vendors are going to want to