qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Brad Smith <brad@comstyle.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] tap-bsd: Remove special casing for older OpenBSD releases
Date: Mon, 29 Mar 2021 10:22:31 +0800	[thread overview]
Message-ID: <8571b8c8-f3ed-ef67-6ea3-2e6652a2e435@redhat.com> (raw)
In-Reply-To: <YF5y+MDiK2QInFA2@humpty.home.comstyle.com>


在 2021/3/27 上午7:49, Brad Smith 写道:
> OpenBSD added support for tap(4) 10 releases ago.
>
> Remove the special casing for older releases.
>
>
> Signed-off-by: Brad Smith <brad@comstyle.com>
>
> diff --git a/net/tap-bsd.c b/net/tap-bsd.c
> index 77aaf674b1..59dfcdfae0 100644
> --- a/net/tap-bsd.c
> +++ b/net/tap-bsd.c
> @@ -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


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

Thanks


> -            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) {
>



  reply	other threads:[~2021-03-29  2:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26 23:49 [PATCH] tap-bsd: Remove special casing for older OpenBSD releases Brad Smith
2021-03-29  2:22 ` Jason Wang [this message]
2021-03-29  3:03   ` Brad Smith
2021-03-29  3:58     ` Jason Wang
2021-03-29 20:38       ` Brad Smith
2021-04-01  7:24         ` Jason Wang
2021-05-02  4:10           ` Brad Smith
2021-05-06  2:19             ` Jason Wang
2021-05-06  3:16               ` Brad Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8571b8c8-f3ed-ef67-6ea3-2e6652a2e435@redhat.com \
    --to=jasowang@redhat.com \
    --cc=brad@comstyle.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).