Displaying 20 results from an estimated 64 matches for "sk_write_space".
2019 Jul 19
2
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...eck if the transport has space
> (virtio-vsock transport returns the credit available). If there is no
> space, it put the thread to sleep on the 'sk_sleep(sk)' wait_queue.
>
> When the transport receives an update of credit available on the other
> peer, it calls 'sk->sk_write_space(sk)' that wakes up the thread
> sleeping, that will queue the new packet.
>
> So, in the current implementation, the TX worker doesn't check the
> credit available, it only sends the packets.
>
>> Does it help though? It certainly adds up work outside of
>> user t...
2019 Jul 19
2
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...eck if the transport has space
> (virtio-vsock transport returns the credit available). If there is no
> space, it put the thread to sleep on the 'sk_sleep(sk)' wait_queue.
>
> When the transport receives an update of credit available on the other
> peer, it calls 'sk->sk_write_space(sk)' that wakes up the thread
> sleeping, that will queue the new packet.
>
> So, in the current implementation, the TX worker doesn't check the
> credit available, it only sends the packets.
>
>> Does it help though? It certainly adds up work outside of
>> user t...
2019 Jul 19
1
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...gt; (virtio-vsock transport returns the credit available). If there is no
>>> space, it put the thread to sleep on the 'sk_sleep(sk)' wait_queue.
>>>
>>> When the transport receives an update of credit available on the other
>>> peer, it calls 'sk->sk_write_space(sk)' that wakes up the thread
>>> sleeping, that will queue the new packet.
>>>
>>> So, in the current implementation, the TX worker doesn't check the
>>> credit available, it only sends the packets.
>>>
>>>> Does it help though? It c...
2019 Jul 18
2
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
On Thu, Jul 18, 2019 at 11:37:30AM +0200, Stefano Garzarella wrote:
> On Thu, Jul 18, 2019 at 10:13 AM Michael S. Tsirkin <mst at redhat.com> wrote:
> > On Thu, Jul 18, 2019 at 09:50:14AM +0200, Stefano Garzarella wrote:
> > > On Wed, Jul 17, 2019 at 4:55 PM Michael S. Tsirkin <mst at redhat.com> wrote:
> > > > On Wed, Jul 17, 2019 at 01:30:29PM +0200,
2019 Jul 18
2
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
On Thu, Jul 18, 2019 at 11:37:30AM +0200, Stefano Garzarella wrote:
> On Thu, Jul 18, 2019 at 10:13 AM Michael S. Tsirkin <mst at redhat.com> wrote:
> > On Thu, Jul 18, 2019 at 09:50:14AM +0200, Stefano Garzarella wrote:
> > > On Wed, Jul 17, 2019 at 4:55 PM Michael S. Tsirkin <mst at redhat.com> wrote:
> > > > On Wed, Jul 17, 2019 at 01:30:29PM +0200,
2019 Jul 19
0
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...callback of af_vsock, check if the transport has space
(virtio-vsock transport returns the credit available). If there is no
space, it put the thread to sleep on the 'sk_sleep(sk)' wait_queue.
When the transport receives an update of credit available on the other
peer, it calls 'sk->sk_write_space(sk)' that wakes up the thread
sleeping, that will queue the new packet.
So, in the current implementation, the TX worker doesn't check the
credit available, it only sends the packets.
> Does it help though? It certainly adds up work outside of
> user thread context which means it...
2019 May 12
1
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...> + list_add_tail(&buf->list, &vvs->rx_queue);
> + spin_unlock_bh(&vvs->rx_lock);
>
> - sk->sk_data_ready(sk);
> - return err;
> + sk->sk_data_ready(sk);
> + }
> +
> + break;
> case VIRTIO_VSOCK_OP_CREDIT_UPDATE:
> sk->sk_write_space(sk);
> break;
> --
> 2.20.1
2019 Jul 19
0
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...pace
> > (virtio-vsock transport returns the credit available). If there is no
> > space, it put the thread to sleep on the 'sk_sleep(sk)' wait_queue.
> >
> > When the transport receives an update of credit available on the other
> > peer, it calls 'sk->sk_write_space(sk)' that wakes up the thread
> > sleeping, that will queue the new packet.
> >
> > So, in the current implementation, the TX worker doesn't check the
> > credit available, it only sends the packets.
> >
> > > Does it help though? It certainly adds u...
2019 May 10
0
[PATCH v2 1/8] vsock/virtio: limit the memory used per-socket
...ck);
+ virtio_transport_inc_rx_pkt(vvs, pkt->len);
+ list_add_tail(&buf->list, &vvs->rx_queue);
+ spin_unlock_bh(&vvs->rx_lock);
- sk->sk_data_ready(sk);
- return err;
+ sk->sk_data_ready(sk);
+ }
+
+ break;
case VIRTIO_VSOCK_OP_CREDIT_UPDATE:
sk->sk_write_space(sk);
break;
--
2.20.1
2009 Nov 04
0
[PATCHv8 1/3] tun: export underlying socket
...,
.owner = THIS_MODULE,
@@ -986,6 +1031,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
goto err_free_dev;
init_waitqueue_head(&tun->socket.wait);
+ tun->socket.ops = &tun_socket_ops;
sock_init_data(&tun->socket, sk);
sk->sk_write_space = tun_sock_write_space;
sk->sk_sndbuf = INT_MAX;
@@ -1489,6 +1535,23 @@ static void tun_cleanup(void)
rtnl_link_unregister(&tun_link_ops);
}
+/* Get an underlying socket object from tun file. Returns error unless file is
+ * attached to a device. The returned object works like a pa...
2009 Nov 04
0
[PATCHv8 1/3] tun: export underlying socket
...,
.owner = THIS_MODULE,
@@ -986,6 +1031,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
goto err_free_dev;
init_waitqueue_head(&tun->socket.wait);
+ tun->socket.ops = &tun_socket_ops;
sock_init_data(&tun->socket, sk);
sk->sk_write_space = tun_sock_write_space;
sk->sk_sndbuf = INT_MAX;
@@ -1489,6 +1535,23 @@ static void tun_cleanup(void)
rtnl_link_unregister(&tun_link_ops);
}
+/* Get an underlying socket object from tun file. Returns error unless file is
+ * attached to a device. The returned object works like a pa...
2009 Nov 03
1
[PATCHv7 1/3] tun: export underlying socket
...,
.owner = THIS_MODULE,
@@ -986,6 +1031,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
goto err_free_dev;
init_waitqueue_head(&tun->socket.wait);
+ tun->socket.ops = &tun_socket_ops;
sock_init_data(&tun->socket, sk);
sk->sk_write_space = tun_sock_write_space;
sk->sk_sndbuf = INT_MAX;
@@ -1489,6 +1535,23 @@ static void tun_cleanup(void)
rtnl_link_unregister(&tun_link_ops);
}
+/* Get an underlying socket object from tun file. Returns error unless file is
+ * attached to a device. The returned object works like a pa...
2009 Nov 03
1
[PATCHv7 1/3] tun: export underlying socket
...,
.owner = THIS_MODULE,
@@ -986,6 +1031,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
goto err_free_dev;
init_waitqueue_head(&tun->socket.wait);
+ tun->socket.ops = &tun_socket_ops;
sock_init_data(&tun->socket, sk);
sk->sk_write_space = tun_sock_write_space;
sk->sk_sndbuf = INT_MAX;
@@ -1489,6 +1535,23 @@ static void tun_cleanup(void)
rtnl_link_unregister(&tun_link_ops);
}
+/* Get an underlying socket object from tun file. Returns error unless file is
+ * attached to a device. The returned object works like a pa...
2014 Jul 05
0
[RFC V2 3/7] VSOCK: Introduce virtio-vsock-common.ko
...ns = trans;
+
+ mutex_lock(&trans->rx_lock);
+ virtio_transport_inc_rx_pkt(pkt);
+ list_add_tail(&pkt->list, &trans->rx_queue);
+ mutex_unlock(&trans->rx_lock);
+
+ sk->sk_data_ready(sk, pkt->len);
+ return err;
+ case VIRTIO_VSOCK_OP_CREDIT_UPDATE:
+ sk->sk_write_space(sk);
+ break;
+ case VIRTIO_VSOCK_OP_SHUTDOWN:
+ pr_debug("%s: got shutdown\n", __func__);
+ if (le32_to_cpu(pkt->hdr.flags)) {
+ vsk->peer_shutdown |= le32_to_cpu(pkt->hdr.flags);
+ sk->sk_state_change(sk);
+ }
+ break;
+ case VIRTIO_VSOCK_OP_RST:
+ pr_debug("%...
2009 Nov 02
1
[PATCHv6 1/3] tun: export underlying socket
...,
.owner = THIS_MODULE,
@@ -986,6 +1031,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
goto err_free_dev;
init_waitqueue_head(&tun->socket.wait);
+ tun->socket.ops = &tun_socket_ops;
sock_init_data(&tun->socket, sk);
sk->sk_write_space = tun_sock_write_space;
sk->sk_sndbuf = INT_MAX;
@@ -1489,6 +1535,23 @@ static void tun_cleanup(void)
rtnl_link_unregister(&tun_link_ops);
}
+/* Get an underlying socket object from tun file. Returns error unless file is
+ * attached to a device. The returned object works like a pa...
2009 Nov 02
1
[PATCHv6 1/3] tun: export underlying socket
...,
.owner = THIS_MODULE,
@@ -986,6 +1031,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
goto err_free_dev;
init_waitqueue_head(&tun->socket.wait);
+ tun->socket.ops = &tun_socket_ops;
sock_init_data(&tun->socket, sk);
sk->sk_write_space = tun_sock_write_space;
sk->sk_sndbuf = INT_MAX;
@@ -1489,6 +1535,23 @@ static void tun_cleanup(void)
rtnl_link_unregister(&tun_link_ops);
}
+/* Get an underlying socket object from tun file. Returns error unless file is
+ * attached to a device. The returned object works like a pa...
2009 Apr 16
1
[1/2] tun: Only free a netdev when all tun descriptors are closed
On Thu, Apr 16, 2009 at 01:08:18AM -0000, Herbert Xu wrote:
> On Wed, Apr 15, 2009 at 10:38:34PM +0800, Herbert Xu wrote:
> >
> > So how about this? We replace the dev destructor with our own that
> > doesn't immediately call free_netdev. We only call free_netdev once
> > all tun fd's attached to the device have been closed.
>
> Here's the patch.
2009 Apr 16
1
[1/2] tun: Only free a netdev when all tun descriptors are closed
On Thu, Apr 16, 2009 at 01:08:18AM -0000, Herbert Xu wrote:
> On Wed, Apr 15, 2009 at 10:38:34PM +0800, Herbert Xu wrote:
> >
> > So how about this? We replace the dev destructor with our own that
> > doesn't immediately call free_netdev. We only call free_netdev once
> > all tun fd's attached to the device have been closed.
>
> Here's the patch.
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...trans->rx_lock);
> + virtio_transport_inc_rx_pkt(pkt);
> + list_add_tail(&pkt->list, &trans->rx_queue);
> + mutex_unlock(&trans->rx_lock);
> +
> + sk->sk_data_ready(sk, pkt->len);
> + return err;
> + case VIRTIO_VSOCK_OP_CREDIT:
> + sk->sk_write_space(sk);
> + break;
> + case VIRTIO_VSOCK_OP_SHUTDOWN:
> + pr_debug("%s: got shutdown\n", __func__);
> + if (pkt->hdr.shut) {
> + vsk->peer_shutdown |= pkt->hdr.shut;
> + sk->sk_state_change(sk);
> + }
> + break;
> + case VIRTIO_VSOCK_OP_RST:
&g...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...trans->rx_lock);
> + virtio_transport_inc_rx_pkt(pkt);
> + list_add_tail(&pkt->list, &trans->rx_queue);
> + mutex_unlock(&trans->rx_lock);
> +
> + sk->sk_data_ready(sk, pkt->len);
> + return err;
> + case VIRTIO_VSOCK_OP_CREDIT:
> + sk->sk_write_space(sk);
> + break;
> + case VIRTIO_VSOCK_OP_SHUTDOWN:
> + pr_debug("%s: got shutdown\n", __func__);
> + if (pkt->hdr.shut) {
> + vsk->peer_shutdown |= pkt->hdr.shut;
> + sk->sk_state_change(sk);
> + }
> + break;
> + case VIRTIO_VSOCK_OP_RST:
&g...