Re: [PATCH 1/4] bus/pci: Use force-noreplace flag when mapping PCI resources

2025-05-12 Thread Jake Freeland
On Thu May 8, 2025 at 6:32 AM CDT, Anatoly Burakov wrote: > On 5/6/2025 7:40 PM, Jake Freeland wrote: > > When mapping PCI resources in secondary processes, use the > > RTE_MAP_FORCE_ADDRESS_NOREPLACE flag to indicate that the > > mapping must be made at the provided address.

Re: [PATCH 3/3] eal/linux: Check hugepage access permissions

2025-05-07 Thread Jake Freeland
nable behavior to me and is better than having no initial r/w check at all. Thanks, Jake Freeland > > On Wed, May 7, 2025, 02:50 Jake Freeland wrote: > > > Currently, hugepage mountpoints will be used irrespective of permissions, > > leading to potential EACCES errors during

[PATCH] net/ice: Localize dynamic mbuf timestamp data

2025-05-06 Thread Jake Freeland
. Signed-off-by: Jake Freeland --- drivers/net/intel/ice/ice_ethdev.c | 13 - drivers/net/intel/ice/ice_rxtx.c | 27 +-- drivers/net/intel/ice/ice_rxtx.h | 6 ++ 3 files changed, 15 insertions(+), 31 deletions(-) diff --git a/drivers/net/intel/ice

[PATCH 3/3] eal/linux: Check hugepage access permissions

2025-05-06 Thread Jake Freeland
Currently, hugepage mountpoints will be used irrespective of permissions, leading to potential EACCES errors during memory allocation. Fix this by not using a mountpoint if we do not have read/write permissions on it. Signed-off-by: Jake Freeland --- lib/eal/linux/eal_hugepage_info.c | 6

[PATCH 2/3] eal/freebsd: Do not index out of bounds in memseg list

2025-05-06 Thread Jake Freeland
t to safeguard against this, but we are not updating arr->count when inserting holes, so an undesired index may be returned. Signed-off-by: Jake Freeland --- lib/eal/freebsd/eal_memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/e

[PATCH 0/3] EAL memory fixes

2025-05-06 Thread Jake Freeland
Hi there, This patchset contains a number of EAL-specific memory fixes that I've made over the last year. Two pertain to FreeBSD, one pertains to Linux. Let me know if you have any feedback. Thanks. Jake Freeland (3): eal/freebsd: Do not use prev_ms_idx for hole detection eal/freebs

[PATCH 1/3] eal/freebsd: Do not use prev_ms_idx for hole detection

2025-05-06 Thread Jake Freeland
another non-empty memseg list can lead to incorrect hole placement. Signed-off-by: Jake Freeland --- lib/eal/freebsd/eal_memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/eal/freebsd/eal_memory.c b/lib/eal/freebsd/eal_memory.c index 3b72e13506..bcf5a6f986 100644

[PATCH] kernel/freebsd: Allow contigmem allocation in NUMA domains

2025-05-06 Thread Jake Freeland
unset, memory will be interleaved across all NUMA domains on the system. Signed-off-by: Jake Freeland --- kernel/freebsd/contigmem/contigmem.c | 66 +++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/kernel/freebsd/contigmem/contigmem.c b/kernel/freebsd

[PATCH 4/4] bus/pci/bsd: Fix device existence check

2025-05-06 Thread Jake Freeland
access(2). i.e. access(2) does not formally support the O_RDWR flag. Signed-off-by: Jake Freeland --- drivers/bus/pci/bsd/pci.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c index c64cd2c86c

[PATCH 3/4] bus/pci/bsd: Eliminate potential overflow

2025-05-06 Thread Jake Freeland
When calling rte_pci_write_config(), use memcpy(3) to copy @len bytes of @buf into local memory instead of casting it to a uint32_t pointer and dereferencing it. This prevents us from reading data outside of @buf in the case that @buf has a length less than 32 bits. Signed-off-by: Jake Freeland

[PATCH 2/4] bus/pci/bsd: Map resources at EAL baseaddr

2025-05-06 Thread Jake Freeland
Provide the EAL base address as a hint to mmap(2), so device resources are not mapped where malloc(3) et al. make allocations. This makes mapping conflicts less likely for secondary processes that make memory allocations before initializing EAL. Signed-off-by: Jake Freeland --- drivers/bus/pci

[PATCH 1/4] bus/pci: Use force-noreplace flag when mapping PCI resources

2025-05-06 Thread Jake Freeland
-off-by: Jake Freeland --- drivers/bus/pci/pci_common_uio.c | 4 +++- lib/eal/common/eal_private.h | 7 ++- lib/eal/include/rte_eal_paging.h | 7 ++- lib/eal/unix/eal_unix_memory.c | 8 +++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/bus/pci

[PATCH 0/4] BSD PCI Fixes

2025-05-06 Thread Jake Freeland
Hi there, The following patchset includes a number of fixes I've made over the past year relating to the PCI driver. Most of these changes target the FreeBSD platform. Let me know if you have any feedback. Thanks. Jake Freeland (4): bus/pci: Use force-noreplace flag when mapping PCI reso