From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id BCEC047D1 for ; Tue, 13 Sep 2016 15:24:56 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id 1so201148347wmz.1 for ; Tue, 13 Sep 2016 06:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=juWt+i53AvtBvFkS6FB8qDQo/sIdx22NmNRhrbVodd0=; b=EIFN9Xzc3dfkP/jIjxxH4cV3t4/94ifYI767ky+ltm0IM9wD5lnoNRAh0Yzk9plEbY AOR0hP+NF8K1XfVr5mKxcCm/3jw45Y7qvb54e36dcJ0GrXI/1ZIYajioHJ7u2L8hQ0dj LG0pVyuxshZI/nBuAO9LVR0CIpW4MwgWSpkKOI/33A3Jzqvdo9pKTFtLsUYun30uYUbd 9vXNG1wk544NCXH677n4z7YuMhUjwbcJKCwBFtzvCbzeXBIDf4VlSRQW3030VMymVr6Z jrQxUZkVsNjz20QiyfvnM2hIVe8l5ORdVPyPFfD2pgoArZa8bO8hTzE7i7Y0l5wOIPwi mrqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=juWt+i53AvtBvFkS6FB8qDQo/sIdx22NmNRhrbVodd0=; b=gYqkCaE+NJzsFKHEdvQictxNH7Wc2ClQCs6rN44Yby8yMByqS4zjiimkroyIpW4J2f 7Rkw4VJqva8Sdd2zg51aDki1lheegLFc3tv0SUKvb7k3kJJ+MezyPRPX41qIqevd8YoZ ZNngBDiUDOdDiT8idh9TNmYbbFtrrePgJeqlkFet9enw2heOerCtHapBYbZJdULQdwAC ZxmrfIPjOj7teWY6qsCd6yir6Y2ExNSHmkm6DafBgEKLrC+5D0pK4zT1tMwyV70PmU3g qtD60yjVHFhgmoRvT8ZM/Fu9r/sLEYbB8793FoV7WYIIn3b3FuAWxhIivL+U8ngfIiZW DNlg== X-Gm-Message-State: AE9vXwNqBkJr+eMKiNbLfbLsY5R22cvyhpeqEWAu3WmME53YiYYT4/ftKaD0QUcvmKXo4dnW X-Received: by 10.28.153.70 with SMTP id b67mr5623857wme.84.1473773096464; Tue, 13 Sep 2016 06:24:56 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id q142sm5386020wmd.4.2016.09.13.06.24.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Sep 2016 06:24:55 -0700 (PDT) From: Thomas Monjalon To: Yuanhan Liu Cc: Changpeng Liu , dev@dpdk.org, james.r.harris@intel.com Date: Tue, 13 Sep 2016 15:24:53 +0200 Message-ID: <1658535.WKSzKSSpe0@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160913125847.GA10323@yliu-dev.sh.intel.com> References: <1473855300-3066-1-git-send-email-changpeng.liu@intel.com> <20160913125847.GA10323@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] vhost: change the vhost library to a common framework which can support more VIRTIO devices 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, 13 Sep 2016 13:24:56 -0000 2016-09-13 20:58, Yuanhan Liu: > rte_virtio_net.h is the header file will be exported for applications. > Every change there would mean either an API or ABI breakage. Thus, we > should try to avoid touching it. Don't even to say you added yet another > header file, rte_virtio_dev.h. > > I confess that the rte_virtio_net.h filename isn't that right: it sticks > to virtio-net so tightly. We may could rename it to rte_vhost.h, but I > doubt it's worthwhile: as said, it breaks the API. > > The fortunate thing about this file is that, the context is actually not > sticking to virtio-net too much. I mean, all the APIs are using the "vid", > which is just a number. Well, except the virtio_net_device_ops() structure, > which also should be renamed to vhost_device_ops(). Besides that, the > three ops, "new_device", "destroy_device" and "vring_state_changed", are > actually not limited to virtio-net device. > > That is to say, we could have two options here: > > - rename the header file and the structure properly, to not limited to > virtio-net > > - live with it, let it be a legacy issue, and document it at somewhere, > say, "due to history reason, that virtio-net is the first one supported > in DPDK, we kept the header filename as rte_virtio_net.h, but not ..." > > I personally would prefer the later one, which saves us from breaking > applications again. I don't have strong objection to the first one though. > > Thomas, any comments? I don't think keeping broken names for historical reasons is a good long term maintenance. It could be a FIXME comment that we would fix when we have other reasons to break the API. However, in this case, it is easy to keep the compatibility, I think, by including rte_virtio.h in rte_virtio_net.h. Note: renames can also generally be managed with symlinks. I also don't really understand why this file name is rte_virtio_net.h and not rte_vhost_net.h.