aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-07-27 08:07:53 -0400
committerDave Wallace <dwallacelf@gmail.com>2017-08-02 13:26:38 +0000
commit34da892b41ee24ca06b3ed78a01b7c0ccd6c0c87 (patch)
tree38f3fcdf4b5d944558c3f419d45364b128a194f5 /src/plugins
parent024e23ddd96f3281f46208d5294a9a3b5e6de0c7 (diff)
memif: construct interface name out of socket file idx and intf id
Change-Id: Ib4de018a84e9c94df26a8870bf1b04e26204ace1 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/memif/device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/memif/device.c b/src/plugins/memif/device.c
index d1696e5d87d..c76825349f3 100644
--- a/src/plugins/memif/device.c
+++ b/src/plugins/memif/device.c
@@ -50,9 +50,11 @@ static char *memif_tx_func_error_strings[] = {
u8 *
format_memif_device_name (u8 * s, va_list * args)
{
- u32 i = va_arg (*args, u32);
+ u32 dev_instance = va_arg (*args, u32);
+ memif_main_t *mm = &memif_main;
+ memif_if_t *mif = pool_elt_at_index (mm->interfaces, dev_instance);
- s = format (s, "memif%u", i);
+ s = format (s, "memif%lu/%lu", mif->socket_file_index, mif->id);
return s;
}