search for: if_tun

Displaying 20 results from an estimated 125 matches for "if_tun".

2018 Mar 09
2
[PATCH net] vhost_net: examine pointer types during un-producing
...amine the pointer type before freeing the pointer. Fixes: 761876c857cb ("tap: XDP support") Reported-by: Michael S. Tsirkin <mst at redhat.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/tun.c | 3 ++- drivers/vhost/net.c | 2 +- include/linux/if_tun.h | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7433bb2..28cfa64 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -655,7 +655,7 @@ static struct tun_struct *tun_enable_queue(struct tun_file *tfile) return tun; } -s...
2008 Jul 03
2
[PATCH 1/3] tun: Interface to query tun/tap features.
...derstand, so there's no good way of detecting whether the kernel supports new IFF_ flags. This patch implements a TUNGETFEATURES ioctl which returns all the valid IFF flags. It could be extended later to include other features. Here's an example program which uses it: #include <linux/if_tun.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <fcntl.h> #include <err.h> #include <stdio.h> static struct { unsigned int flag; const char *name; } known_flags[] = { { IFF_TUN, "TUN" }, { IFF_TAP, "TAP"...
2008 Jul 03
2
[PATCH 1/3] tun: Interface to query tun/tap features.
...derstand, so there's no good way of detecting whether the kernel supports new IFF_ flags. This patch implements a TUNGETFEATURES ioctl which returns all the valid IFF flags. It could be extended later to include other features. Here's an example program which uses it: #include <linux/if_tun.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <fcntl.h> #include <err.h> #include <stdio.h> static struct { unsigned int flag; const char *name; } known_flags[] = { { IFF_TUN, "TUN" }, { IFF_TAP, "TAP"...
2008 Jun 25
3
[PATCH 1/4] tun: Interface to query tun/tap features.
...derstand, so there's no good way of detecting whether the kernel supports new IFF_ flags. This patch implements a TUNGETFEATURES ioctl which returns all the valid IFF flags. It could be extended later to include other features. Here's an example program which uses it: #include <linux/if_tun.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <fcntl.h> #include <err.h> #include <stdio.h> static struct { unsigned int flag; const char *name; } known_flags[] = { { IFF_TUN, "TUN" }, { IFF_TAP, "TAP"...
2008 Jun 25
3
[PATCH 1/4] tun: Interface to query tun/tap features.
...derstand, so there's no good way of detecting whether the kernel supports new IFF_ flags. This patch implements a TUNGETFEATURES ioctl which returns all the valid IFF flags. It could be extended later to include other features. Here's an example program which uses it: #include <linux/if_tun.h> #include <sys/types.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <fcntl.h> #include <err.h> #include <stdio.h> static struct { unsigned int flag; const char *name; } known_flags[] = { { IFF_TUN, "TUN" }, { IFF_TAP, "TAP"...
2018 Sep 06
1
[PATCH net-next 08/11] tun: switch to new type of msg_control
...at redhat.com> At this point, do we want to just add a new sock opt for tap's benefit? Seems cleaner than (ab)using sendmsg. > --- > drivers/net/tap.c | 18 ++++++++++++------ > drivers/net/tun.c | 6 +++++- > drivers/vhost/net.c | 7 +++++-- > include/linux/if_tun.h | 7 +++++++ > 4 files changed, 29 insertions(+), 9 deletions(-) > > diff --git a/drivers/net/tap.c b/drivers/net/tap.c > index f0f7cd977667..7996ed7cbf18 100644 > --- a/drivers/net/tap.c > +++ b/drivers/net/tap.c > @@ -619,7 +619,7 @@ static inline struct sk_buff *tap_allo...
2018 Apr 02
0
[PATCH net-next 5/5] macvlan/macvtap: Add support for SCTP checksum offload.
...it on for macvlan and macvtap devices so that guests can take advantage of offload SCTP checksums to the host or host hardware. Signed-off-by: Vladislav Yasevich <vyasevic at redhat.com> --- drivers/net/macvlan.c | 5 +++-- drivers/net/tap.c | 8 +++++--- include/uapi/linux/if_tun.h | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 725f4b4..646b730 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -834,7 +834,7 @@ static struct lock_class_key macvlan_netdev_addr_lock_key; #define ALWAY...
2015 Apr 21
2
[PATCH v4 8/8] macvtap/tun: add VNET_BE flag
...Greg Kurz <gkurz at linux.vnet.ibm.com> > --- > drivers/net/Kconfig | 12 ++++++++ > drivers/net/macvtap.c | 60 +++++++++++++++++++++++++++++++++++++++++- > drivers/net/tun.c | 62 ++++++++++++++++++++++++++++++++++++++++++- > include/uapi/linux/if_tun.h | 2 + > 4 files changed, 134 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig > index df51d60..f0e23a0 100644 > --- a/drivers/net/Kconfig > +++ b/drivers/net/Kconfig > @@ -244,6 +244,18 @@ config TUN > > If you don'...
2015 Apr 21
2
[PATCH v4 8/8] macvtap/tun: add VNET_BE flag
...Greg Kurz <gkurz at linux.vnet.ibm.com> > --- > drivers/net/Kconfig | 12 ++++++++ > drivers/net/macvtap.c | 60 +++++++++++++++++++++++++++++++++++++++++- > drivers/net/tun.c | 62 ++++++++++++++++++++++++++++++++++++++++++- > include/uapi/linux/if_tun.h | 2 + > 4 files changed, 134 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig > index df51d60..f0e23a0 100644 > --- a/drivers/net/Kconfig > +++ b/drivers/net/Kconfig > @@ -244,6 +244,18 @@ config TUN > > If you don'...
2008 Aug 13
1
[PATCH 1/1] tun: TUNGETIFF interface to query name and flags
...it the file descriptor for the interface. Without TUNGETIFF the spawned app has no way of detecting wheter the interface has e.g. IFF_VNET_HDR set. Signed-off-by: Mark McLoughlin <markmc at redhat.com> --- drivers/net/tun.c | 39 +++++++++++++++++++++++++++++++++++++++ include/linux/if_tun.h | 1 + 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e6bbc63..95931a5 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -748,6 +748,36 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) return...
2008 Aug 13
1
[PATCH 1/1] tun: TUNGETIFF interface to query name and flags
...it the file descriptor for the interface. Without TUNGETIFF the spawned app has no way of detecting wheter the interface has e.g. IFF_VNET_HDR set. Signed-off-by: Mark McLoughlin <markmc at redhat.com> --- drivers/net/tun.c | 39 +++++++++++++++++++++++++++++++++++++++ include/linux/if_tun.h | 1 + 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e6bbc63..95931a5 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -748,6 +748,36 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) return...
2009 Nov 02
1
[PATCHv6 1/3] tun: export underlying socket
...gets acked, and assuming it's okay with davem, I think it makes sense to merge this patch through Rusty's tree because vhost is the first user of the new interface. Posted here for completeness. drivers/net/tun.c | 101 +++++++++++++++++++++++++++++++++++++++--------- include/linux/if_tun.h | 14 +++++++ 2 files changed, 96 insertions(+), 19 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 4fdfa2a..18f8876 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -144,6 +144,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file) err = 0; tf...
2009 Nov 02
1
[PATCHv6 1/3] tun: export underlying socket
...gets acked, and assuming it's okay with davem, I think it makes sense to merge this patch through Rusty's tree because vhost is the first user of the new interface. Posted here for completeness. drivers/net/tun.c | 101 +++++++++++++++++++++++++++++++++++++++--------- include/linux/if_tun.h | 14 +++++++ 2 files changed, 96 insertions(+), 19 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 4fdfa2a..18f8876 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -144,6 +144,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file) err = 0; tf...
2018 Sep 06
0
[PATCH net-next 08/11] tun: switch to new type of msg_control
...s could be used to implement accepting an array of XDP buffs from vhost_net in the following patches. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/tap.c | 18 ++++++++++++------ drivers/net/tun.c | 6 +++++- drivers/vhost/net.c | 7 +++++-- include/linux/if_tun.h | 7 +++++++ 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/drivers/net/tap.c b/drivers/net/tap.c index f0f7cd977667..7996ed7cbf18 100644 --- a/drivers/net/tap.c +++ b/drivers/net/tap.c @@ -619,7 +619,7 @@ static inline struct sk_buff *tap_alloc_skb(struct sock *sk, size_t prepa...
2015 Apr 10
0
[PATCH v4 8/8] macvtap/tun: add VNET_BE flag
...userland. Signed-off-by: Greg Kurz <gkurz at linux.vnet.ibm.com> --- drivers/net/Kconfig | 12 ++++++++ drivers/net/macvtap.c | 60 +++++++++++++++++++++++++++++++++++++++++- drivers/net/tun.c | 62 ++++++++++++++++++++++++++++++++++++++++++- include/uapi/linux/if_tun.h | 2 + 4 files changed, 134 insertions(+), 2 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index df51d60..f0e23a0 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -244,6 +244,18 @@ config TUN If you don't know what to use this for, you don't ne...
2015 Apr 24
0
[PATCH v6 8/8] macvtap/tun: cross-endian support for little-endian hosts
...s since v5: - changed {macvtapi,tun}_legacy_is_little_endian() to use ?: drivers/net/Kconfig | 14 ++++++++++ drivers/net/macvtap.c | 57 +++++++++++++++++++++++++++++++++++++++++- drivers/net/tun.c | 59 ++++++++++++++++++++++++++++++++++++++++++- include/uapi/linux/if_tun.h | 6 ++++ 4 files changed, 134 insertions(+), 2 deletions(-) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index df51d60..71ac0ec 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -244,6 +244,20 @@ config TUN If you don't know what to use this for, you don't...
2015 Apr 21
0
[PATCH v4 8/8] macvtap/tun: add VNET_BE flag
...inux.vnet.ibm.com> > > --- > > drivers/net/Kconfig | 12 ++++++++ > > drivers/net/macvtap.c | 60 +++++++++++++++++++++++++++++++++++++++++- > > drivers/net/tun.c | 62 ++++++++++++++++++++++++++++++++++++++++++- > > include/uapi/linux/if_tun.h | 2 + > > 4 files changed, 134 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig > > index df51d60..f0e23a0 100644 > > --- a/drivers/net/Kconfig > > +++ b/drivers/net/Kconfig > > @@ -244,6 +244,18 @@ config...
2009 Nov 04
0
[PATCHv8 1/3] tun: export underlying socket
...; Acked-by: David S. Miller <davem at davemloft.net> --- DaveM agreed that this will go in through Rusty's tree together with vhost patch, because vhost is the first user of the new interface. drivers/net/tun.c | 101 +++++++++++++++++++++++++++++++++++++++--------- include/linux/if_tun.h | 14 +++++++ 2 files changed, 96 insertions(+), 19 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 4fdfa2a..18f8876 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -144,6 +144,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file) err = 0; tf...
2009 Nov 04
0
[PATCHv8 1/3] tun: export underlying socket
...; Acked-by: David S. Miller <davem at davemloft.net> --- DaveM agreed that this will go in through Rusty's tree together with vhost patch, because vhost is the first user of the new interface. drivers/net/tun.c | 101 +++++++++++++++++++++++++++++++++++++++--------- include/linux/if_tun.h | 14 +++++++ 2 files changed, 96 insertions(+), 19 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 4fdfa2a..18f8876 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -144,6 +144,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file) err = 0; tf...
2018 Mar 09
7
[PATCH net 0/3] Several fixes for vhost_net ptr_ring usage
...eview. Thanks Alexander Potapenko (1): vhost_net: initialize rx_ring in vhost_net_open() Jason Wang (2): vhost_net: keep private_data and rx_ring synced vhost_net: examine pointer types during un-producing drivers/net/tun.c | 3 ++- drivers/vhost/net.c | 8 +++++--- include/linux/if_tun.h | 4 ++++ 3 files changed, 11 insertions(+), 4 deletions(-) -- 2.7.4