[dpdk-dev] [PATCH 10/16] vhost: export vid as the only interface to applications
Yuanhan Liu
yuanhan.liu at linux.intel.com
Tue May 10 18:39:27 CEST 2016
On Tue, May 10, 2016 at 09:17:23AM -0700, Rich Lane wrote:
> On Mon, May 2, 2016 at 3:25 PM, Yuanhan Liu <yuanhan.liu at linux.intel.com>
> 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
More information about the dev
mailing list