Itsuro Oda
7470f845c1
vhost: make IOTLB cache name unique among processes
Currently, iotlb cache name is comprised of vid and virtqueue index. For example, "iotlb_cache_0_0". Because vid is assigned per process, iotlb cache name is not unique among multi processes. For example a secondary process uses a vhost (ex. eth_vhost0,iface=/tmp/sock0) and another secondary process uses a vhost (ex. eth_vhost1,iface=/tmp/sock1), iotlb cache name of both vhost ("iotlb_cache_0_0") are same and as a result iotlb cache is broken. This patch makes iotlb cache name unique among milti processes by adding process id to the iotlb cache name. The prefix of the name is shortened to "iotlb_" since the maximum length of pool name is 25 bytes (RTE_MEMPOOL_NAMESIZE is 26). Note that it is just 25 characters in maximum at the moment. Here, * pid_t == int: max 10 digits. * vid < MAX_VHOST_DECICE(1024): max 4 digits. * vq_index < VHOST_MAX_VRING(256): max 3 digits. Fixes: d012d1f293f4 ("vhost: add IOTLB helper functions") Cc: stable@dpdk.org Signed-off-by: Itsuro Oda <oda@valinux.co.jp> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%