From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B329948856 for ; Sun, 28 Sep 2025 18:27:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F98B4021F; Sun, 28 Sep 2025 18:27:14 +0200 (CEST) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by mails.dpdk.org (Postfix) with ESMTP id 44DE940144 for ; Sun, 28 Sep 2025 18:27:12 +0200 (CEST) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-b3b3a6f4dd4so178679566b.0 for ; Sun, 28 Sep 2025 09:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1759076832; x=1759681632; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=Xx9ZGLJers2H66vlvmZflAXmagDnUjt0oNF3xjP0nlk=; b=sFnL57grZXopOWEfjqgJkn40+S/0bVXmGZU9uzwhNgrGP9wTfyXCo4fNBM4TlF8+vv 9m+jpOa6RNo6S/ZFVDIc0v9a27D13PemxevTQZrp/qLq/icfnFEUP2xgSYcOBWQbdYcE 00ZQUqBvDEbjkkylSNTT4NDmrLvyMtHqyNYp6Cnq6Y3WElK+aBlOSAirLrB7wuPl4u9H bqjZEidkskmh20KBsa9iudqm3hXXYc/XP+f03p6MkaNnS8bWyZYMwPRDAeDAOxIUVhna f9G0/0BGcri7l91OTNFgxlDFXP2vMl7VwiEKUKg51Y76EWzHzF+wftxQKlpWOynnLbW2 6Img== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759076832; x=1759681632; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xx9ZGLJers2H66vlvmZflAXmagDnUjt0oNF3xjP0nlk=; b=sgi/paCvaNv7x+xFAHwTCV9DY14NURmZim1BQybKtWNGicrAjpOXmfPx5RUhOiiD6J GjUwejv9nRlKNG6go3RFX0PjeA8Qbi1+BrSWVCzsDNG2lyFuMhiL8vg/bk3RHbdY2Loz nMLCUDYQJgnZbFT5cJV6XIL5hZo4Si//LN8FInnkmvLcsy7xuRWoXJwKF9cvIjVBaovo cepT4bju9WLQs/I0kPYLxIFFsiNOApe+3AWHXq1r2NmagCx4YHXdEAhvYvt0XNN7qqAc SL5gEezymsRPm75j6Zjft/+rUbCnLMGT67FR/yoFsNf5ZTgcZOFxKojdfJT0atF5ISxo 03+g== X-Gm-Message-State: AOJu0Yxn2D+P43sUlJwnmfWtKW0H2yVmBP8yj6tTFUi1fwQX/cUMXM1x wC6UPTSzMK475h0yQVRNPNgqpsIkdGxvbnGpLGDdQNF6oXlj8GGNv9pBPd9+Jj0s1O2vIUcSQqW gwh4I65o= X-Gm-Gg: ASbGncuZh551Qz9D1cKVPiR/YV9WwyLFcv0T/pQcFaRGTlOGdxEZUICcSArYyNoBCC4 UGyZU4z2O+VdlTXPbtEfsGlnOHRiMafL27oWXf76eE6vQZDtYowULL3NJWsMC3JRudiGKCckV4g /84jDlZmjDG1wYQcH3w+Klolp7Z9bxMLpAXuQjO5ign2ES2A/P+j6YNOtWXRh4EaW8CmRtJxjVz aoJRDQ8w11KFbBNCtSfCuO4mViNxADigQ7X39sfVEup4timRfVrB7uPQniCCDQzmwbzd8b5nkPe GoR55KQW5HLMGd/8t5HalOFU0fKP3s22qEX6pMMDo5hFtmYMxGlZXS9Nc9zkAbgLENzjiLhtF2v 5YHPajdce2gUA3ZWrxAWla/75REyZ4EEsvF36mH8pHxzdIazBmhly9+gT31jWVVZINJe1cg+3bL 5H8Rmuxwt3JQ== X-Google-Smtp-Source: AGHT+IFGQ9ctiEXu496xVrgjBrHXJyY340lmKLCgoZkr5M7+GeP8h5m74p4ODMboScL7FbaLx3burg== X-Received: by 2002:a17:907:e895:b0:b3f:f6d:1d90 with SMTP id a640c23a62f3a-b3f0f7cbd87mr30698566b.11.1759076831493; Sun, 28 Sep 2025 09:27:11 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b3e98971980sm49678766b.17.2025.09.28.09.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Sep 2025 09:27:11 -0700 (PDT) Date: Sun, 28 Sep 2025 09:27:07 -0700 From: Stephen Hemminger To: Patrick Mahan Cc: users@dpdk.org Subject: Re: Use of the 'virtio-user' exception path interface Message-ID: <20250928092707.3625a385@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Sat, 27 Sep 2025 18:41:58 -0700 Patrick Mahan wrote: > This is on yocto-linux 4.19.87 on X86_64. DPDK (stable) 18.11.11 > > I am working on a project where I am trying to make use of the 'virtio-user' > exception path and it (sort of) seems to be working. The issue I am trying to > understand is the following: > > Background - > > Per the how-to documentation > (https://doc.dpdk.org/guides-25.07/howto/virtio_user_as_exception_path.html), I > have called rte_eal_init() passing in the PCI address of my physical interfaces. > I am also creating a couple of these "exception" interfaces with the following code - > > char portname[32], portargs[256]; > char macaddr[6] = { 0x00, 0x0c, 0x1b, 0x29, 0x29, 0x71 }; > uint16_t portid; > > /** > * Create the first 'iflan0' > */ > snprintf(portargs, 256, > "path=/dev/vhost-net,queues=2,queue_size=1024,iface=iflan0,mac=%02x:%02x:%02x:%02x:%02x:%02x", > macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]); > > /** > * Call the hotplug layer > */ > if (rte_eal_hotplug_add("vdev", "virt-user0", portargs) < 0) { > fprintf(stderr, "[DPDK::hotplug] failed to create iflan0 (virtio-user0)\n"); > return -1; > } > > /** > * Create the second 'ifwan0' > */ > macaddr[5]++; > snprintf(portargs, 256, > "path=/dev/vhost-net,queues=2,queue_size=1024,iface=ifwan0,mac=%02x:%02x:%02x:%02x:%02x:%02x", > macaddr[0], macaddr[1], macaddr[2], macaddr[3], macaddr[4], macaddr[5]); > > /** > * Call the hotplug layer > */ > if (rte_eal_hotplug_add("vdev", "virt-user1", portargs) < 0) { > fprintf(stderr, "[DPDK::hotplug] failed to create iflan0 (virtio-user0)\n"); > return -1; > } > > ... > > RTE_ETH_FOREACH_DEV(portid) { > if (port_init(portid, bufPool, NRXQUEUES, NTXQUEUES) < 0) { > fprintf(stderr, "[DPDK::port_init] failed to init DPDK port %u", > portid); > return -1; > } > } > > ... > > /* Retrieve the ifindex of iflan0 and ifwan0 */ > unsigned int iflan0_index = if_nametoindex("iflan0"); > unsigned int ifwan0_index = if_nametoindex("ifwan0"); > > fprintf(stdout, "[DPDK] Exception interface 'iflan0': %u", iflan0_index); > fprintf(stdout, "[DPDK] Exception interface 'ifwan0': %u", ifwan0_index); > > ... /* onto the packet processing loops */ > > The interfaces are instantiated and those two logs messages are seen - > > . . . > [DPDK] Exception interface 'iflan0': 58 > [DPDK] Exception interface 'ifwan0': 59 > . . . > > However, when I check the list of kernel interfaces using 'ip link show', I find: > > pmahan-dpdk-v1: # ip link show > . . . > 66: iflan0: mtu 1500 qdisc noop state DOWN mode DEFAULT > group default qlen 1000 > link/ether 00:0c:1b:29:29:71 brd ff:ff:ff:ff:ff:ff > 67: ifwan0: mtu 1500 qdisc noop state DOWN mode DEFAULT > group default qlen 1000 > link/ether 00:0c:1b:29:29:72 brd ff:ff:ff:ff:ff:ff > > So, some point after I created and started these ports and obtain the original > ifindexes, they were deleted and re-created. I have some clue from the IKE > kernel log messages: > ... > Sep 27 23:30:22 2025 pmahan-dpdk-v1 IKE: 11[KNL] interface iflan0 activated > Sep 27 23:30:22 2025 pmahan-dpdk-v1 IKE: 09[KNL] interface ifwan0 activated > ... > Sep 27 23:30:22 2025 pmahan-dpdk-v1 IKE: 09[KNL] interface iflan0 deactivated > Sep 27 23:30:22 2025 pmahan-dpdk-v1 IKE: 13[KNL] interface iflan0 deleted > Sep 27 23:30:22 2025 pmahan-dpdk-v1 IKE: 12[KNL] interface ifwan0 deactivated > Sep 27 23:30:22 2025 pmahan-dpdk-v1 IKE: 05[KNL] interface ifwan0 deleted > > I never see another IKE log about those interfaces being activated again > (possibly because they show as DOWN). > > Short of crawling through the guts of the virtio-user support in vdev, I thought > I would start asking questions here. > > Also, is there any specific logging I can enabled to see if I can understand why > this is happening? > > Thanks for any help, > > Patrick > It maybe that your systems networking code (udev) in user space is reacting to the new interface.