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 08CC241C49; Thu, 9 Feb 2023 08:19:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C05B40DDA; Thu, 9 Feb 2023 08:19:28 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 218824067B for ; Thu, 9 Feb 2023 08:19:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675927166; x=1707463166; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lAGs3+DBDllMCWujBqMAO/7AfJ4ZEOC1JTxOAGFFnAc=; b=TrT1FWC2piD9YkU/g0ewMXDfQJLn4sfoTw7gzQZeUvVZrPLxiSoyBIwY E9pq80QTH/fPLQhPCTeUwci1OXigIpfWfP7msJnkHQ5nSWVldZR2F1QY/ Qghw4oX4jySzqvW2Vz2RhEOrZ8V6hzWDhX1RQJ4f/4kWAbNO534Y8LKHK LvCA+JZ33OFFtM9VIU1Lru4OM02XQNXVz2EsutRIsRGR5R4mbcQ1+7CKp gisZHBFDKO1Pcu0xXrlos5WQVBwV6LvHm5DO09vEFqXsDYeH1K43X99WR tqHPEtOf/smjfkPPChXVpD5jv3xNbdTfgfqD+CvSDbDPr4GMh41wJRJez w==; X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="416259462" X-IronPort-AV: E=Sophos;i="5.97,281,1669104000"; d="scan'208";a="416259462" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 23:19:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="669489638" X-IronPort-AV: E=Sophos;i="5.97,281,1669104000"; d="scan'208";a="669489638" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga007.fm.intel.com with ESMTP; 08 Feb 2023 23:19:19 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 8 Feb 2023 23:19:07 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 8 Feb 2023 23:19:06 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 8 Feb 2023 23:19:06 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.102) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 8 Feb 2023 23:19:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fH5vshXit2VgXMufTqcP2uEEDsxeylDEzYbVDk0mbbeJVcksPBuAKK8v0oRH5G+AFVK9zD+pAXM7erp4g0znTYjJhaJa5NHaC4CpKLPObXdgTxOZNsngoTeJvi2if9aSsaonAraCfCtMMa8K7kyym0f1GEvwZueWbRgGgt64JEmnzhN7lJYIafBfIvUimEJP9f9o0w2MOgsme+fYmy/7NtnPYHzxR/v3r/3VnBxFURkQ+2xyK4/Ttw4rmx+jaWoMgCQl7mwkDc6URQoS1mxv/BOVHt3SqeVwcz5yBHV5bW7pupDWLGQaNFyzl2sID43MEIJH2zNDhE+Iiw5AeU4PzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4p9N9zNkSsFn4G4yAmN+d6EHZ6ZVYhrw8gOQh5FBJg4=; b=TGVH6sA7/A+pgtbpii1AHQ6zfAsskBb2s2G/tdHjonHqJeO2kkgVUksnH3t5v+Y9ZAvwEOu9wa9+kNmNl3wjfKjCJhroZ1m0Ia/fCgs9g823v3rWvccrnquuNDf8FLwgbLsJ8DYasb/YdVTHawK0pPut8fcCu0xkNG2bGAeSUoPJv23KXmIRWagofp5xA8hNl4QJ20cGqC2PujuX6zauHZioU+PANJ9dR+1KDEh6Jt8QoZm3THb3UTZO/snitNcckQbsVZ/wpuFsqJI9mwjv2NnnStPM2otJ03irGnhRmIdDCWVjE+kVfHmx2V+mhFSXrxcoZpgWDjd1jg3ohbD2Dg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN6PR11MB3504.namprd11.prod.outlook.com (2603:10b6:805:d0::17) by CH0PR11MB5218.namprd11.prod.outlook.com (2603:10b6:610:e1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Thu, 9 Feb 2023 07:19:03 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::c8f8:a3e1:5b23:a9c3]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::c8f8:a3e1:5b23:a9c3%5]) with mapi id 15.20.6086.017; Thu, 9 Feb 2023 07:19:03 +0000 From: "Xia, Chenbo" To: Stephen Hemminger , "dev@dpdk.org" CC: Maxime Coquelin Subject: RE: [PATCH 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Thread-Topic: [PATCH 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Thread-Index: AQHZO3ijn/5WjADNY0Ov1chj5IwpVq7GNoOw Date: Thu, 9 Feb 2023 07:19:03 +0000 Message-ID: References: <20230208044825.1682620-1-stephen@networkplumber.org> <20230208044825.1682620-5-stephen@networkplumber.org> In-Reply-To: <20230208044825.1682620-5-stephen@networkplumber.org> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR11MB3504:EE_|CH0PR11MB5218:EE_ x-ms-office365-filtering-correlation-id: ff388c57-4ef4-43f1-0e08-08db0a6dec35 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: umvijK6NX7189P8zPRR8tLFBcQEAfxQuKiw49gbq/WgBmAUswYU7i2ahWtNkOSwqwh/Afwv0Yo3uR7Vo0YWJTjvO/XlfAlWuO6WU5vSshEoLSI9+bt2EyHRLrRuKgQw2GNYCPyZpWgBtGWUUX3rB1WdoEKjpTsC7TlS8PLMCMxVDX08F4oHeb1j0A/bg/2iX4pLd9vNG8gZ3kyQgKvLkyOtxmccRT6V/CN/7rRP4etpqS9eFveUOQWtKZKb3EePPWaNeeZNNCYU1X8iH2vd92Lelkerk+WhU3p3cLp/5lJ9+IK4PfdVWdFcA8EMYxVSMtCamrFmZOJ19fydBaH8EhFIBnUYFguwloSUH3PegI2DAxJoSgiGBpYSnQC//60GSl1SAxz0MAdlLSBG8eeyoxBy3+ZdkzyoSFBjJMXbGjvmnQxwuHX6JvvEl4pKCeDWWZcfqG7TF1rAYJM8cXBgkHGIOZLt/yJMea7Uk1uAtc0oSk56vdnGWM03z8t5bos/HP4AxTDtGejvOeo1cJsZ1ZRyD05E7bFbcBQs2kj3fA0t1QTogMHEzUm4mhrDIo3G7CGGFu3YpTSOnVZCq5NRT7VHtpssLQX+Cdanyg3tGBa1I6bx7B5sFbBhj/m0+zqFqT1oqT5vpMVCL9PzYH4lxvc/XK9sZJ4OvLP6I+3ptBqElApzSJU9RvZvlAheDMINbAqUDtsPStP6NBqXXmx2Qpw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3504.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(376002)(346002)(136003)(366004)(396003)(39860400002)(451199018)(53546011)(83380400001)(5660300002)(2906002)(9686003)(186003)(66446008)(7696005)(71200400001)(6506007)(33656002)(52536014)(8936002)(26005)(41300700001)(64756008)(66556008)(316002)(478600001)(86362001)(38070700005)(38100700002)(76116006)(55016003)(82960400001)(66476007)(110136005)(4326008)(66946007)(8676002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fS8COp1UczRxa4s19svG09uIYQbxcSby9qs6HweVW8XzS5Y4ZJDBdK281PgC?= =?us-ascii?Q?sFMVstJ02lDdq0ink0YJDQtllx+/7Drwos+1ddbxU15ySSApY5oeveIaVToI?= =?us-ascii?Q?R9RymzQiE0vJduSAeI5u+M0qfy6gC89V8N5iZsd8vXkZR2lEfQCvBzrp8wgt?= =?us-ascii?Q?NZyenytCvg5t5w1NEkFpFOYMxPHxdPiYWmWXq6DFJ9OiqJypfzTLDetywdf/?= =?us-ascii?Q?r7OCYzNBi3TyxjN5yZOWt+2+3raq664DY2VSAOtIGm/8Yp79OyZFpFZHJPFu?= =?us-ascii?Q?Rt9WKcniM5IGHN7T4W9FmbgQgFspIKu0xOO7a/emqT6UaODmTwUFz3ivoH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GZ0JdQCh4B82RQQ1ot1DeDuPT6IkG3xQwFQmA?= =?us-ascii?Q?butf7xpZmjzEtf3gA21U1Pi2bNhaZlL1d+xYeCb1tLULranzKABwv51NH38t?= =?us-ascii?Q?Ef9uzD2JZvJiCyd0m0MgOyQe3I6wIn0G0WfTmeA/dC0qOogt1p/b9ape8/4Z?= =?us-ascii?Q?Jn2Bt3vKvZ6fP8t8xhKcUeRCyUMO2ioQ+j6arn8Z6opePG286TAxXnTQ2YUb?= =?us-ascii?Q?/onFtUeG5DqRZ9ZuPLqFbiCMPzudMMLzAcCj+7jhPL04y/o8V4gl0M/neMVz?= =?us-ascii?Q?3/IqDX50U8Y3ASaN+SQIY8AVsiXL/3hCDS2Kq9LFg6MgnmWXWroncLieKtlC?= =?us-ascii?Q?IpsAADQ1egnIemvQSDx66UHAr1RQEKrDmeJVcFQa?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB3504.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff388c57-4ef4-43f1-0e08-08db0a6dec35 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Feb 2023 07:19:03.3357 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Do4kgPNl+UbnGMyjQz9ejH1ueOABTOi46JhFUn50uGjHuXytr4713YvxYVFtzYsF4F+kPqqe3GSo/Q8JKie3Dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5218 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Stephen Hemminger > Sent: Wednesday, February 8, 2023 12:48 PM > To: dev@dpdk.org > Cc: Stephen Hemminger ; Maxime Coquelin > ; Xia, Chenbo > Subject: [PATCH 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 >=20 > Fix instances of USER1 logtype in fdset and crypto > sections. >=20 > Signed-off-by: Stephen Hemminger > --- > lib/vhost/fd_man.c | 16 +++++++++------- > lib/vhost/vhost_crypto.c | 24 ++++++++++-------------- > 2 files changed, 19 insertions(+), 21 deletions(-) >=20 > diff --git a/lib/vhost/fd_man.c b/lib/vhost/fd_man.c > index 1876fada3354..172f7dc03ab2 100644 > --- a/lib/vhost/fd_man.c > +++ b/lib/vhost/fd_man.c > @@ -10,8 +10,10 @@ >=20 > #include "fd_man.h" >=20 > - > -#define RTE_LOGTYPE_VHOST_FDMAN RTE_LOGTYPE_USER1 > +RTE_LOG_REGISTER_SUFFIX(vhost_fdset_logtype, fdset, INFO); > +#define FDSET_LOG(level, fmt, args...) \ > + rte_log(RTE_LOG_ ## level, vhost_fdset_logtype, \ > + "%s(): " fmt "\n", __func__, ## args) >=20 > #define FDPOLLERR (POLLERR | POLLHUP | POLLNVAL) >=20 > @@ -334,8 +336,8 @@ fdset_pipe_init(struct fdset *fdset) > int ret; >=20 > if (pipe(fdset->u.pipefd) < 0) { > - RTE_LOG(ERR, VHOST_FDMAN, > - "failed to create pipe for vhost fdset\n"); > + FDSET_LOG(ERR, > + "failed to create pipe for vhost fdset"); > return -1; > } >=20 > @@ -343,9 +345,9 @@ fdset_pipe_init(struct fdset *fdset) > fdset_pipe_read_cb, NULL, NULL); >=20 > if (ret < 0) { > - RTE_LOG(ERR, VHOST_FDMAN, > - "failed to add pipe readfd %d into vhost server fdset\n", > - fdset->u.readfd); > + FDSET_LOG(ERR, > + "failed to add pipe readfd %d into vhost server fdset", > + fdset->u.readfd); >=20 > fdset_pipe_uninit(fdset); > return -1; > diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c > index b448b6685dd2..923c7c0e10d2 100644 > --- a/lib/vhost/vhost_crypto.c > +++ b/lib/vhost/vhost_crypto.c > @@ -16,22 +16,18 @@ > #define IV_OFFSET (sizeof(struct rte_crypto_op) + \ > sizeof(struct rte_crypto_sym_op)) >=20 > +RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO); > + > +#define VC_LOG(level, fmt, args...) \ > + rte_log(RTE_LOG_ ## level, vhost_crypto_logtype, \ > + "%s():%u: " fmt "\n", __func__, ## args) > + > +#define VC_LOG_ERR(fmt, args...) VC_LOG(ERR, fmt, ## args) > +#define VC_LOG_INFO(fmt, args...) VC_LOG(INFO, fmt, ## args) > + > #ifdef RTE_LIBRTE_VHOST_DEBUG > -#define VC_LOG_ERR(fmt, args...) \ > - RTE_LOG(ERR, USER1, "[%s] %s() line %u: " fmt "\n", \ > - "Vhost-Crypto", __func__, __LINE__, ## args) > -#define VC_LOG_INFO(fmt, args...) \ > - RTE_LOG(INFO, USER1, "[%s] %s() line %u: " fmt "\n", \ > - "Vhost-Crypto", __func__, __LINE__, ## args) > - > -#define VC_LOG_DBG(fmt, args...) \ > - RTE_LOG(DEBUG, USER1, "[%s] %s() line %u: " fmt "\n", \ > - "Vhost-Crypto", __func__, __LINE__, ## args) > +#define VC_LOG_DBG(fmt, args...) VC_LOG(DEBUG, fmt, ## args) > #else > -#define VC_LOG_ERR(fmt, args...) \ > - RTE_LOG(ERR, USER1, "[VHOST-Crypto]: " fmt "\n", ## args) > -#define VC_LOG_INFO(fmt, args...) \ > - RTE_LOG(INFO, USER1, "[VHOST-Crypto]: " fmt "\n", ## args) > #define VC_LOG_DBG(fmt, args...) > #endif >=20 > -- > 2.39.1 Acked-by: Chenbo Xia =20