search for: get_tap_socket

Displaying 8 results from an estimated 8 matches for "get_tap_socket".

Did you mean: get_raw_socket
2023 May 05
0
[PATCH] vhost_net: Use fdget() and fdput()
...ns(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index ae2273196b0c..5b3fe4805182 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -1466,17 +1466,17 @@ static struct ptr_ring *get_tap_ptr_ring(struct file *file) > > static struct socket *get_tap_socket(int fd) > { > - struct file *file = fget(fd); > + struct fd f = fdget(fd); > struct socket *sock; > > - if (!file) > + if (!f.file) > return ERR_PTR(-EBADF); > - sock = tun_get_socket(file); > + sock = tun_ge...
2023 May 05
0
[PATCH] vhost_net: Use fdget() and fdput()
...vers/vhost/net.c > >> index ae2273196b0c..5b3fe4805182 100644 > >> --- a/drivers/vhost/net.c > >> +++ b/drivers/vhost/net.c > >> @@ -1466,17 +1466,17 @@ static struct ptr_ring *get_tap_ptr_ring(struct file *file) > >> > >> static struct socket *get_tap_socket(int fd) > >> { > >> - struct file *file = fget(fd); > >> + struct fd f = fdget(fd); > >> struct socket *sock; > >> > >> - if (!file) > >> + if (!f.file) > >> return ERR_PTR(-EBAD...
2023 May 11
0
[PATCH] vhost_net: Use fdget() and fdput()
...(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index ae2273196b0c..5b3fe4805182 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -1466,17 +1466,17 @@ static struct ptr_ring *get_tap_ptr_ring(struct file *file) > > static struct socket *get_tap_socket(int fd) > { > - struct file *file = fget(fd); > + struct fd f = fdget(fd); > struct socket *sock; > > - if (!file) > + if (!f.file) > return ERR_PTR(-EBADF); > - sock = tun_get_socket(file); > + sock = tun_get_socket(f.file); > if (!IS_ERR(sock)) > re...
2017 Mar 21
0
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...kb_array *array; + struct file *file = fget(fd); + + if (!file) + return NULL; + array = tun_get_skb_array(file); + if (!IS_ERR(array)) + goto out; + array = tap_get_skb_array(file); + if (!IS_ERR(array)) + goto out; + array = NULL; +out: + fput(file); + return array; +} + static struct socket *get_tap_socket(int fd) { struct file *file = fget(fd); @@ -1029,6 +1084,7 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) vhost_net_disable_vq(n, vq); vq->private_data = sock; + nvq->rx_array = get_tap_skb_array(fd); r = vhost_vq_init_access(vq); if (r)...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...return NULL; > + array = tun_get_skb_array(file); > + if (!IS_ERR(array)) > + goto out; > + array = tap_get_skb_array(file); > + if (!IS_ERR(array)) > + goto out; > + array = NULL; > +out: > + fput(file); > + return array; > +} > + > static struct socket *get_tap_socket(int fd) > { > struct file *file = fget(fd); > @@ -1029,6 +1084,7 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) > > vhost_net_disable_vq(n, vq); > vq->private_data = sock; > + nvq->rx_array = get_tap_skb_array(fd); > r...
2017 Mar 22
2
[PATCH net-next 7/8] vhost_net: try batch dequing from skb array
...return NULL; > + array = tun_get_skb_array(file); > + if (!IS_ERR(array)) > + goto out; > + array = tap_get_skb_array(file); > + if (!IS_ERR(array)) > + goto out; > + array = NULL; > +out: > + fput(file); > + return array; > +} > + > static struct socket *get_tap_socket(int fd) > { > struct file *file = fget(fd); > @@ -1029,6 +1084,7 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) > > vhost_net_disable_vq(n, vq); > vq->private_data = sock; > + nvq->rx_array = get_tap_skb_array(fd); > r...
2017 Mar 21
12
[PATCH net-next 0/8] vhost-net rx batching
Hi all: This series tries to implement rx batching for vhost-net. This is done by batching the dequeuing from skb_array which was exported by underlayer socket and pass the sbk back through msg_control to finish userspace copying. Tests shows at most 19% improvment on rx pps. Please review. Thanks Jason Wang (8): ptr_ring: introduce batch dequeuing skb_array: introduce batch dequeuing
2017 Mar 21
12
[PATCH net-next 0/8] vhost-net rx batching
Hi all: This series tries to implement rx batching for vhost-net. This is done by batching the dequeuing from skb_array which was exported by underlayer socket and pass the sbk back through msg_control to finish userspace copying. Tests shows at most 19% improvment on rx pps. Please review. Thanks Jason Wang (8): ptr_ring: introduce batch dequeuing skb_array: introduce batch dequeuing