From: Sameeh Jubran <sjubran@redhat.com>
Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
---
hw/net/vhost_net.c | 2 +-
include/hw/virtio/virtio-net.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index e037db63a3..c0bff725c9 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -129,7 +129,7 @@ uint64_t vhost_net_get_acked_features(VHostNetState *net)
return net->dev.acked_features;
}
-static int vhost_net_get_fd(NetClientState *backend)
+int vhost_net_get_fd(NetClientState *backend)
{
switch (backend->info->type) {
case NET_CLIENT_DRIVER_TAP:
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index 02484dc94c..a7b53edc96 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -107,4 +107,6 @@ typedef struct VirtIONet {
void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
const char *type);
+int vhost_net_get_fd(NetClientState *backend);
+
#endif
--
2.13.6
On 2018年08月30日 22:27, Sameeh Jubran wrote:
> From: Sameeh Jubran <sjubran@redhat.com>
>
> Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
Better explain the motivation in the commit log.
Thanks
> ---
> hw/net/vhost_net.c | 2 +-
> include/hw/virtio/virtio-net.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> index e037db63a3..c0bff725c9 100644
> --- a/hw/net/vhost_net.c
> +++ b/hw/net/vhost_net.c
> @@ -129,7 +129,7 @@ uint64_t vhost_net_get_acked_features(VHostNetState *net)
> return net->dev.acked_features;
> }
>
> -static int vhost_net_get_fd(NetClientState *backend)
> +int vhost_net_get_fd(NetClientState *backend)
> {
> switch (backend->info->type) {
> case NET_CLIENT_DRIVER_TAP:
> diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
> index 02484dc94c..a7b53edc96 100644
> --- a/include/hw/virtio/virtio-net.h
> +++ b/include/hw/virtio/virtio-net.h
> @@ -107,4 +107,6 @@ typedef struct VirtIONet {
> void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
> const char *type);
>
> +int vhost_net_get_fd(NetClientState *backend);
> +
> #endif
On Mon, Sep 3, 2018 at 6:24 AM, Jason Wang <jasowang@redhat.com> wrote:
>
>
> On 2018年08月30日 22:27, Sameeh Jubran wrote:
>>
>> From: Sameeh Jubran <sjubran@redhat.com>
>>
>> Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
>
>
> Better explain the motivation in the commit log.
I used to use this function in my initial implementation, but this is
unneeded now and the patch can be dropped
>
> Thanks
>
>
>> ---
>> hw/net/vhost_net.c | 2 +-
>> include/hw/virtio/virtio-net.h | 2 ++
>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
>> index e037db63a3..c0bff725c9 100644
>> --- a/hw/net/vhost_net.c
>> +++ b/hw/net/vhost_net.c
>> @@ -129,7 +129,7 @@ uint64_t vhost_net_get_acked_features(VHostNetState
>> *net)
>> return net->dev.acked_features;
>> }
>> -static int vhost_net_get_fd(NetClientState *backend)
>> +int vhost_net_get_fd(NetClientState *backend)
>> {
>> switch (backend->info->type) {
>> case NET_CLIENT_DRIVER_TAP:
>> diff --git a/include/hw/virtio/virtio-net.h
>> b/include/hw/virtio/virtio-net.h
>> index 02484dc94c..a7b53edc96 100644
>> --- a/include/hw/virtio/virtio-net.h
>> +++ b/include/hw/virtio/virtio-net.h
>> @@ -107,4 +107,6 @@ typedef struct VirtIONet {
>> void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
>> const char *type);
>> +int vhost_net_get_fd(NetClientState *backend);
>> +
>> #endif
>
>
--
Respectfully,
Sameeh Jubran
Linkedin
Software Engineer @ Daynix.
© 2016 - 2025 Red Hat, Inc.