search for: sock_set_flag

Displaying 20 results from an estimated 45 matches for "sock_set_flag".

2018 Sep 06
1
[PATCH net-next 01/11] net: sock: introduce SOCK_XDP
...index ebd07ad82431..2c548bd20393 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -869,6 +869,9 @@ static int tun_attach(struct tun_struct *tun, struct file *file, > tun_napi_init(tun, tfile, napi); > } > > + if (rtnl_dereference(tun->xdp_prog)) > + sock_set_flag(&tfile->sk, SOCK_XDP); > + > tun_set_real_num_queues(tun); > > /* device is allowed to go away first, so no need to hold extra > @@ -1241,13 +1244,29 @@ static int tun_xdp_set(struct net_device *dev, struct bpf_prog *prog, > struct netlink_ext_ack *extack) &...
2018 Sep 06
0
[PATCH net-next 01/11] net: sock: introduce SOCK_XDP
...a/drivers/net/tun.c b/drivers/net/tun.c index ebd07ad82431..2c548bd20393 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -869,6 +869,9 @@ static int tun_attach(struct tun_struct *tun, struct file *file, tun_napi_init(tun, tfile, napi); } + if (rtnl_dereference(tun->xdp_prog)) + sock_set_flag(&tfile->sk, SOCK_XDP); + tun_set_real_num_queues(tun); /* device is allowed to go away first, so no need to hold extra @@ -1241,13 +1244,29 @@ static int tun_xdp_set(struct net_device *dev, struct bpf_prog *prog, struct netlink_ext_ack *extack) { struct tun_struct *tun = n...
2016 Dec 07
1
[PATCH] vhost-vsock: fix orphan connection reset
...c index e3b30ea..a504e2e0 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -506,7 +506,7 @@ static void vhost_vsock_reset_orphans(struct sock *sk) * executing. */ - if (!vhost_vsock_get(vsk->local_addr.svm_cid)) { + if (!vhost_vsock_get(vsk->remote_addr.svm_cid)) { sock_set_flag(sk, SOCK_DONE); vsk->peer_shutdown = SHUTDOWN_MASK; sk->sk_state = SS_UNCONNECTED; -- 2.7.4
2016 Dec 08
1
[PATCH-RESEND] vhost-vsock: fix orphan connection reset
...c index e3b30ea..a504e2e0 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -506,7 +506,7 @@ static void vhost_vsock_reset_orphans(struct sock *sk) * executing. */ - if (!vhost_vsock_get(vsk->local_addr.svm_cid)) { + if (!vhost_vsock_get(vsk->remote_addr.svm_cid)) { sock_set_flag(sk, SOCK_DONE); vsk->peer_shutdown = SHUTDOWN_MASK; sk->sk_state = SS_UNCONNECTED; -- 2.7.4
2019 Nov 08
1
[PATCH] vsock/virtio: fix sock refcnt holding during the shutdown
...ommon.c @@ -947,9 +947,11 @@ virtio_transport_recv_connected(struct sock *sk, if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SHUTDOWN_SEND) vsk->peer_shutdown |= SEND_SHUTDOWN; if (vsk->peer_shutdown == SHUTDOWN_MASK && - vsock_stream_has_data(vsk) <= 0) { - sock_set_flag(sk, SOCK_DONE); - sk->sk_state = TCP_CLOSING; + vsock_stream_has_data(vsk) <= 0 && + !sock_flag(sk, SOCK_DONE)) { + (void)virtio_transport_reset(vsk, NULL); + + virtio_transport_do_close(vsk, true); } if (le32_to_cpu(pkt->hdr.flags)) sk->sk_state_change...
2016 Dec 07
1
[PATCH] vhost-vsock: fix orphan connection reset
...c index e3b30ea..a504e2e0 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -506,7 +506,7 @@ static void vhost_vsock_reset_orphans(struct sock *sk) * executing. */ - if (!vhost_vsock_get(vsk->local_addr.svm_cid)) { + if (!vhost_vsock_get(vsk->remote_addr.svm_cid)) { sock_set_flag(sk, SOCK_DONE); vsk->peer_shutdown = SHUTDOWN_MASK; sk->sk_state = SS_UNCONNECTED; -- 2.7.4
2016 Dec 08
1
[PATCH-RESEND] vhost-vsock: fix orphan connection reset
...c index e3b30ea..a504e2e0 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -506,7 +506,7 @@ static void vhost_vsock_reset_orphans(struct sock *sk) * executing. */ - if (!vhost_vsock_get(vsk->local_addr.svm_cid)) { + if (!vhost_vsock_get(vsk->remote_addr.svm_cid)) { sock_set_flag(sk, SOCK_DONE); vsk->peer_shutdown = SHUTDOWN_MASK; sk->sk_state = SS_UNCONNECTED; -- 2.7.4
2018 Sep 06
22
[PATCH net-next 00/11] Vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 Sep 12
14
[PATCH net-next V2 00/11] vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 Sep 12
14
[PATCH net-next V2 00/11] vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...t; + 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: > + pr_debug("%s: got rst\n", __func__); > + sock_set_flag(sk, SOCK_DONE); > + vsk->peer_shutdown = SHUTDOWN_MASK; > + if (vsock_stream_has_data(vsk) <= 0) > + sk->sk_state = SS_DISCONNECTING; > + sk->sk_state_change(sk); > + break; > + default: > + err = -EINVAL; > + break; > + } > + > + virtio_transpor...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...t; + 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: > + pr_debug("%s: got rst\n", __func__); > + sock_set_flag(sk, SOCK_DONE); > + vsk->peer_shutdown = SHUTDOWN_MASK; > + if (vsock_stream_has_data(vsk) <= 0) > + sk->sk_state = SS_DISCONNECTING; > + sk->sk_state_change(sk); > + break; > + default: > + err = -EINVAL; > + break; > + } > + > + virtio_transpor...
2015 Dec 09
0
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...down |= RCV_SHUTDOWN; + if (le32_to_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SHUTDOWN_SEND) + vsk->peer_shutdown |= SEND_SHUTDOWN; + if (le32_to_cpu(pkt->hdr.flags)) + sk->sk_state_change(sk); + break; + case VIRTIO_VSOCK_OP_RST: + pr_debug("%s: got rst\n", __func__); + sock_set_flag(sk, SOCK_DONE); + vsk->peer_shutdown = SHUTDOWN_MASK; + if (vsock_stream_has_data(vsk) <= 0) + sk->sk_state = SS_DISCONNECTING; + sk->sk_state_change(sk); + break; + default: + err = -EINVAL; + break; + } + + virtio_transport_free_pkt(pkt); + return err; +} + +static int +virtio...
2013 Jun 27
0
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...+ 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: + pr_debug("%s: got rst\n", __func__); + sock_set_flag(sk, SOCK_DONE); + vsk->peer_shutdown = SHUTDOWN_MASK; + if (vsock_stream_has_data(vsk) <= 0) + sk->sk_state = SS_DISCONNECTING; + sk->sk_state_change(sk); + break; + default: + err = -EINVAL; + break; + } + + virtio_transport_free_pkt(pkt); + return err; +} + +static int +virtio...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...o_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SHUTDOWN_SEND) > + vsk->peer_shutdown |= SEND_SHUTDOWN; > + if (le32_to_cpu(pkt->hdr.flags)) > + sk->sk_state_change(sk); > + break; > + case VIRTIO_VSOCK_OP_RST: > + pr_debug("%s: got rst\n", __func__); > + sock_set_flag(sk, SOCK_DONE); > + vsk->peer_shutdown = SHUTDOWN_MASK; > + if (vsock_stream_has_data(vsk) <= 0) > + sk->sk_state = SS_DISCONNECTING; > + sk->sk_state_change(sk); > + break; > + default: > + err = -EINVAL; > + break; > + } > + > + virtio_transpor...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...o_cpu(pkt->hdr.flags) & VIRTIO_VSOCK_SHUTDOWN_SEND) > + vsk->peer_shutdown |= SEND_SHUTDOWN; > + if (le32_to_cpu(pkt->hdr.flags)) > + sk->sk_state_change(sk); > + break; > + case VIRTIO_VSOCK_OP_RST: > + pr_debug("%s: got rst\n", __func__); > + sock_set_flag(sk, SOCK_DONE); > + vsk->peer_shutdown = SHUTDOWN_MASK; > + if (vsock_stream_has_data(vsk) <= 0) > + sk->sk_state = SS_DISCONNECTING; > + sk->sk_state_change(sk); > + break; > + default: > + err = -EINVAL; > + break; > + } > + > + virtio_transpor...
2016 Jul 28
6
[RFC v6 0/6] Add virtio transport for AF_VSOCK
This series is based on v4.7. This RFC is the implementation for the new VIRTIO Socket device. It is developed in parallel with the VIRTIO device specification and proves the design. Once the specification has been accepted I will send a non-RFC version of this patch series. v6: * Add VHOST_VSOCK_SET_RUNNING ioctl to start/stop vhost cleanly * Add graceful shutdown to avoid port reuse while
2016 Jul 28
6
[RFC v6 0/6] Add virtio transport for AF_VSOCK
This series is based on v4.7. This RFC is the implementation for the new VIRTIO Socket device. It is developed in parallel with the VIRTIO device specification and proves the design. Once the specification has been accepted I will send a non-RFC version of this patch series. v6: * Add VHOST_VSOCK_SET_RUNNING ioctl to start/stop vhost cleanly * Add graceful shutdown to avoid port reuse while
2014 Jul 05
0
[RFC V2 3/7] VSOCK: Introduce virtio-vsock-common.ko
...K_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("%s: got rst\n", __func__); + sock_set_flag(sk, SOCK_DONE); + vsk->peer_shutdown = SHUTDOWN_MASK; + if (vsock_stream_has_data(vsk) <= 0) + sk->sk_state = SS_DISCONNECTING; + sk->sk_state_change(sk); + break; + default: + err = -EINVAL; + break; + } + + virtio_transport_free_pkt(pkt); + return err; +} + +static int +virtio...
2013 Jan 25
4
[PATCH 0/1] VM Sockets for Linux upstreaming
From: Andy King <acking at vmware.com> ** Introduce VM Sockets *** In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the VM Sockets (VSOCK, formerly VMCI Sockets) (vmw_vsock) kernel module for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vsock kernel module. Unlike previous