[PATCH v5] net/af_xdp: parse umem map info from mempool range api

2024-06-19 Thread Frank Du
Signed-off-by: Frank Du --- v2: * Add virtual contiguous detect for for multiple memhdrs v3: * Use RTE_ALIGN_FLOOR to get the aligned addr * Add check on the first memhdr of memory chunks v4: * Replace the iterating with simple nb_mem_chunks check v5: * Use rte_mempool_get_mem_range to query t

[PATCH v4] net/af_xdp: fix umem map size for zero copy

2024-05-23 Thread Frank Du
. Correct to directly read the size from the mempool memory chunk. Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Frank Du --- v2: * Add virtual contiguous detect for for multiple memhdrs v3: * Use RTE_ALIGN_FLOOR to get the aligned addr *

[PATCH v3] net/af_xdp: fix umem map size for zero copy

2024-05-23 Thread Frank Du
.@dpdk.org Signed-off-by: Frank Du --- v2: * Add virtual contiguous detect for for multiple memhdrs. v3: * Use RTE_ALIGN_FLOOR to get the aligned addr * Add check on the first memhdr of memory chunks --- drivers/net/af_xdp/rte_eth_af_xdp.c | 40 - 1 file changed, 33

[PATCH v2] net/af_xdp: fix umem map size for zero copy

2024-05-10 Thread Frank Du
The current calculation assumes that the mbufs are contiguous. However, this assumption is incorrect when the memory spans across a huge page. Correct to directly read the size from the mempool memory chunks. Signed-off-by: Frank Du --- v2: * Add virtual contiguous detect for for multiple

[PATCH] net/af_xdp: fix umem map size for zero copy

2024-04-25 Thread Frank Du
The current calculation assumes that the mbufs are contiguous. However, this assumption is incorrect when the memory spans across a huge page. Correct to directly read the size from the mempool memory chunks. Signed-off-by: Frank Du --- drivers/net/af_xdp/rte_eth_af_xdp.c | 10 +- 1

[PATCH] dma/idxd: add reset in the init routine

2023-08-10 Thread Frank Du
Fix for windows, no one reset the dev to a clear status. In Linux, kernel driver will reset during the prob. Signed-off-by: Frank Du --- drivers/dma/idxd/idxd_pci.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/dma/idxd/idxd_pci.c b/drivers/dma/idxd/idxd_pci.c index

[PATCH] net/af_xdp: parse numa node id from sysfs

2022-12-11 Thread Frank Du
Get from /sys/class/net/{if}/device/numa_node. Signed-off-by: Frank Du --- drivers/net/af_xdp/rte_eth_af_xdp.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index b6ec9bf490