From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C0724A0350; Sun, 28 Jun 2020 05:07:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1BE41C026; Sun, 28 Jun 2020 05:07:02 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 448971C012 for ; Sun, 28 Jun 2020 05:07:01 +0200 (CEST) IronPort-SDR: fHx0sjWbJRSgJhrPd8TVtB1TBZpoRPVjkOFjKhdKElUfFe4AiRS3wRXAepAVg3LwcOB8U1D4DT I1XZXs9Ftjuw== X-IronPort-AV: E=McAfee;i="6000,8403,9665"; a="133202561" X-IronPort-AV: E=Sophos;i="5.75,290,1589266800"; d="scan'208";a="133202561" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2020 20:06:59 -0700 IronPort-SDR: LFacKuaXhKXo90VXQovFoI88g2Sp5fvSHYZRaTqi70jUCbpM4fFrRIr8JX3c8MSLo7okoGlTkV OGBHeLWQUGpA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,290,1589266800"; d="scan'208";a="355134481" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by orsmga001.jf.intel.com with ESMTP; 27 Jun 2020 20:06:57 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 27 Jun 2020 20:06:57 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sat, 27 Jun 2020 20:06:57 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Sat, 27 Jun 2020 20:06:57 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.58) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 27 Jun 2020 20:06:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EPhPNtjwKr9Bi1v5D5KAI1G3+7zA2xS0/EtVa4XZ9jlRtMHVH4Ri/PPrggPAoSBvetlJ4fhfozhsXG9eCp78GOgg+niqrs9a9QPBUwvQ7XYIGs9UHAwEUKZ7RyWZ75PxyzQUzTA9eWPJKyl0Zhp3fbp8AgnarrG7MRap9PKwLPoLTDVxSYw1sjSoygSGQ8oddsC0YDDk1ukrcC7obeSGFZ+MG/kfSPKnzVicIyxf3wccTwI0x7/qSY54ljm7shJ9YKUGH7hXU/0XMRHINTFAK0Z2v8AAKRh9N+IU52ABGJy3YllZAtdfwCK/AVvaexjPV54SgUMIPFTBFfi6iGMyfw== 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-SenderADCheck; bh=BfxUNe+dUkb1mG45LBDiJXp1DffbcdO9FzI3rAhKqIQ=; b=QHh71xXx7va8c/jfnG+p3LiSFcT+3UMkT2sjixGTHiZGyotxlGFEJzZInBVR6kGH6FYG9RiJyOaCyGn83d2nCkgGhW1MaaF5ArtKLE8B9OPcGHbzZ52sBv97TeREaGZ1QACtCTLR/l8idc1mMDhoZe55hbUetQZFT5GwGgJ4i0sA1PsEtkf74LcRgHBV1t07QP3qtGvLXR4dwdJZiwRZrQPXVM4z+FPy8bzKNWrsDRJeqVUaPdqLO1bxmhmB1YuTXEVe3IDgAuQM2u1d6BS7Nv4isGLhWJZusC0K6cAPOHevcHsABATNfO7wy2ZOpBpU3mEcUL4VJ2zqQuOOg+JZgA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BfxUNe+dUkb1mG45LBDiJXp1DffbcdO9FzI3rAhKqIQ=; b=Rn/oDCuMGwOfVocKSVVqfBL7llchFKaVDBPa4EjoN0jKklD9GxTUmNmQNwkIhh7/zAw0bOXDqjZpFPxNiiOaTqKUeonHccjhNNmZCuepj9AgS2Q4vL9xQZYzZc0DnmXlsM+ZgbbQS2dEMObQ5tgKzfLcEevOOXveDYLfaq7CiyE= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB3999.namprd11.prod.outlook.com (2603:10b6:208:154::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Sun, 28 Jun 2020 03:06:55 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::7cde:8326:5010:c47e]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::7cde:8326:5010:c47e%7]) with mapi id 15.20.3131.026; Sun, 28 Jun 2020 03:06:55 +0000 From: "Xia, Chenbo" To: Matan Azrad , Maxime Coquelin CC: "dev@dpdk.org" , "Wang, Xiao W" Thread-Topic: [dpdk-dev] [PATCH v2 1/5] vhost: skip access lock when vDPA is configured Thread-Index: AQHWSvX5VS13FsQ9KUmH/eb1Zq1XqajtW+ew Date: Sun, 28 Jun 2020 03:06:55 +0000 Message-ID: References: <1592497686-433697-1-git-send-email-matan@mellanox.com> <1593092298-52257-1-git-send-email-matan@mellanox.com> <1593092298-52257-2-git-send-email-matan@mellanox.com> In-Reply-To: <1593092298-52257-2-git-send-email-matan@mellanox.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fc196cb1-7466-4763-d1a3-08d81b10504b x-ms-traffictypediagnostic: MN2PR11MB3999: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5236; x-forefront-prvs: 0448A97BF2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Tqw/dtxtCShjnJMLn7ccDPMqUrHjo8CZ2k+8ttrA28HfFJVef/hlORWeq7La9++0SNgmV/glIdeZVyL+gURlAL+m0EFSJVWLOkKImVTnTMF2rHcVyG86syqYa5naacMjhSTSTqXlCYkt5bgtxvdzzia8sqMJIBdRdwib738pW5mHYy/AzpU5X/1r0iDqfS47iewMpAiwNPVJ3rzSs8kqUk8rOxKkpXyxJCTgpD/XRUdHNwqiU2qHCy3o9o52L0GcVH2G7FYvcA4xE8/fndpEgC6LgWn7VsdYd1a0N8tdPKhaOLW4TDxu90Q8Xf6ZRVQDRXQvKyNYRthbUX7+vAav4A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(376002)(39860400002)(346002)(396003)(366004)(136003)(4326008)(478600001)(83380400001)(9686003)(7696005)(316002)(55016002)(71200400001)(86362001)(52536014)(8936002)(64756008)(107886003)(66446008)(186003)(110136005)(26005)(76116006)(54906003)(66946007)(2906002)(66476007)(5660300002)(53546011)(66556008)(33656002)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: czrxwe/Ibd2hyVP11A8ejbka4FTmplfYxjrXJalGsofuUQrrqnnKw9BrvohAnq3fbdkOp4MD1xkPzShOZqaoIa7smJ8ruooGTxro05tfzJ6EqSuwaPQ5uWPrUuoZxr61JONyth4pO7+Nn2UM0/I4Uyt4QS5cyR/QdHIIT8ziBjgN199xfiD2tgS2M5Zl1aLD9fqo7ttegIMCcpi9sl93RK6tXXSR0eUyosmi+GsExUzbXbm0ovlCrVg53zo0AxgH9BQsB5YFxQ7vczGh7nzjWs4nBRtE2HybwejDLjGt4OpkW3zegZsT6kkr+fDr7AxSvYGV+IypnflOXn3YF7QBevkGr2tNAdFUeGg3PP3lZPS5ghEUW2jQGf4pat+t2jZleyWKEefk89wHVRwdznbxoT5sHnrDD9yF3XSlPdBHHpnj/AlqbzF32hIq4DHiwB6U7kQ00oAWEL1DGbEkX+0ejEPVsy29hMky/omtRTOaachaSn/NJLs889vh5zkbp7Gt 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: MN2PR11MB4063.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc196cb1-7466-4763-d1a3-08d81b10504b X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jun 2020 03:06:55.2418 (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: LrOHjOPAvY039FvAAXBFJfiaFYl3Vzgq7aQ6xzz3LHifnY6fgj3bhlg6B0+8W0rCfBckxBT0Tp7HQQdN2ICaLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3999 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2 1/5] vhost: skip access lock when vDPA is configured X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: dev On Behalf Of Matan Azrad > Sent: Thursday, June 25, 2020 9:38 PM > To: Maxime Coquelin > Cc: dev@dpdk.org; Wang, Xiao W > Subject: [dpdk-dev] [PATCH v2 1/5] vhost: skip access lock when vDPA is > configured >=20 > No need to take access lock in the vhost-user message handler when vDPA > driver controls all the data-path of the vhost device. >=20 > It allows the vDPA set_vring_state operation callback to configure guest > notifications. >=20 > Signed-off-by: Matan Azrad > Reviewed-by: Maxime Coquelin > --- > lib/librte_vhost/vhost_user.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.= c index > 4e1af91..8d8050b 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -2690,8 +2690,10 @@ typedef int (*vhost_message_handler_t)(struct > virtio_net **pdev, > case VHOST_USER_SEND_RARP: > case VHOST_USER_NET_SET_MTU: > case VHOST_USER_SET_SLAVE_REQ_FD: > - vhost_user_lock_all_queue_pairs(dev); > - unlock_required =3D 1; > + if (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) { > + vhost_user_lock_all_queue_pairs(dev); > + unlock_required =3D 1; > + } > break; > default: > break; > -- > 1.8.3.1 Reviewed-by: Chenbo Xia