From nobody Mon Feb 9 21:20:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1607065596; cv=none; d=zohomail.com; s=zohoarc; b=iWS/sslYOhJltCZhlJycaO6DJaybGwhKC9gJiwtxa8DjMOiUqJMMtmOWKPBOHIF6goCiXwaWizdDflfpoDalSE/PUPZMa/viTH+qrJ5YMYoVAwXIoLWQ9i5iDA4Q5t0lC3ym3vNTIrGLfaGPgyRnjX7u+eiBR5gZyjepVXGxoaA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607065596; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5Bx+hZFXvXsSDfokeGSzavBjzFSuxhFRgir3gpHtYEY=; b=VlEg2Bg6xDOvoZLG2sRFYRTuZcXqv1t8vVbcdl0O7yDtWCl82GHmfdAGoRmVeUDyFBURDY/yowrex7F8qf4dKT9VLMoAmBtntB+EJWMcqZBpMg7pAnngx7CxFlm9aGvcTYgwsCPL0FZo4nHhvJjqWTthMuYU/BMOOCfKwDFgpw0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1607065596862862.0884446338112; Thu, 3 Dec 2020 23:06:36 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-170-nbrncXgxOcS10G9LgNWaZg-1; Fri, 04 Dec 2020 02:06:33 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81E4FAFA80; Fri, 4 Dec 2020 07:06:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FA9B5D9D7; Fri, 4 Dec 2020 07:06:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 29C361809CA1; Fri, 4 Dec 2020 07:06:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0B472xPq003371 for ; Fri, 4 Dec 2020 02:03:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id C168CF3D13; Fri, 4 Dec 2020 07:02:59 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBD77F3D17 for ; Fri, 4 Dec 2020 07:02:57 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 35CD6103B802 for ; Fri, 4 Dec 2020 07:02:57 +0000 (UTC) Received: from m97136.mail.qiye.163.com (m97136.mail.qiye.163.com [220.181.97.136]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-97-ZDpWLDF5MgmTrPHtxMD2wQ-1; Fri, 04 Dec 2020 02:02:53 -0500 Received: from localhost.localdomain (unknown [113.128.197.238]) by smtp2 (Coremail) with SMTP id iOCowABHlOoY38lfucJqCg--.4173S6; Fri, 04 Dec 2020 15:02:49 +0800 (CST) X-MC-Unique: nbrncXgxOcS10G9LgNWaZg-1 X-MC-Unique: ZDpWLDF5MgmTrPHtxMD2wQ-1 From: Shi Lei To: libvir-list@redhat.com Subject: [PATCH 4/5] netdev: Enable virNetDevGenerateName to support veth Date: Fri, 4 Dec 2020 15:01:34 +0800 Message-Id: <20201204070135.33840-5-shi_lei@massclouds.com> In-Reply-To: <20201204070135.33840-1-shi_lei@massclouds.com> References: <20201204070135.33840-1-shi_lei@massclouds.com> MIME-Version: 1.0 X-CM-TRANSID: iOCowABHlOoY38lfucJqCg--.4173S6 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjfUJsYwUUUUU X-Originating-IP: [113.128.197.238] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbiWRbwT1f4qCaKuwAAsg X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Shi Lei X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Shi Lei --- src/util/virnetdev.c | 2 ++ src/util/virnetdev.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 5ff8e35f..ff1b1fa0 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -102,6 +102,7 @@ VIR_ENUM_IMPL(virNetDevGenNameType, "tap", "macvtap", "macvlan", + "veth", ); =20 static virNetDevGenName @@ -110,6 +111,7 @@ virNetDevGenNames[VIR_NET_DEV_GEN_NAME_LAST] =3D { {-1, VIR_NET_GENERATED_TAP_PREFIX, VIR_MUTEX_INITIALIZER}, {-1, VIR_NET_GENERATED_MACVTAP_PREFIX, VIR_MUTEX_INITIALIZER}, {-1, VIR_NET_GENERATED_MACVLAN_PREFIX, VIR_MUTEX_INITIALIZER}, + {-1, VIR_NET_GENERATED_VETH_PREFIX, VIR_MUTEX_INITIALIZER}, }; =20 typedef enum { diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index 19f37b61..097d0f8e 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -40,6 +40,8 @@ typedef void virIfreq; */ #define VIR_NET_GENERATED_TAP_PREFIX "vnet" =20 +#define VIR_NET_GENERATED_VETH_PREFIX "veth" + /* libvirt will start macvtap/macvlan interface names with one of * these prefixes when it auto-generates the name */ @@ -156,6 +158,7 @@ typedef enum { VIR_NET_DEV_GEN_NAME_TAP, VIR_NET_DEV_GEN_NAME_MACVTAP, VIR_NET_DEV_GEN_NAME_MACVLAN, + VIR_NET_DEV_GEN_NAME_VETH, VIR_NET_DEV_GEN_NAME_LAST } virNetDevGenNameType; =20 --=20 2.25.1