Re: [PATCH v2] tap-win32: Remove unnecessary stubs

2024-03-26 Thread Jason Wang
On Mon, Feb 12, 2024 at 10:04 PM Akihiko Odaki  wrote:
>
> Some of them are only necessary for POSIX systems. The others are
> assigned to function pointers in NetClientInfo that can actually be
> NULL.
>
> Signed-off-by: Akihiko Odaki 
> ---
> Changes in v2:
> - Rebased.
> - Link to v1: 
> https://lore.kernel.org/r/20231006051127.5429-1-akihiko.od...@daynix.com
> ---

Queued.

Thanks




Re: [PATCH v2] tap-win32: Remove unnecessary stubs

2024-02-17 Thread Akihiko Odaki

Hi Jason,

I have this and a few other network-related patches not reviewed. Can 
you review them?

I have the following patches ready for review:

https://patchew.org/QEMU/20230921094851.36295-1-akihiko.od...@daynix.com/
("[PATCH v2] Revert "tap: setting error appropriately when calling 
net_init_tap_one()"")


https://patchew.org/QEMU/20231219-glib-v1-0-1b040d286...@daynix.com
("[PATCH 0/2] tap: Use g_spawn_sync() and g_spawn_check_wait_status()")

https://patchew.org/QEMU/20240212-tap-v2-1-94e2ee18b...@daynix.com
(this patch)

Regards,
Akihiko Odaki

On 2024/02/12 23:04, Akihiko Odaki wrote:

Some of them are only necessary for POSIX systems. The others are
assigned to function pointers in NetClientInfo that can actually be
NULL.

Signed-off-by: Akihiko Odaki 
---
Changes in v2:
- Rebased.
- Link to v1: 
https://lore.kernel.org/r/20231006051127.5429-1-akihiko.od...@daynix.com
---
  net/tap-win32.c | 54 --
  1 file changed, 54 deletions(-)

diff --git a/net/tap-win32.c b/net/tap-win32.c
index 7b8b4be02cff..7edbd7163370 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -707,70 +707,16 @@ static void tap_win32_send(void *opaque)
  }
  }
  
-static bool tap_has_ufo(NetClientState *nc)

-{
-return false;
-}
-
-static bool tap_has_vnet_hdr(NetClientState *nc)
-{
-return false;
-}
-
-int tap_probe_vnet_hdr_len(int fd, int len)
-{
-return 0;
-}
-
-void tap_fd_set_vnet_hdr_len(int fd, int len)
-{
-}
-
-int tap_fd_set_vnet_le(int fd, int is_le)
-{
-return -EINVAL;
-}
-
-int tap_fd_set_vnet_be(int fd, int is_be)
-{
-return -EINVAL;
-}
-
-static void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
-{
-}
-
-static void tap_set_offload(NetClientState *nc, int csum, int tso4,
- int tso6, int ecn, int ufo, int uso4, int uso6)
-{
-}
-
  struct vhost_net *tap_get_vhost_net(NetClientState *nc)
  {
  return NULL;
  }
  
-static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)

-{
-return false;
-}
-
-static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
-{
-abort();
-}
-
  static NetClientInfo net_tap_win32_info = {
  .type = NET_CLIENT_DRIVER_TAP,
  .size = sizeof(TAPState),
  .receive = tap_receive,
  .cleanup = tap_cleanup,
-.has_ufo = tap_has_ufo,
-.has_vnet_hdr = tap_has_vnet_hdr,
-.has_vnet_hdr_len = tap_has_vnet_hdr_len,
-.using_vnet_hdr = tap_using_vnet_hdr,
-.set_offload = tap_set_offload,
-.set_vnet_hdr_len = tap_set_vnet_hdr_len,
  };
  
  static int tap_win32_init(NetClientState *peer, const char *model,


---
base-commit: 5d1fc614413b10dd94858b07a1b2e26b1aa0296c
change-id: 20240212-tap-51087194c8eb

Best regards,




[PATCH v2] tap-win32: Remove unnecessary stubs

2024-02-12 Thread Akihiko Odaki
Some of them are only necessary for POSIX systems. The others are
assigned to function pointers in NetClientInfo that can actually be
NULL.

Signed-off-by: Akihiko Odaki 
---
Changes in v2:
- Rebased.
- Link to v1: 
https://lore.kernel.org/r/20231006051127.5429-1-akihiko.od...@daynix.com
---
 net/tap-win32.c | 54 --
 1 file changed, 54 deletions(-)

diff --git a/net/tap-win32.c b/net/tap-win32.c
index 7b8b4be02cff..7edbd7163370 100644
--- a/net/tap-win32.c
+++ b/net/tap-win32.c
@@ -707,70 +707,16 @@ static void tap_win32_send(void *opaque)
 }
 }
 
-static bool tap_has_ufo(NetClientState *nc)
-{
-return false;
-}
-
-static bool tap_has_vnet_hdr(NetClientState *nc)
-{
-return false;
-}
-
-int tap_probe_vnet_hdr_len(int fd, int len)
-{
-return 0;
-}
-
-void tap_fd_set_vnet_hdr_len(int fd, int len)
-{
-}
-
-int tap_fd_set_vnet_le(int fd, int is_le)
-{
-return -EINVAL;
-}
-
-int tap_fd_set_vnet_be(int fd, int is_be)
-{
-return -EINVAL;
-}
-
-static void tap_using_vnet_hdr(NetClientState *nc, bool using_vnet_hdr)
-{
-}
-
-static void tap_set_offload(NetClientState *nc, int csum, int tso4,
- int tso6, int ecn, int ufo, int uso4, int uso6)
-{
-}
-
 struct vhost_net *tap_get_vhost_net(NetClientState *nc)
 {
 return NULL;
 }
 
-static bool tap_has_vnet_hdr_len(NetClientState *nc, int len)
-{
-return false;
-}
-
-static void tap_set_vnet_hdr_len(NetClientState *nc, int len)
-{
-abort();
-}
-
 static NetClientInfo net_tap_win32_info = {
 .type = NET_CLIENT_DRIVER_TAP,
 .size = sizeof(TAPState),
 .receive = tap_receive,
 .cleanup = tap_cleanup,
-.has_ufo = tap_has_ufo,
-.has_vnet_hdr = tap_has_vnet_hdr,
-.has_vnet_hdr_len = tap_has_vnet_hdr_len,
-.using_vnet_hdr = tap_using_vnet_hdr,
-.set_offload = tap_set_offload,
-.set_vnet_hdr_len = tap_set_vnet_hdr_len,
 };
 
 static int tap_win32_init(NetClientState *peer, const char *model,

---
base-commit: 5d1fc614413b10dd94858b07a1b2e26b1aa0296c
change-id: 20240212-tap-51087194c8eb

Best regards,
-- 
Akihiko Odaki