From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH 10/16] vhost: export vid as the only interface to applications Date: Tue, 10 May 2016 09:39:27 -0700 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 Cc: dev@dpdk.org, "huawei.xie" , Thomas Monjalon , Panu Matilainen , Tetsuya Mukawa , Traynor Kevin To: Rich Lane 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) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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