[dpdk-dev] virtio: remove obsolete comment

Message ID 20160902150521.680-1-matthias.gatto@outscale.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Matthias Gatto Sept. 2, 2016, 3:05 p.m. UTC
  As new_device and destroy_device use an int instead of a "struct virtio_net *",
The comment about setting VIRTIO_DEV_RUNNING doesn't make sense anymore, plus
If I've correctly understand the code, the drivers take care of
setting the flag before calling the callbacks, so I guess that this comment
is obsolet and I've remove it.

Signed-off-by: Matthias Gatto <matthias.gatto@outscale.com>
---
 lib/librte_vhost/rte_virtio_net.h | 4 ----
 1 file changed, 4 deletions(-)
  

Comments

Yuanhan Liu Sept. 5, 2016, 2:25 a.m. UTC | #1
On Fri, Sep 02, 2016 at 05:05:21PM +0200, Matthias Gatto wrote:
> As new_device and destroy_device use an int instead of a "struct virtio_net *",
> The comment about setting VIRTIO_DEV_RUNNING doesn't make sense anymore, plus
> If I've correctly understand the code, the drivers take care of
> setting the flag before calling the callbacks, so I guess that this comment
> is obsolet and I've remove it.

Yes, it is. The flag had been moved for internal use since commit
550c9d27d143 ("vhost: set/reset device flags internally").

So, thanks and applied to dpdk-next-virtio.

        --yliu
  
Matthias Gatto Sept. 5, 2016, 9:18 a.m. UTC | #2
On Mon, Sep 5, 2016 at 4:25 AM, Yuanhan Liu <yuanhan.liu@linux.intel.com> wrote:
> On Fri, Sep 02, 2016 at 05:05:21PM +0200, Matthias Gatto wrote:
>> As new_device and destroy_device use an int instead of a "struct virtio_net *",
>> The comment about setting VIRTIO_DEV_RUNNING doesn't make sense anymore, plus
>> If I've correctly understand the code, the drivers take care of
>> setting the flag before calling the callbacks, so I guess that this comment
>> is obsolet and I've remove it.
>
> Yes, it is. The flag had been moved for internal use since commit
> 550c9d27d143 ("vhost: set/reset device flags internally").
>
> So, thanks and applied to dpdk-next-virtio.
>
>         --yliu

thanks for the review and for applied the patch.
Matthias
  

Patch

diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h
index 9caa622..a88aecd 100644
--- a/lib/librte_vhost/rte_virtio_net.h
+++ b/lib/librte_vhost/rte_virtio_net.h
@@ -59,10 +59,6 @@  enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};
 
 /**
  * Device and vring operations.
- *
- * Make sure to set VIRTIO_DEV_RUNNING to the device flags in new_device and
- * remove it in destroy_device.
- *
  */
 struct virtio_net_device_ops {
 	int (*new_device)(int vid);		/**< Add device. */