[dpdk-dev] virtio: remove obsolete comment
Commit Message
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
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
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
@@ -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. */