From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 92CADAD85 for ; Tue, 10 May 2016 18:34:45 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 10 May 2016 09:34:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,605,1455004800"; d="scan'208";a="962940758" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by fmsmga001.fm.intel.com with ESMTP; 10 May 2016 09:34:43 -0700 Date: Tue, 10 May 2016 09:39:27 -0700 From: Yuanhan Liu To: Rich Lane Cc: dev@dpdk.org, "huawei.xie" , Thomas Monjalon , Panu Matilainen , Tetsuya Mukawa , Traynor Kevin Message-ID: <20160510163927.GO5641@yliu-dev.sh.intel.com> References: <1462227927-22853-1-git-send-email-yuanhan.liu@linux.intel.com> <1462227927-22853-11-git-send-email-yuanhan.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 10/16] vhost: export vid as the only interface to applications X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2016 16:34:46 -0000 On Tue, May 10, 2016 at 09:17:23AM -0700, Rich Lane wrote: > On Mon, May 2, 2016 at 3:25 PM, Yuanhan Liu > wrote: > > With all the previous prepare works, we are just one step away from > the final ABI refactoring. That is, to change current API to let them > stick to vid instead of the old virtio_net dev. > > > This patch removes the only assignment to internal->vid in the PMD. It's > initialized to zero, so only the first vhost connection will work. I assume you meant to following diff: - if (dev == NULL) { - RTE_LOG(INFO, PMD, "Invalid argument\n"); - return -1; - } - - list = find_internal_resource(dev->vid); + list = find_internal_resource(vid); if (list == NULL) { - RTE_LOG(INFO, PMD, "Invalid vid %d\n", dev->vid); + RTE_LOG(INFO, PMD, "Invalid vid %d\n", vid); return -1; } eth_dev = list->eth_dev; internal = eth_dev->data->dev_private; - internal->vid = dev->vid; Then yes, I have no idea why I did that; it's a careless and hard-to-catch issue. So, thanks a lot for catching it! Rich, would you help try by adding following line there and do a test? It would be great if this patch has your Tested-by :) internal->vid = vid; Thanks. --yliu