* [PATCH 0/2] dma-mapping: benchmark: modify the dma_map_benchmark directory @ 2025-07-24 8:55 Qinxin Xia 2025-07-24 8:55 ` [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma Qinxin Xia 2025-07-24 8:56 ` [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent Qinxin Xia 0 siblings, 2 replies; 12+ messages in thread From: Qinxin Xia @ 2025-07-24 8:55 UTC (permalink / raw) To: 21cnbao, m.szyprowski, robin.murphy, jonathan.cameron Cc: prime.zeng, fanghao11, linux-kernel, linuxarm, xiaqinxin This series moves the dma_map_benchmark utility out of the selftests directory and fixes an ABI regression introduced in an earlier change. No functional behaviour of the benchmark itself is changed. Qinxin Xia (2): tools/dma: move dma_map_benchmark from selftests to tools/dma dma-mapping: benchmark: Add padding to ensure uABI remained consistent include/linux/map_benchmark.h | 1 + tools/Makefile | 13 +++++++------ tools/dma/Makefile | 15 +++++++++++++++ tools/{testing/selftests => }/dma/config | 0 .../selftests => }/dma/dma_map_benchmark.c | 0 tools/testing/selftests/dma/Makefile | 7 ------- 6 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 tools/dma/Makefile rename tools/{testing/selftests => }/dma/config (100%) rename tools/{testing/selftests => }/dma/dma_map_benchmark.c (100%) delete mode 100644 tools/testing/selftests/dma/Makefile -- 2.33.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma 2025-07-24 8:55 [PATCH 0/2] dma-mapping: benchmark: modify the dma_map_benchmark directory Qinxin Xia @ 2025-07-24 8:55 ` Qinxin Xia 2025-07-24 9:25 ` Barry Song 2025-07-24 8:56 ` [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent Qinxin Xia 1 sibling, 1 reply; 12+ messages in thread From: Qinxin Xia @ 2025-07-24 8:55 UTC (permalink / raw) To: 21cnbao, m.szyprowski, robin.murphy, jonathan.cameron Cc: prime.zeng, fanghao11, linux-kernel, linuxarm, xiaqinxin dma_map_benchmark is a standalone developer tool rather than an automated selftest. It has no pass/fail criteria, expects manual invocation, and is built as a normal userspace binary.Move it to tools/dma/ and add a minimal, the original selftest.Makefile entry is removed to avoid duplication. Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> --- tools/Makefile | 13 +++++++------ tools/dma/Makefile | 15 +++++++++++++++ tools/{testing/selftests => }/dma/config | 0 .../selftests => }/dma/dma_map_benchmark.c | 0 tools/testing/selftests/dma/Makefile | 7 ------- 5 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 tools/dma/Makefile rename tools/{testing/selftests => }/dma/config (100%) rename tools/{testing/selftests => }/dma/dma_map_benchmark.c (100%) delete mode 100644 tools/testing/selftests/dma/Makefile diff --git a/tools/Makefile b/tools/Makefile index c31cbbd12c45..72dc0e936632 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -14,6 +14,7 @@ help: @echo ' counter - counter tools' @echo ' cpupower - a tool for all things x86 CPU power' @echo ' debugging - tools for debugging' + @echo ' dma - dma map benchmark' @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer' @echo ' firmware - Firmware tools' @echo ' freefall - laptop accelerometer program for disk protection' @@ -69,7 +70,7 @@ acpi: FORCE cpupower: FORCE $(call descend,power/$@) -counter firewire hv guest bootconfig spi usb virtio mm bpf iio gpio objtool leds wmi firmware debugging tracing: FORCE +counter dma firewire hv guest bootconfig spi usb virtio mm bpf iio gpio objtool leds wmi firmware debugging tracing: FORCE $(call descend,$@) bpf/%: FORCE @@ -122,7 +123,7 @@ kvm_stat: FORCE ynl: FORCE $(call descend,net/ynl) -all: acpi counter cpupower gpio hv firewire \ +all: acpi counter cpupower dma gpio hv firewire \ perf selftests bootconfig spi turbostat usb \ virtio mm bpf x86_energy_perf_policy \ tmon freefall iio objtool kvm_stat wmi \ @@ -134,7 +135,7 @@ acpi_install: cpupower_install: $(call descend,power/$(@:_install=),install) -counter_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install mm_install bpf_install objtool_install wmi_install debugging_install tracing_install: +counter_install dma_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install mm_install bpf_install objtool_install wmi_install debugging_install tracing_install: $(call descend,$(@:_install=),install) selftests_install: @@ -164,7 +165,7 @@ kvm_stat_install: ynl_install: $(call descend,net/$(@:_install=),install) -install: acpi_install counter_install cpupower_install gpio_install \ +install: acpi_install counter_install cpupower_install dma_install gpio_install \ hv_install firewire_install iio_install \ perf_install selftests_install turbostat_install usb_install \ virtio_install mm_install bpf_install x86_energy_perf_policy_install \ @@ -178,7 +179,7 @@ acpi_clean: cpupower_clean: $(call descend,power/cpupower,clean) -counter_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean mm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean firmware_clean debugging_clean tracing_clean: +counter_clean dma_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean mm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean firmware_clean debugging_clean tracing_clean: $(call descend,$(@:_clean=),clean) libapi_clean: @@ -224,7 +225,7 @@ build_clean: ynl_clean: $(call descend,net/$(@:_clean=),clean) -clean: acpi_clean counter_clean cpupower_clean hv_clean firewire_clean \ +clean: acpi_clean counter_clean cpupower_clean dma_clean hv_clean firewire_clean \ perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \ mm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \ freefall_clean build_clean libbpf_clean libsubcmd_clean \ diff --git a/tools/dma/Makefile b/tools/dma/Makefile new file mode 100644 index 000000000000..6282eb41e51a --- /dev/null +++ b/tools/dma/Makefile @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0 +bindir ?= /usr/bin + +CFLAGS += -I../../include -I../../usr/include + +all: + $(CC) $(CFLAGS) dma_map_benchmark.c -o dma_map_benchmark + +install: all + install -D dma_map_benchmark $(bindir)/bin/dma_map_benchmark + +clean: + rm -f dma_map_benchmark + +.PHONY: all install clean diff --git a/tools/testing/selftests/dma/config b/tools/dma/config similarity index 100% rename from tools/testing/selftests/dma/config rename to tools/dma/config diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c b/tools/dma/dma_map_benchmark.c similarity index 100% rename from tools/testing/selftests/dma/dma_map_benchmark.c rename to tools/dma/dma_map_benchmark.c diff --git a/tools/testing/selftests/dma/Makefile b/tools/testing/selftests/dma/Makefile deleted file mode 100644 index cd8c5ece1cba..000000000000 --- a/tools/testing/selftests/dma/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -CFLAGS += -I../../../../usr/include/ -CFLAGS += -I../../../../include/ - -TEST_GEN_PROGS := dma_map_benchmark - -include ../lib.mk -- 2.33.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma 2025-07-24 8:55 ` [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma Qinxin Xia @ 2025-07-24 9:25 ` Barry Song 2025-07-24 9:33 ` Qinxin Xia 0 siblings, 1 reply; 12+ messages in thread From: Barry Song @ 2025-07-24 9:25 UTC (permalink / raw) To: Qinxin Xia Cc: m.szyprowski, robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, linuxarm On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: > > dma_map_benchmark is a standalone developer tool rather than an > automated selftest. It has no pass/fail criteria, expects manual > invocation, and is built as a normal userspace binary.Move it to > tools/dma/ and add a minimal, the original selftest.Makefile entry > is removed to avoid duplication. > > Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> > --- > tools/Makefile | 13 +++++++------ > tools/dma/Makefile | 15 +++++++++++++++ > tools/{testing/selftests => }/dma/config | 0 > .../selftests => }/dma/dma_map_benchmark.c | 0 > tools/testing/selftests/dma/Makefile | 7 ------- > 5 files changed, 22 insertions(+), 13 deletions(-) > create mode 100644 tools/dma/Makefile > rename tools/{testing/selftests => }/dma/config (100%) > rename tools/{testing/selftests => }/dma/dma_map_benchmark.c (100%) > delete mode 100644 tools/testing/selftests/dma/Makefile > > diff --git a/tools/Makefile b/tools/Makefile > index c31cbbd12c45..72dc0e936632 100644 > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -14,6 +14,7 @@ help: > @echo ' counter - counter tools' > @echo ' cpupower - a tool for all things x86 CPU power' > @echo ' debugging - tools for debugging' > + @echo ' dma - dma map benchmark' Please make it more general. Right now we only have the DMA map benchmark, but we might add more DMA mapping tools in the future. For examples: tools for dma mapping > @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer' > @echo ' firmware - Firmware tools' > @echo ' freefall - laptop accelerometer program for disk protection' > @@ -69,7 +70,7 @@ acpi: FORCE > cpupower: FORCE > $(call descend,power/$@) > > -counter firewire hv guest bootconfig spi usb virtio mm bpf iio gpio objtool leds wmi firmware debugging tracing: FORCE > +counter dma firewire hv guest bootconfig spi usb virtio mm bpf iio gpio objtool leds wmi firmware debugging tracing: FORCE > $(call descend,$@) > > bpf/%: FORCE > @@ -122,7 +123,7 @@ kvm_stat: FORCE > ynl: FORCE > $(call descend,net/ynl) > > -all: acpi counter cpupower gpio hv firewire \ > +all: acpi counter cpupower dma gpio hv firewire \ > perf selftests bootconfig spi turbostat usb \ > virtio mm bpf x86_energy_perf_policy \ > tmon freefall iio objtool kvm_stat wmi \ > @@ -134,7 +135,7 @@ acpi_install: > cpupower_install: > $(call descend,power/$(@:_install=),install) > > -counter_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install mm_install bpf_install objtool_install wmi_install debugging_install tracing_install: > +counter_install dma_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install mm_install bpf_install objtool_install wmi_install debugging_install tracing_install: > $(call descend,$(@:_install=),install) > > selftests_install: > @@ -164,7 +165,7 @@ kvm_stat_install: > ynl_install: > $(call descend,net/$(@:_install=),install) > > -install: acpi_install counter_install cpupower_install gpio_install \ > +install: acpi_install counter_install cpupower_install dma_install gpio_install \ > hv_install firewire_install iio_install \ > perf_install selftests_install turbostat_install usb_install \ > virtio_install mm_install bpf_install x86_energy_perf_policy_install \ > @@ -178,7 +179,7 @@ acpi_clean: > cpupower_clean: > $(call descend,power/cpupower,clean) > > -counter_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean mm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean firmware_clean debugging_clean tracing_clean: > +counter_clean dma_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean mm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean firmware_clean debugging_clean tracing_clean: > $(call descend,$(@:_clean=),clean) > > libapi_clean: > @@ -224,7 +225,7 @@ build_clean: > ynl_clean: > $(call descend,net/$(@:_clean=),clean) > > -clean: acpi_clean counter_clean cpupower_clean hv_clean firewire_clean \ > +clean: acpi_clean counter_clean cpupower_clean dma_clean hv_clean firewire_clean \ > perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \ > mm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \ > freefall_clean build_clean libbpf_clean libsubcmd_clean \ > diff --git a/tools/dma/Makefile b/tools/dma/Makefile > new file mode 100644 > index 000000000000..6282eb41e51a > --- /dev/null > +++ b/tools/dma/Makefile > @@ -0,0 +1,15 @@ > +# SPDX-License-Identifier: GPL-2.0 > +bindir ?= /usr/bin > + > +CFLAGS += -I../../include -I../../usr/include > + > +all: > + $(CC) $(CFLAGS) dma_map_benchmark.c -o dma_map_benchmark > + > +install: all > + install -D dma_map_benchmark $(bindir)/bin/dma_map_benchmark > + > +clean: > + rm -f dma_map_benchmark Please make the Makefile more general. Right now I only have dma_map_benchmark, but the Makefile shouldn't be tailored specifically for just that one. dma_map_benchmark is one of those targets. And I feel $(bindir)/bin/dma_map_benchmark is an incorrect folder. Thanks Barry ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma 2025-07-24 9:25 ` Barry Song @ 2025-07-24 9:33 ` Qinxin Xia 0 siblings, 0 replies; 12+ messages in thread From: Qinxin Xia @ 2025-07-24 9:33 UTC (permalink / raw) To: Barry Song Cc: m.szyprowski, robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, linuxarm On 2025/7/24 17:25:16, Barry Song <21cnbao@gmail.com> wrote: > On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: >> >> dma_map_benchmark is a standalone developer tool rather than an >> automated selftest. It has no pass/fail criteria, expects manual >> invocation, and is built as a normal userspace binary.Move it to >> tools/dma/ and add a minimal, the original selftest.Makefile entry >> is removed to avoid duplication. >> >> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> >> --- >> tools/Makefile | 13 +++++++------ >> tools/dma/Makefile | 15 +++++++++++++++ >> tools/{testing/selftests => }/dma/config | 0 >> .../selftests => }/dma/dma_map_benchmark.c | 0 >> tools/testing/selftests/dma/Makefile | 7 ------- >> 5 files changed, 22 insertions(+), 13 deletions(-) >> create mode 100644 tools/dma/Makefile >> rename tools/{testing/selftests => }/dma/config (100%) >> rename tools/{testing/selftests => }/dma/dma_map_benchmark.c (100%) >> delete mode 100644 tools/testing/selftests/dma/Makefile >> >> diff --git a/tools/Makefile b/tools/Makefile >> index c31cbbd12c45..72dc0e936632 100644 >> --- a/tools/Makefile >> +++ b/tools/Makefile >> @@ -14,6 +14,7 @@ help: >> @echo ' counter - counter tools' >> @echo ' cpupower - a tool for all things x86 CPU power' >> @echo ' debugging - tools for debugging' >> + @echo ' dma - dma map benchmark' > > Please make it more general. Right now we only have the DMA map > benchmark, but we might add more DMA mapping tools in the future. > For examples: tools for dma mapping > ok,I will fix in next version.>> @echo ' firewire - the userspace part of nosy, an IEEE-1394 traffic sniffer' >> @echo ' firmware - Firmware tools' >> @echo ' freefall - laptop accelerometer program for disk protection' >> @@ -69,7 +70,7 @@ acpi: FORCE >> cpupower: FORCE >> $(call descend,power/$@) >> >> -counter firewire hv guest bootconfig spi usb virtio mm bpf iio gpio objtool leds wmi firmware debugging tracing: FORCE >> +counter dma firewire hv guest bootconfig spi usb virtio mm bpf iio gpio objtool leds wmi firmware debugging tracing: FORCE >> $(call descend,$@) >> >> bpf/%: FORCE >> @@ -122,7 +123,7 @@ kvm_stat: FORCE >> ynl: FORCE >> $(call descend,net/ynl) >> >> -all: acpi counter cpupower gpio hv firewire \ >> +all: acpi counter cpupower dma gpio hv firewire \ >> perf selftests bootconfig spi turbostat usb \ >> virtio mm bpf x86_energy_perf_policy \ >> tmon freefall iio objtool kvm_stat wmi \ >> @@ -134,7 +135,7 @@ acpi_install: >> cpupower_install: >> $(call descend,power/$(@:_install=),install) >> >> -counter_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install mm_install bpf_install objtool_install wmi_install debugging_install tracing_install: >> +counter_install dma_install firewire_install gpio_install hv_install iio_install perf_install bootconfig_install spi_install usb_install virtio_install mm_install bpf_install objtool_install wmi_install debugging_install tracing_install: >> $(call descend,$(@:_install=),install) >> >> selftests_install: >> @@ -164,7 +165,7 @@ kvm_stat_install: >> ynl_install: >> $(call descend,net/$(@:_install=),install) >> >> -install: acpi_install counter_install cpupower_install gpio_install \ >> +install: acpi_install counter_install cpupower_install dma_install gpio_install \ >> hv_install firewire_install iio_install \ >> perf_install selftests_install turbostat_install usb_install \ >> virtio_install mm_install bpf_install x86_energy_perf_policy_install \ >> @@ -178,7 +179,7 @@ acpi_clean: >> cpupower_clean: >> $(call descend,power/cpupower,clean) >> >> -counter_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean mm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean firmware_clean debugging_clean tracing_clean: >> +counter_clean dma_clean hv_clean firewire_clean bootconfig_clean spi_clean usb_clean virtio_clean mm_clean wmi_clean bpf_clean iio_clean gpio_clean objtool_clean leds_clean firmware_clean debugging_clean tracing_clean: >> $(call descend,$(@:_clean=),clean) >> >> libapi_clean: >> @@ -224,7 +225,7 @@ build_clean: >> ynl_clean: >> $(call descend,net/$(@:_clean=),clean) >> >> -clean: acpi_clean counter_clean cpupower_clean hv_clean firewire_clean \ >> +clean: acpi_clean counter_clean cpupower_clean dma_clean hv_clean firewire_clean \ >> perf_clean selftests_clean turbostat_clean bootconfig_clean spi_clean usb_clean virtio_clean \ >> mm_clean bpf_clean iio_clean x86_energy_perf_policy_clean tmon_clean \ >> freefall_clean build_clean libbpf_clean libsubcmd_clean \ >> diff --git a/tools/dma/Makefile b/tools/dma/Makefile >> new file mode 100644 >> index 000000000000..6282eb41e51a >> --- /dev/null >> +++ b/tools/dma/Makefile >> @@ -0,0 +1,15 @@ >> +# SPDX-License-Identifier: GPL-2.0 >> +bindir ?= /usr/bin >> + >> +CFLAGS += -I../../include -I../../usr/include >> + >> +all: >> + $(CC) $(CFLAGS) dma_map_benchmark.c -o dma_map_benchmark >> + >> +install: all >> + install -D dma_map_benchmark $(bindir)/bin/dma_map_benchmark >> + >> +clean: >> + rm -f dma_map_benchmark > > Please make the Makefile more general. Right now I only have > dma_map_benchmark, but the Makefile shouldn't be tailored specifically > for just that one. dma_map_benchmark is one of those targets. > > And I feel $(bindir)/bin/dma_map_benchmark is an incorrect folder. > > Thanks > Barry Ok, in next version.I will make it more general. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent 2025-07-24 8:55 [PATCH 0/2] dma-mapping: benchmark: modify the dma_map_benchmark directory Qinxin Xia 2025-07-24 8:55 ` [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma Qinxin Xia @ 2025-07-24 8:56 ` Qinxin Xia 2025-07-24 9:07 ` Barry Song 1 sibling, 1 reply; 12+ messages in thread From: Qinxin Xia @ 2025-07-24 8:56 UTC (permalink / raw) To: 21cnbao, m.szyprowski, robin.murphy, jonathan.cameron Cc: prime.zeng, fanghao11, linux-kernel, linuxarm, xiaqinxin The padding field in the structure was previously reserved to maintain a stable interface for potential new fields, ensuring compatibility with user-space shared data structures. However,it was accidentally removed by tiantao in a prior commit, which may lead to incompatibility between user space and the kernel. This patch reinstates the padding to restore the original structure layout and preserve compatibility. Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition") Cc: stable@vger.kernel.org Acked-by: Barry Song <baohua@kernel.org> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> --- include/linux/map_benchmark.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/map_benchmark.h b/include/linux/map_benchmark.h index 62674c83bde4..2ac2fe52f248 100644 --- a/include/linux/map_benchmark.h +++ b/include/linux/map_benchmark.h @@ -27,5 +27,6 @@ struct map_benchmark { __u32 dma_dir; /* DMA data direction */ __u32 dma_trans_ns; /* time for DMA transmission in ns */ __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */ + __u8 expansion[76]; /* For future use */ }; #endif /* _KERNEL_DMA_BENCHMARK_H */ -- 2.33.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent 2025-07-24 8:56 ` [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent Qinxin Xia @ 2025-07-24 9:07 ` Barry Song 2025-07-24 9:35 ` Qinxin Xia 0 siblings, 1 reply; 12+ messages in thread From: Barry Song @ 2025-07-24 9:07 UTC (permalink / raw) To: Qinxin Xia, m.szyprowski Cc: robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, linuxarm, iommu On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: > > The padding field in the structure was previously reserved to > maintain a stable interface for potential new fields, ensuring > compatibility with user-space shared data structures. > However,it was accidentally removed by tiantao in a prior commit, > which may lead to incompatibility between user space and the kernel. > > This patch reinstates the padding to restore the original structure > layout and preserve compatibility. > > Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition") > Cc: stable@vger.kernel.org > Acked-by: Barry Song <baohua@kernel.org> > Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> I don’t think these two patches should be part of the same series. This one is a bug fix and should be handled separately—ideally picked up on its own and backported to stable. Also, the subject should not say "Add"—it should be "Restore". I assume Marek can handle it? > --- > include/linux/map_benchmark.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/map_benchmark.h b/include/linux/map_benchmark.h > index 62674c83bde4..2ac2fe52f248 100644 > --- a/include/linux/map_benchmark.h > +++ b/include/linux/map_benchmark.h > @@ -27,5 +27,6 @@ struct map_benchmark { > __u32 dma_dir; /* DMA data direction */ > __u32 dma_trans_ns; /* time for DMA transmission in ns */ > __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */ > + __u8 expansion[76]; /* For future use */ > }; > #endif /* _KERNEL_DMA_BENCHMARK_H */ > -- > 2.33.0 > Thanks Barry ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent 2025-07-24 9:07 ` Barry Song @ 2025-07-24 9:35 ` Qinxin Xia 2025-07-24 9:42 ` Barry Song 0 siblings, 1 reply; 12+ messages in thread From: Qinxin Xia @ 2025-07-24 9:35 UTC (permalink / raw) To: Barry Song, m.szyprowski Cc: robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, linuxarm, iommu On 2025/7/24 17:07:08, Barry Song <21cnbao@gmail.com> wrote: > On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: >> >> The padding field in the structure was previously reserved to >> maintain a stable interface for potential new fields, ensuring >> compatibility with user-space shared data structures. >> However,it was accidentally removed by tiantao in a prior commit, >> which may lead to incompatibility between user space and the kernel. >> >> This patch reinstates the padding to restore the original structure >> layout and preserve compatibility. >> >> Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition") >> Cc: stable@vger.kernel.org >> Acked-by: Barry Song <baohua@kernel.org> >> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> > > I don’t think these two patches should be part of the same series. This > one is a bug fix and should be handled separately—ideally picked up on > its own and backported to stable. > > Also, the subject should not say "Add"—it should be "Restore". I assume > Marek can handle it? > >> --- >> include/linux/map_benchmark.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/linux/map_benchmark.h b/include/linux/map_benchmark.h >> index 62674c83bde4..2ac2fe52f248 100644 >> --- a/include/linux/map_benchmark.h >> +++ b/include/linux/map_benchmark.h >> @@ -27,5 +27,6 @@ struct map_benchmark { >> __u32 dma_dir; /* DMA data direction */ >> __u32 dma_trans_ns; /* time for DMA transmission in ns */ >> __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */ >> + __u8 expansion[76]; /* For future use */ >> }; >> #endif /* _KERNEL_DMA_BENCHMARK_H */ >> -- >> 2.33.0 >> > > Thanks > Barry Ok, I will send a new version to fix it. Thanks ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent 2025-07-24 9:35 ` Qinxin Xia @ 2025-07-24 9:42 ` Barry Song 2025-07-29 12:32 ` Marek Szyprowski 0 siblings, 1 reply; 12+ messages in thread From: Barry Song @ 2025-07-24 9:42 UTC (permalink / raw) To: Qinxin Xia Cc: m.szyprowski, robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, linuxarm, iommu On Thu, Jul 24, 2025 at 5:35 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: > > > > On 2025/7/24 17:07:08, Barry Song <21cnbao@gmail.com> wrote: > > On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: > >> > >> The padding field in the structure was previously reserved to > >> maintain a stable interface for potential new fields, ensuring > >> compatibility with user-space shared data structures. > >> However,it was accidentally removed by tiantao in a prior commit, > >> which may lead to incompatibility between user space and the kernel. > >> > >> This patch reinstates the padding to restore the original structure > >> layout and preserve compatibility. > >> > >> Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition") > >> Cc: stable@vger.kernel.org > >> Acked-by: Barry Song <baohua@kernel.org> > >> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> > > > > I don’t think these two patches should be part of the same series. This > > one is a bug fix and should be handled separately—ideally picked up on > > its own and backported to stable. > > > > Also, the subject should not say "Add"—it should be "Restore". I assume > > Marek can handle it? ... > Ok, I will send a new version to fix it. If Marek can help fix it while picking it up into the dma-mapping tree, you might not need to send a new version. Honestly, I hope this gets merged soon—it feels like it's been overdue for quite a while. Thanks Barry ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent 2025-07-24 9:42 ` Barry Song @ 2025-07-29 12:32 ` Marek Szyprowski 2025-08-04 4:47 ` Barry Song 0 siblings, 1 reply; 12+ messages in thread From: Marek Szyprowski @ 2025-07-29 12:32 UTC (permalink / raw) To: Barry Song, Qinxin Xia Cc: robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, linuxarm, iommu On 24.07.2025 11:42, Barry Song wrote: > On Thu, Jul 24, 2025 at 5:35 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: >> On 2025/7/24 17:07:08, Barry Song <21cnbao@gmail.com> wrote: >>> On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: >>>> The padding field in the structure was previously reserved to >>>> maintain a stable interface for potential new fields, ensuring >>>> compatibility with user-space shared data structures. >>>> However,it was accidentally removed by tiantao in a prior commit, >>>> which may lead to incompatibility between user space and the kernel. >>>> >>>> This patch reinstates the padding to restore the original structure >>>> layout and preserve compatibility. >>>> >>>> Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition") >>>> Cc: stable@vger.kernel.org >>>> Acked-by: Barry Song <baohua@kernel.org> >>>> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> >>> I don’t think these two patches should be part of the same series. This >>> one is a bug fix and should be handled separately—ideally picked up on >>> its own and backported to stable. >>> >>> Also, the subject should not say "Add"—it should be "Restore". I assume >>> Marek can handle it? > ... >> Ok, I will send a new version to fix it. > If Marek can help fix it while picking it up into the dma-mapping tree, you > might not need to send a new version. > > Honestly, I hope this gets merged soon—it feels like it's been > overdue for quite a while. I'm sorry, I wasn't aware that this need to go via dma-mapping tree. I will take it after this merge window. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent 2025-07-29 12:32 ` Marek Szyprowski @ 2025-08-04 4:47 ` Barry Song 2025-08-04 8:12 ` Yicong Yang 0 siblings, 1 reply; 12+ messages in thread From: Barry Song @ 2025-08-04 4:47 UTC (permalink / raw) To: Marek Szyprowski Cc: Qinxin Xia, robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, linuxarm, iommu On Tue, Jul 29, 2025 at 8:32 PM Marek Szyprowski <m.szyprowski@samsung.com> wrote: > > On 24.07.2025 11:42, Barry Song wrote: > > On Thu, Jul 24, 2025 at 5:35 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: > >> On 2025/7/24 17:07:08, Barry Song <21cnbao@gmail.com> wrote: > >>> On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: > >>>> The padding field in the structure was previously reserved to > >>>> maintain a stable interface for potential new fields, ensuring > >>>> compatibility with user-space shared data structures. > >>>> However,it was accidentally removed by tiantao in a prior commit, > >>>> which may lead to incompatibility between user space and the kernel. > >>>> > >>>> This patch reinstates the padding to restore the original structure > >>>> layout and preserve compatibility. > >>>> > >>>> Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition") > >>>> Cc: stable@vger.kernel.org > >>>> Acked-by: Barry Song <baohua@kernel.org> > >>>> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> > >>> I don’t think these two patches should be part of the same series. This > >>> one is a bug fix and should be handled separately—ideally picked up on > >>> its own and backported to stable. > >>> > >>> Also, the subject should not say "Add"—it should be "Restore". I assume > >>> Marek can handle it? > > ... > >> Ok, I will send a new version to fix it. > > If Marek can help fix it while picking it up into the dma-mapping tree, you > > might not need to send a new version. > > > > Honestly, I hope this gets merged soon—it feels like it's been > > overdue for quite a while. > > I'm sorry, I wasn't aware that this need to go via dma-mapping tree. I > will take it after this merge window. Thank you, Marek! I also noticed that Xiang Chen’s email has been invalid for quite a while, likely he moved to another company some time ago. It looks like Yicong has volunteered to take this on: https://lkml.indiana.edu/2408.1/08865.html I'm not sure if that's still the case. If it is, would Yicong be able to resend the email with my ack? > > Best regards > -- > Marek Szyprowski, PhD > Samsung R&D Institute Poland > Thanks Barry ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent 2025-08-04 4:47 ` Barry Song @ 2025-08-04 8:12 ` Yicong Yang 2025-08-04 21:57 ` Barry Song 0 siblings, 1 reply; 12+ messages in thread From: Yicong Yang @ 2025-08-04 8:12 UTC (permalink / raw) To: Barry Song, Marek Szyprowski, Qinxin Xia Cc: robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, iommu, yangyicong Hi Barry, On 2025/8/4 12:47, Barry Song wrote: > On Tue, Jul 29, 2025 at 8:32 PM Marek Szyprowski > <m.szyprowski@samsung.com> wrote: >> >> On 24.07.2025 11:42, Barry Song wrote: >>> On Thu, Jul 24, 2025 at 5:35 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: >>>> On 2025/7/24 17:07:08, Barry Song <21cnbao@gmail.com> wrote: >>>>> On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: >>>>>> The padding field in the structure was previously reserved to >>>>>> maintain a stable interface for potential new fields, ensuring >>>>>> compatibility with user-space shared data structures. >>>>>> However,it was accidentally removed by tiantao in a prior commit, >>>>>> which may lead to incompatibility between user space and the kernel. >>>>>> >>>>>> This patch reinstates the padding to restore the original structure >>>>>> layout and preserve compatibility. >>>>>> >>>>>> Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition") >>>>>> Cc: stable@vger.kernel.org >>>>>> Acked-by: Barry Song <baohua@kernel.org> >>>>>> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> >>>>> I don’t think these two patches should be part of the same series. This >>>>> one is a bug fix and should be handled separately—ideally picked up on >>>>> its own and backported to stable. >>>>> >>>>> Also, the subject should not say "Add"—it should be "Restore". I assume >>>>> Marek can handle it? >>> ... >>>> Ok, I will send a new version to fix it. >>> If Marek can help fix it while picking it up into the dma-mapping tree, you >>> might not need to send a new version. >>> >>> Honestly, I hope this gets merged soon—it feels like it's been >>> overdue for quite a while. >> >> I'm sorry, I wasn't aware that this need to go via dma-mapping tree. I >> will take it after this merge window. > > Thank you, Marek! I also noticed that Xiang Chen’s email has been invalid > for quite a while, likely he moved to another company some time ago. It looks > like Yicong has volunteered to take this on: > > https://lkml.indiana.edu/2408.1/08865.html > > I'm not sure if that's still the case. If it is, would Yicong be able to > resend the email with my ack? > thanks for reminding. I think currently Qinxin is more suitable to help with this. she's working on the smmu stuffs and help look after this benchmark tool internally for some time :) Maybe she can help along with you (ack the fact that you're always helping to review the codes) if it's ok with you. Thanks. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent 2025-08-04 8:12 ` Yicong Yang @ 2025-08-04 21:57 ` Barry Song 0 siblings, 0 replies; 12+ messages in thread From: Barry Song @ 2025-08-04 21:57 UTC (permalink / raw) To: Yicong Yang Cc: Marek Szyprowski, Qinxin Xia, robin.murphy, jonathan.cameron, prime.zeng, fanghao11, linux-kernel, iommu, yangyicong On Mon, Aug 4, 2025 at 8:12 PM Yicong Yang <yangyicong@huawei.com> wrote: > > Hi Barry, > > On 2025/8/4 12:47, Barry Song wrote: > > On Tue, Jul 29, 2025 at 8:32 PM Marek Szyprowski > > <m.szyprowski@samsung.com> wrote: > >> > >> On 24.07.2025 11:42, Barry Song wrote: > >>> On Thu, Jul 24, 2025 at 5:35 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: > >>>> On 2025/7/24 17:07:08, Barry Song <21cnbao@gmail.com> wrote: > >>>>> On Thu, Jul 24, 2025 at 4:56 PM Qinxin Xia <xiaqinxin@huawei.com> wrote: > >>>>>> The padding field in the structure was previously reserved to > >>>>>> maintain a stable interface for potential new fields, ensuring > >>>>>> compatibility with user-space shared data structures. > >>>>>> However,it was accidentally removed by tiantao in a prior commit, > >>>>>> which may lead to incompatibility between user space and the kernel. > >>>>>> > >>>>>> This patch reinstates the padding to restore the original structure > >>>>>> layout and preserve compatibility. > >>>>>> > >>>>>> Fixes: 8ddde07a3d28 ("dma-mapping: benchmark: extract a common header file for map_benchmark definition") > >>>>>> Cc: stable@vger.kernel.org > >>>>>> Acked-by: Barry Song <baohua@kernel.org> > >>>>>> Signed-off-by: Qinxin Xia <xiaqinxin@huawei.com> > >>>>> I don’t think these two patches should be part of the same series. This > >>>>> one is a bug fix and should be handled separately—ideally picked up on > >>>>> its own and backported to stable. > >>>>> > >>>>> Also, the subject should not say "Add"—it should be "Restore". I assume > >>>>> Marek can handle it? > >>> ... > >>>> Ok, I will send a new version to fix it. > >>> If Marek can help fix it while picking it up into the dma-mapping tree, you > >>> might not need to send a new version. > >>> > >>> Honestly, I hope this gets merged soon—it feels like it's been > >>> overdue for quite a while. > >> > >> I'm sorry, I wasn't aware that this need to go via dma-mapping tree. I > >> will take it after this merge window. > > > > Thank you, Marek! I also noticed that Xiang Chen’s email has been invalid > > for quite a while, likely he moved to another company some time ago. It looks > > like Yicong has volunteered to take this on: > > > > https://lkml.indiana.edu/2408.1/08865.html > > > > I'm not sure if that's still the case. If it is, would Yicong be able to > > resend the email with my ack? > > > > thanks for reminding. I think currently Qinxin is more suitable to help with this. > she's working on the smmu stuffs and help look after this benchmark tool internally > for some time :) > > Maybe she can help along with you (ack the fact that you're always helping to review > the codes) if it's ok with you. Certainly, Qinxin is welcome to take over. I will be glad to review the code when time permits, although my schedule is typically quite occupied with mm. Thanks Barry ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-08-04 21:58 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-07-24 8:55 [PATCH 0/2] dma-mapping: benchmark: modify the dma_map_benchmark directory Qinxin Xia 2025-07-24 8:55 ` [PATCH 1/2] tools/dma: move dma_map_benchmark from selftests to tools/dma Qinxin Xia 2025-07-24 9:25 ` Barry Song 2025-07-24 9:33 ` Qinxin Xia 2025-07-24 8:56 ` [PATCH 2/2] dma-mapping: benchmark: Add padding to ensure uABI remained consistent Qinxin Xia 2025-07-24 9:07 ` Barry Song 2025-07-24 9:35 ` Qinxin Xia 2025-07-24 9:42 ` Barry Song 2025-07-29 12:32 ` Marek Szyprowski 2025-08-04 4:47 ` Barry Song 2025-08-04 8:12 ` Yicong Yang 2025-08-04 21:57 ` Barry Song
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).