@@ -73,6 +73,9 @@ struct cxl_endpoint *util_cxl_endpoint_filter(struct cxl_endpoint *endpoint,
if (strcmp(arg, cxl_endpoint_get_devname(endpoint)) == 0)
break;
+
+ if (strcmp(arg, cxl_endpoint_get_host(endpoint)) == 0)
+ break;
}
free(ident);
@@ -116,6 +119,9 @@ static struct cxl_port *__util_cxl_port_filter(struct cxl_port *port,
if (strcmp(arg, cxl_port_get_devname(port)) == 0)
break;
+
+ if (strcmp(arg, cxl_port_get_host(port)) == 0)
+ break;
}
free(ident);
@@ -303,6 +309,9 @@ struct cxl_memdev *util_cxl_memdev_filter(struct cxl_memdev *memdev,
if (strcmp(name, cxl_memdev_get_devname(memdev)) == 0)
break;
+
+ if (strcmp(name, cxl_memdev_get_host(memdev)) == 0)
+ break;
}
free(ident);
Accept host device names as valid filters for memdevs, ports, and endpoints. # cxl list -u -m 7 { "memdev":"mem7", "pmem_size":"256.00 MiB (268.44 MB)", "ram_size":"256.00 MiB (268.44 MB)", "serial":"0x6", "numa_node":0, "host":"cxl_mem.6" } # cxl list -u -m cxl_mem.6 { "memdev":"mem7", "pmem_size":"256.00 MiB (268.44 MB)", "ram_size":"256.00 MiB (268.44 MB)", "serial":"0x6", "numa_node":0, "host":"cxl_mem.6" } Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- cxl/filter.c | 9 +++++++++ 1 file changed, 9 insertions(+)