Skip to contentSkip to conversation

tap-bsd: Remove special casing for older OpenBSD releases

PATCH In review Brad Smith 2 participants 9 messages Mar 26, 2021 – May 6, 2021 Networking

lore
Share & tools
lore

Brad Smith

author
#0 lore raw

PATCH 1/1 tap-bsd: Remove special casing for older OpenBSD releases

OpenBSD added support for tap(4) 10 releases ago.

Remove the special casing for older releases.

net/tap-bsd.c +0 -8
index 77aaf674b1..59dfcdfae0 100644
@@ -35,10 +35,6 @@
 #include <net/if_tap.h>
 #endif
 
-#if defined(__OpenBSD__)
-#include <sys/param.h>
-#endif
-
 #ifndef __FreeBSD__
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
              int vnet_hdr_required, int mq_required, Error **errp)
@@ -59,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
         if (*ifname) {
             snprintf(dname, sizeof dname, "/dev/%s", ifname);
         } else {
-#if defined(__OpenBSD__) && OpenBSD < 201605
-            snprintf(dname, sizeof dname, "/dev/tun%d", i);
-#else
             snprintf(dname, sizeof dname, "/dev/tap%d", i);
-#endif
         }
         TFR(fd = open(dname, O_RDWR));
         if (fd >= 0) {
#1 lore raw
Quoted 23 lines · Brad Smith

OpenBSD added support for tap(4) 10 releases ago.

Remove the special casing for older releases.

net/tap-bsd.c +0 -4
index 77aaf674b1..59dfcdfae0 100644
@@ -35,10 +35,6 @@
  #include <net/if_tap.h>
  #endif
 
-#if defined(__OpenBSD__)
-#include <sys/param.h>
-#endif
-
  #ifndef __FreeBSD__
  int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
               int vnet_hdr_required, int mq_required, Error **errp)

