From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 174701B1A5 for ; Mon, 2 Oct 2017 01:46:28 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 01 Oct 2017 16:46:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,466,1500966000"; d="scan'208";a="1020458035" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.255.25.45]) ([10.255.25.45]) by orsmga003.jf.intel.com with ESMTP; 01 Oct 2017 16:46:25 -0700 To: Yuanhan Liu References: <1503654052-84730-1-git-send-email-jianfeng.tan@intel.com> <1506606959-76230-1-git-send-email-jianfeng.tan@intel.com> <1506606959-76230-13-git-send-email-jianfeng.tan@intel.com> <20170930082319.GD6251@yliu-home> <20170930113447.GF6251@yliu-home> Cc: dev@dpdk.org, bruce.richardson@intel.com, konstantin.ananyev@intel.com, pablo.de.lara.guarch@intel.com, thomas@monjalon.net, maxime.coquelin@redhat.com, mtetsuyah@gmail.com, ferruh.yigit@intel.com From: "Tan, Jianfeng" Message-ID: <6e950196-6387-f889-a0ba-8d8323d15c5d@intel.com> Date: Mon, 2 Oct 2017 07:46:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170930113447.GF6251@yliu-home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 12/12] net/vhost: support to run in the secondary process 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: Sun, 01 Oct 2017 23:46:29 -0000 On 9/30/2017 7:34 PM, Yuanhan Liu wrote: > On Thu, Sep 30, 2017 at 12:53:00PM +0000, Jianfeng Tan wrote: >> On 9/30/2017 4:23 PM, Yuanhan Liu wrote: >>> On Thu, Sep 28, 2017 at 01:55:59PM +0000, Jianfeng Tan wrote: >>>> +static int >>>> new_device(int vid) >>>> { >>>> struct rte_eth_dev *eth_dev; >>>> @@ -610,6 +685,8 @@ new_device(int vid) >>>> _rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, >>>> NULL, NULL); >>>> >>>> + share_device(vid); >>>> + >>> Another question is, have you considered/tested the case when the VM >>> changes the qeueue number later? >> Yes, that is a covered test case, we use ethtool to increase the >> combined queue number; see cover letter for detail. > Sorry I missed that! > > However, I'm not quite sure I understood you: > > Step 5: enable multi queue in VM1 and VM2. > $ ethtool -L ethX combined 2 > > Note in this test case, only queue 1, i.e., secondary process can process > packets. To use queue 1, basically, we can run command like: > $ taskset -c 1 > > Do you mean the secondary can't rx/tx pkts from/to the 2nd queue? > And you are asking the user to add "taskset -c 1" each time he > wants to run a command inside the VM? No, the result is because the logic of this example, symmetric_mp, is that primary process works on the queue pair 0; and secondary process works on queue pair 1. And because of the limitation we mentioned earlier, primary process can process the virtqueue but cannot kick the queue pair 0 (wrong callfd). But secondary process can work on both queue pair 0 and 1 in theory, unfortunately, cannot find an existing example to test that. Thanks, Jianfeng > > --yliu