From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f174.google.com (mail-pf0-f174.google.com [209.85.192.174]) by dpdk.org (Postfix) with ESMTP id 48604199A9 for ; Thu, 7 Sep 2017 15:44:43 +0200 (CEST) Received: by mail-pf0-f174.google.com with SMTP id e1so3785930pfk.1 for ; Thu, 07 Sep 2017 06:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=W9rpeHSiEtC9meJ+qVAPJc7lUFRoY8qKvjD3pyZOOW4=; b=E030R4rATRdUYINzwi1175MU1fk0TkwDwXUW0DeWhOuNcovlfyTeT2/VkrakOv02pj pYU4AbHShSkmLEcTaqPjy00sybG7uoTwj9BbI9mY8nboqckFkUxlhf5JWJoCNy2/mXJC Ck40P23fRdlwuo9NCo5snniIfPSjTr7zawk8C7qreg0UJfghumPsFmTe+qwSM0LyYBWF H7B29tw220sz9HD0AiTMn+7a6Y9GeX6rtfyvOgRaOAPMSgp2K5xwxOdKpba7Aj0lbEfN xy3G2U2ja77Qo0Jd781CN/xklze6Ea/8EpNJUTI8zHSYsVQqcaRx5HcYrrdD9xhsDPlf XE7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=W9rpeHSiEtC9meJ+qVAPJc7lUFRoY8qKvjD3pyZOOW4=; b=k6Ct4bCh5rz1cGMJu7WX7ORewTSPwUIl+LgD0HGk2ZiVP0147wxBgOHztvEDkgXfw0 3FzRiBjuk14SYRLSXFyp4plUjwhIgInrn3QYpsxMDZtBBfZ1/nU/VHpcvhnv5Um6aIDf 66M6HdQZOMs2CiFXuSrY2JPcIaumWJ3EYQye5c3ShkbCfkLI3KciqOJidzBHFzz5BJmw VDFeUZU2VL13Wwd2b712bFRxuKu2qmP+bobXaQM9U8xeqnUeW4JjISpFKEwUreRSwUXn 6/7tnuvQqPq448itMA3xYcK80pM7x553TZuwMl71WmEyIJRkqNh0Qg2w3RNm6dEBMl4A FIRQ== X-Gm-Message-State: AHPjjUj479lXG+kFCYulZQS06xOMh6cNrv4lp3ti3l3572QfkGUxZK8s IGnKW0VrP4k3Drh8 X-Google-Smtp-Source: ADKCNb5KMdqHuuQrfaPym4JLo2xGgX0Ln02Nl3rrohzfvc4yP/QZduk/qGtz2L3VuNjK5GEKlE3uLQ== X-Received: by 10.98.220.209 with SMTP id c78mr2815137pfl.37.1504791882567; Thu, 07 Sep 2017 06:44:42 -0700 (PDT) Received: from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id e27sm5135099pfk.130.2017.09.07.06.44.39 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Sep 2017 06:44:41 -0700 (PDT) Date: Thu, 7 Sep 2017 21:44:34 +0800 From: Yuanhan Liu To: Maxime Coquelin Cc: dev@dpdk.org, jfreiman@redhat.com, tiwei.bie@intel.com, mst@redhat.com, vkaplans@redhat.com, jasowang@redhat.com Message-ID: <20170907134434.GB9736@yliu-home> References: <20170831095023.21037-1-maxime.coquelin@redhat.com> <20170831095023.21037-4-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170831095023.21037-4-maxime.coquelin@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH 03/21] vhost: protect virtio_net device struct 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: , X-List-Received-Date: Thu, 07 Sep 2017 13:44:43 -0000 On Thu, Aug 31, 2017 at 11:50:05AM +0200, Maxime Coquelin wrote: > virtio_net device might be accessed while being reallocated > in case of NUMA awareness. >>From data path? data path won't be enabled until all are ready, which is at a stage after numa_realloc(). Or, am I miss something? --yliu > This case might be theoretical, > but it will be needed anyway to protect vrings pages against > invalidation. > > The virtio_net devs are now protected with a readers/writers > lock, so that before reallocating the device, it is ensured > that it is not being referenced by the processing threads. > > Signed-off-by: Maxime Coquelin