net/tap-bsd.c int tap_open(char *ifname, int ifname_size, int *vnet_hdr, · line 62

Quoted 4 lines
net/tap-bsd.c +0 -1
@@ -59,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
          if (*ifname) {
              snprintf(dname, sizeof dname, "/dev/%s", ifname);
          } else {
-#if defined(__OpenBSD__) && OpenBSD < 201605

I am not sure this sis correct. My understanding is that we still need to use tun for old OpenBSD release.

Thanks

Quoted 8 lines
net/tap-bsd.c +0 -3
-            snprintf(dname, sizeof dname, "/dev/tun%d", i);
-#else
              snprintf(dname, sizeof dname, "/dev/tap%d", i);
-#endif
          }
          TFR(fd = open(dname, O_RDWR));
          if (fd >= 0) {
author
#2 lore raw

It very much is correct. We don't care about such releases anymore.

Quoted 36 lines · On March 28, 2021 10:24:51 p.m. Jason Wang <[email protected]> wrote:
Quoted 23 lines · Brad Smith

OpenBSD added support for tap(4) 10 releases ago.

Remove the special casing for older releases.

net/tap-bsd.c +0 -4
index 77aaf674b1..59dfcdfae0 100644
@@ -35,10 +35,6 @@
 #include <net/if_tap.h>
 #endif
 
-#if defined(__OpenBSD__)
-#include <sys/param.h>
-#endif
-
 #ifndef __FreeBSD__
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
      int vnet_hdr_required, int mq_required, Error **errp)

net/tap-bsd.c int tap_open(char *ifname, int ifname_size, int *vnet_hdr, · line 62

Quoted 4 lines
net/tap-bsd.c +0 -1
@@ -59,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
 if (*ifname) {
     snprintf(dname, sizeof dname, "/dev/%s", ifname);
 } else {
-#if defined(__OpenBSD__) && OpenBSD < 201605

I am not sure this sis correct. My understanding is that we still need to use tun for old OpenBSD release.

Thanks

Quoted 7 lines

net/tap-bsd.c int tap_open(char *ifname, int ifname_size, int *vnet_hdr, · line 61

Quoted 7 lines
net/tap-bsd.c +0 -3
-            snprintf(dname, sizeof dname, "/dev/tun%d", i);
-#else
     snprintf(dname, sizeof dname, "/dev/tap%d", i);
-#endif
 }
 TFR(fd = open(dname, O_RDWR));
 if (fd >= 0) {

Sent with Aqua Mail for Android
https://www.mobisystems.com/aqua-mail

#3 lore raw
Quoted 1 line · Brad Smith

It very much is correct. We don't care about such releases anymore.

So is there a doc/wiki to say Qemu doesn't support those OpenBSD release?

Thanks

Quoted 52 lines · On March 28, 2021 10:24:51 p.m. Jason Wang <[email protected]> wrote:
Quoted 38 lines · Brad Smith
Quoted 23 lines

OpenBSD added support for tap(4) 10 releases ago.

Remove the special casing for older releases.

net/tap-bsd.c +0 -4
index 77aaf674b1..59dfcdfae0 100644
@@ -35,10 +35,6 @@
 #include <net/if_tap.h>
 #endif
 
-#if defined(__OpenBSD__)
-#include <sys/param.h>
-#endif
-
 #ifndef __FreeBSD__
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
        int vnet_hdr_required, int mq_required, Error **errp)

net/tap-bsd.c int tap_open(char *ifname, int ifname_size, int · line 63

Quoted 5 lines
net/tap-bsd.c +0 -1
@@ -59,11 +55,7 @@ int tap_open(char *ifname, int ifname_size, int 
 *vnet_hdr,
   if (*ifname) {
       snprintf(dname, sizeof dname, "/dev/%s", ifname);
   } else {
-#if defined(__OpenBSD__) && OpenBSD < 201605

I am not sure this sis correct. My understanding is that we still need to use tun for old OpenBSD release.

Thanks

Quoted 8 lines
Quoted 8 lines
net/tap-bsd.c +0 -3
-            snprintf(dname, sizeof dname, "/dev/tun%d", i);
-#else
       snprintf(dname, sizeof dname, "/dev/tap%d", i);
-#endif
   }
   TFR(fd = open(dname, O_RDWR));

  if (fd >= 0) {

Sent with Aqua Mail for Android <https://play.google.com/store/apps/details?id=org.kman.AquaMail>
https://www.mobisystems.com/aqua-mail <https://www.mobisystems.com/aqua-mail>

author
#4 lore raw
Quoted 6 lines · Jason Wang
Quoted 1 line · Brad Smith

It very much is correct. We don't care about such releases anymore.

So is there a doc/wiki to say Qemu doesn't support those OpenBSD release?

The (OpenBSD itself and QEMU) project only makes a concerted effort to support two previous releases. I can't remember where in the QEMU Wiki it is mentioned.

Just looking at the Meson requirement alone limits us to the previous two releases never mind older. Even if that wasn't a consideration there would be issues with a few other dependencies like Gtk before going back this far to support such old OpenBSD releases.

#5 lore raw
Quoted 9 lines · Brad Smith
Quoted 6 lines · Jason Wang
Quoted 1 line · Brad Smith

It very much is correct. We don't care about such releases anymore.

So is there a doc/wiki to say Qemu doesn't support those OpenBSD release?

Quoted 9 lines

The (OpenBSD itself and QEMU) project only makes a concerted effort to support two previous releases. I can't remember where in the QEMU Wiki it is mentioned.

Just looking at the Meson requirement alone limits us to the previous two releases never mind older. Even if that wasn't a consideration there would be issues with a few other dependencies like Gtk before going back this far to support such old OpenBSD releases.

Ok. So I've applied this patch.

Thanks

author
#6 lore raw
Quoted 21 lines · Jason Wang
Quoted 9 lines · Brad Smith
Quoted 6 lines · Jason Wang
Quoted 1 line · Brad Smith

It very much is correct. We don't care about such releases anymore.

So is there a doc/wiki to say Qemu doesn't support those OpenBSD release?

Quoted 9 lines

The (OpenBSD itself and QEMU) project only makes a concerted effort to support two previous releases. I can't remember where in the QEMU Wiki it is mentioned.

Just looking at the Meson requirement alone limits us to the previous two releases never mind older. Even if that wasn't a consideration there would be issues with a few other dependencies like Gtk before going back this far to support such old OpenBSD releases.

Quoted 3 lines

Ok. So I've applied this patch.

Thanks

I do not see where.

#7 lore raw
Quoted 22 lines · Brad Smith
Quoted 21 lines · Jason Wang
Quoted 18 lines · Brad Smith
Quoted 6 lines · Jason Wang
Quoted 1 line · Brad Smith

It very much is correct. We don't care about such releases anymore.

So is there a doc/wiki to say Qemu doesn't support those OpenBSD release?

The (OpenBSD itself and QEMU) project only makes a concerted effort to support two previous releases. I can't remember where in the QEMU Wiki it is mentioned.

Just looking at the Meson requirement alone limits us to the previous two releases never mind older. Even if that wasn't a consideration there would be issues with a few other dependencies like Gtk before going back this far to support such old OpenBSD releases.

Quoted 6 lines
Quoted 3 lines

Ok. So I've applied this patch.

Thanks

I do not see where.

I don't queue it for 6.0 so it will be in the next pull request.

Thanks

author
#8 lore raw
Quoted 29 lines · Jason Wang
Quoted 27 lines · Brad Smith
Quoted 24 lines · Jason Wang
Quoted 9 lines · Brad Smith
Quoted 6 lines · Jason Wang
Quoted 1 line · Brad Smith

It very much is correct. We don't care about such releases anymore.

So is there a doc/wiki to say Qemu doesn't support those OpenBSD release?

Quoted 9 lines

The (OpenBSD itself and QEMU) project only makes a concerted effort to support two previous releases. I can't remember where in the QEMU Wiki it is mentioned.

Just looking at the Meson requirement alone limits us to the previous two releases never mind older. Even if that wasn't a consideration there would be issues with a few other dependencies like Gtk before going back this far to support such old OpenBSD releases.

Ok. So I've applied this patch.

Thanks

Quoted 6 lines
Quoted 1 line

I do not see where.

I don't queue it for 6.0 so it will be in the next pull request.

Thanks

Ah, I didn't think it would be 6.0 but thought I would be able to find it in your git repo. Anyway, thank you.