From nobody Thu May 16 00:41:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1647510532945556.2720047357467; Thu, 17 Mar 2022 02:48:52 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-110-1_1mvrbtNJKVuqME9YnMCQ-1; Thu, 17 Mar 2022 05:48:48 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 255D8185A794; Thu, 17 Mar 2022 09:48:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0F70D41136E2; Thu, 17 Mar 2022 09:48:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DF5351940365; Thu, 17 Mar 2022 09:48:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E0A0E1940365 for ; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D4395401E79; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CFE02401E87 for ; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B8BE4833966 for ; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-UD7Jc0NTNmOAyaMiTlCopw-1; Thu, 17 Mar 2022 05:48:41 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22H7rQhQ007523; Thu, 17 Mar 2022 09:48:40 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ev10cj228-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 09:48:40 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22H9maWE013288; Thu, 17 Mar 2022 09:48:38 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma06fra.de.ibm.com with ESMTP id 3erjshscfd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 09:48:38 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22H9mZEO55443942 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Mar 2022 09:48:35 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8AF675204E; Thu, 17 Mar 2022 09:48:35 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.69.203]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 65B8752051; Thu, 17 Mar 2022 09:48:35 +0000 (GMT) X-MC-Unique: 1_1mvrbtNJKVuqME9YnMCQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: UD7Jc0NTNmOAyaMiTlCopw-1 From: Boris Fiuczynski To: libvir-list@redhat.com Subject: [PATCH v2 1/4] nodedev: fix typo in mdevctl update warning Date: Thu, 17 Mar 2022 10:48:27 +0100 Message-Id: <20220317094830.12575-2-fiuczy@linux.ibm.com> In-Reply-To: <20220317094830.12575-1-fiuczy@linux.ibm.com> References: <20220317094830.12575-1-fiuczy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: JQ6ASD4XLAMjQLsjOgdDjS-ISaiE4cYJ X-Proofpoint-GUID: JQ6ASD4XLAMjQLsjOgdDjS-ISaiE4cYJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-17_03,2022-03-15_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=877 suspectscore=0 phishscore=0 adultscore=0 spamscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203170056 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.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mprivozn@redhat.com, jjongsma@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 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 X-ZM-MESSAGEID: 1647511437305100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Boris Fiuczynski Reviewed-by: Jonathon Jongsma --- src/node_device/node_device_udev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index b0a5e6302c..17b6bb9299 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -2035,7 +2035,7 @@ mdevctlHandlerThread(void *opaque G_GNUC_UNUSED) VIR_LOCK_GUARD lock =3D virLockGuardLock(&priv->mdevctlLock); =20 if (nodeDeviceUpdateMediatedDevices() < 0) - VIR_WARN("mdevctl failed to updated mediated devices"); + VIR_WARN("mdevctl failed to update mediated devices"); } =20 =20 --=20 2.33.1 From nobody Thu May 16 00:41:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 164751053390998.79226210873787; Thu, 17 Mar 2022 02:48:53 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-505-sapeKk-OO4yNz51XskHRwg-1; Thu, 17 Mar 2022 05:48:49 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7FB133C01DB0; Thu, 17 Mar 2022 09:48:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 676B7401E87; Thu, 17 Mar 2022 09:48:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0BB8F194036A; Thu, 17 Mar 2022 09:48:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 08264193F511 for ; Thu, 17 Mar 2022 09:48:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DDCFD401E85; Thu, 17 Mar 2022 09:48:45 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D97AC401E7D for ; Thu, 17 Mar 2022 09:48:45 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C1F72899EC5 for ; Thu, 17 Mar 2022 09:48:45 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-100-R0h1hOhoNcC6igppdeM0wA-1; Thu, 17 Mar 2022 05:48:41 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22H9PThj029739; Thu, 17 Mar 2022 09:48:40 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 3euym03mf8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 09:48:40 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22H9h8ZZ013543; Thu, 17 Mar 2022 09:48:38 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03ams.nl.ibm.com with ESMTP id 3et95wx9fp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 09:48:37 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22H9mZ0U55443944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Mar 2022 09:48:35 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B97C55204E; Thu, 17 Mar 2022 09:48:35 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.69.203]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 8E6DA52057; Thu, 17 Mar 2022 09:48:35 +0000 (GMT) X-MC-Unique: sapeKk-OO4yNz51XskHRwg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: R0h1hOhoNcC6igppdeM0wA-1 From: Boris Fiuczynski To: libvir-list@redhat.com Subject: [PATCH v2 2/4] virnodedeviceobj: export virNodeDeviceObjHasCap Date: Thu, 17 Mar 2022 10:48:28 +0100 Message-Id: <20220317094830.12575-3-fiuczy@linux.ibm.com> In-Reply-To: <20220317094830.12575-1-fiuczy@linux.ibm.com> References: <20220317094830.12575-1-fiuczy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: NvkEDkcpZ7f7R4QPuOu8yeFfju_wmuTs X-Proofpoint-ORIG-GUID: NvkEDkcpZ7f7R4QPuOu8yeFfju_wmuTs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-17_03,2022-03-15_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 malwarescore=0 clxscore=1015 suspectscore=0 spamscore=0 mlxlogscore=994 lowpriorityscore=0 impostorscore=0 priorityscore=1501 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203170056 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.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mprivozn@redhat.com, jjongsma@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 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 X-ZM-MESSAGEID: 1647511437313100002 Content-Type: text/plain; charset="utf-8" The function will be reused in the nodedev drivers udev handling. Signed-off-by: Boris Fiuczynski Reviewed-by: Michal Privoznik Reviewed-by: Jonathon Jongsma --- src/conf/virnodedeviceobj.c | 3 +-- src/conf/virnodedeviceobj.h | 4 ++++ src/libvirt_private.syms | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c index fd23ea5fc7..49947d0a58 100644 --- a/src/conf/virnodedeviceobj.c +++ b/src/conf/virnodedeviceobj.c @@ -58,7 +58,6 @@ static virClass *virNodeDeviceObjClass; static virClass *virNodeDeviceObjListClass; static void virNodeDeviceObjDispose(void *opaque); static void virNodeDeviceObjListDispose(void *opaque); -static bool virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, int type); =20 static int virNodeDeviceObjOnceInit(void) @@ -684,7 +683,7 @@ virNodeDeviceObjListGetParentHost(virNodeDeviceObjList = *devs, } =20 =20 -static bool +bool virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, int type) { diff --git a/src/conf/virnodedeviceobj.h b/src/conf/virnodedeviceobj.h index 5f6d22e1f6..ba2e424998 100644 --- a/src/conf/virnodedeviceobj.h +++ b/src/conf/virnodedeviceobj.h @@ -86,6 +86,10 @@ int virNodeDeviceObjListGetParentHost(virNodeDeviceObjList *devs, virNodeDeviceDef *def); =20 +bool +virNodeDeviceObjHasCap(const virNodeDeviceObj *obj, + int type); + virNodeDeviceObjList * virNodeDeviceObjListNew(void); =20 diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 01503083ef..3a8e16525b 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1298,6 +1298,7 @@ virNetworkPortDefSaveStatus; # conf/virnodedeviceobj.h virNodeDeviceObjEndAPI; virNodeDeviceObjGetDef; +virNodeDeviceObjHasCap; virNodeDeviceObjIsActive; virNodeDeviceObjIsAutostart; virNodeDeviceObjIsPersistent; --=20 2.33.1 From nobody Thu May 16 00:41:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1647510533762695.2604647384494; Thu, 17 Mar 2022 02:48:53 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-224-5XTIoAXeNHuL0OMBvv7Lkg-1; Thu, 17 Mar 2022 05:48:49 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F2605185A79C; Thu, 17 Mar 2022 09:48:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD6631454535; Thu, 17 Mar 2022 09:48:46 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AC7151940365; Thu, 17 Mar 2022 09:48:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D02BC194035E for ; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B34AC401E85; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF607401E8C for ; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9724538008B0 for ; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-116-oksyaSrIONiBT7MWiI4Lpw-1; Thu, 17 Mar 2022 05:48:42 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22H8roGo004916; Thu, 17 Mar 2022 09:48:41 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ev1vprxyj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 09:48:40 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22H9mcbC019658; Thu, 17 Mar 2022 09:48:38 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma02fra.de.ibm.com with ESMTP id 3erk58sbmb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 09:48:38 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22H9mZlr55509320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Mar 2022 09:48:36 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DFCF152051; Thu, 17 Mar 2022 09:48:35 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.69.203]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id BCA4D5204F; Thu, 17 Mar 2022 09:48:35 +0000 (GMT) X-MC-Unique: 5XTIoAXeNHuL0OMBvv7Lkg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: oksyaSrIONiBT7MWiI4Lpw-1 From: Boris Fiuczynski To: libvir-list@redhat.com Subject: [PATCH v2 3/4] nodedev: update mdevs on parent change Date: Thu, 17 Mar 2022 10:48:29 +0100 Message-Id: <20220317094830.12575-4-fiuczy@linux.ibm.com> In-Reply-To: <20220317094830.12575-1-fiuczy@linux.ibm.com> References: <20220317094830.12575-1-fiuczy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 4phHENqlzd8OosSOO5RDxTLTSzSbYMdm X-Proofpoint-ORIG-GUID: 4phHENqlzd8OosSOO5RDxTLTSzSbYMdm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-17_03,2022-03-15_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 spamscore=0 clxscore=1015 impostorscore=0 adultscore=0 priorityscore=1501 bulkscore=0 malwarescore=0 mlxlogscore=834 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203170056 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.85 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mprivozn@redhat.com, jjongsma@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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 X-ZM-MESSAGEID: 1647510534892100002 Content-Type: text/plain; charset="utf-8" The parent of the mdev definition can change due to the existance of the parent device. The parents existance can e.g. depend on the device driver load state. Signed-off-by: Boris Fiuczynski Reviewed-by: Michal Privoznik Reviewed-by: Jonathon Jongsma --- src/node_device/node_device_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index 7b2fb3d953..84dde743df 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -1670,7 +1670,9 @@ removeMissingPersistentMdev(virNodeDeviceObj *obj, =20 for (i =3D 0; i < data->ndefs; i++) { /* OK, this mdev is still defined by mdevctl */ - if (STREQ(data->defs[i]->name, def->name)) + /* AND the parent object has not changed */ + if (STREQ(data->defs[i]->name, def->name) && + STREQ(data->defs[i]->parent, def->parent)) return false; } =20 --=20 2.33.1 From nobody Thu May 16 00:41:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1647510538060740.125726989329; Thu, 17 Mar 2022 02:48:58 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-618-dsu-AAxlO3OlOT29hqsaGw-1; Thu, 17 Mar 2022 05:48:53 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C6ECF185A7A4; Thu, 17 Mar 2022 09:48:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0DFDC28100; Thu, 17 Mar 2022 09:48:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5CC9E1940365; Thu, 17 Mar 2022 09:48:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 49154194035E for ; Thu, 17 Mar 2022 09:48:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2BB852D47A; Thu, 17 Mar 2022 09:48:50 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 278442D479 for ; Thu, 17 Mar 2022 09:48:44 +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-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD1461C05EDA for ; Thu, 17 Mar 2022 09:48:44 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-pmp7s7_NM0yl7PYPxdJxSQ-1; Thu, 17 Mar 2022 05:48:41 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22H7No9i015172; Thu, 17 Mar 2022 09:48:40 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ev0jh2kpd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 09:48:40 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22H9lo4T019975; Thu, 17 Mar 2022 09:48:38 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04fra.de.ibm.com with ESMTP id 3erk58sb33-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Mar 2022 09:48:38 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22H9mahQ51511570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Mar 2022 09:48:36 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 12C7D5204E; Thu, 17 Mar 2022 09:48:36 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.69.203]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id E2E9252054; Thu, 17 Mar 2022 09:48:35 +0000 (GMT) X-MC-Unique: dsu-AAxlO3OlOT29hqsaGw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: pmp7s7_NM0yl7PYPxdJxSQ-1 From: Boris Fiuczynski To: libvir-list@redhat.com Subject: [PATCH v2 4/4] nodedev: trigger mdev device definition update on udev add and remove Date: Thu, 17 Mar 2022 10:48:30 +0100 Message-Id: <20220317094830.12575-5-fiuczy@linux.ibm.com> In-Reply-To: <20220317094830.12575-1-fiuczy@linux.ibm.com> References: <20220317094830.12575-1-fiuczy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: xKi9J-DLqdXfkfWgPBjvT46jFQmW8gy2 X-Proofpoint-ORIG-GUID: xKi9J-DLqdXfkfWgPBjvT46jFQmW8gy2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-17_03,2022-03-15_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 adultscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203170056 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-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mprivozn@redhat.com, jjongsma@redhat.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 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 X-ZM-MESSAGEID: 1647510538889100003 Content-Type: text/plain; charset="utf-8" When nodedev objects are added and removed if possible check if mdev-types = is supported by the object and trigger a mdev device definition update to corr= ect the associated parent nodedevs. Signed-off-by: Boris Fiuczynski Reviewed-by: Michal Privoznik Reviewed-by: Jonathon Jongsma --- src/node_device/node_device_udev.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 17b6bb9299..b3e8103dae 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1440,6 +1440,10 @@ udevRemoveOneDeviceSysPath(const char *path) } virNodeDeviceObjEndAPI(&obj); =20 + /* cannot check for mdev_types since they have already been removed */ + if (nodeDeviceUpdateMediatedDevices() < 0) + VIR_WARN("mdevctl failed to update mediated devices"); + virObjectEventStateQueue(driver->nodeDeviceEventState, event); return 0; } @@ -1507,6 +1511,7 @@ udevAddOneDevice(struct udev_device *device) bool persistent =3D false; bool autostart =3D false; bool is_mdev; + bool has_mdev_types =3D false; =20 def =3D g_new0(virNodeDeviceDef, 1); =20 @@ -1562,8 +1567,12 @@ udevAddOneDevice(struct udev_device *device) event =3D virNodeDeviceEventUpdateNew(objdef->name); =20 virNodeDeviceObjSetActive(obj, true); + has_mdev_types =3D virNodeDeviceObjHasCap(obj, VIR_NODE_DEV_CAP_MDEV_T= YPES); virNodeDeviceObjEndAPI(&obj); =20 + if (has_mdev_types && nodeDeviceUpdateMediatedDevices() < 0) + VIR_WARN("mdevctl failed to update mediated devices"); + ret =3D 0; =20 cleanup: --=20 2.33.1