search for: virtio_vsock_op_rst

Displaying 20 results from an estimated 61 matches for "virtio_vsock_op_rst".

2019 Mar 05
4
[PATCH] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
..._common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -662,6 +662,7 @@ static int virtio_transport_reset(struct vsock_sock *vsk, */ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) { + const struct virtio_transport *t; struct virtio_vsock_pkt_info info = { .op = VIRTIO_VSOCK_OP_RST, .type = le16_to_cpu(pkt->hdr.type), @@ -680,7 +681,11 @@ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) if (!pkt) return -ENOMEM; - return virtio_transport_get_ops()->send_pkt(pkt); + t = virtio_transport_get_ops(); + if (!t) + return -ENOTCONN; + + return...
2019 Mar 05
4
[PATCH] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
..._common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -662,6 +662,7 @@ static int virtio_transport_reset(struct vsock_sock *vsk, */ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) { + const struct virtio_transport *t; struct virtio_vsock_pkt_info info = { .op = VIRTIO_VSOCK_OP_RST, .type = le16_to_cpu(pkt->hdr.type), @@ -680,7 +681,11 @@ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) if (!pkt) return -ENOMEM; - return virtio_transport_get_ops()->send_pkt(pkt); + t = virtio_transport_get_ops(); + if (!t) + return -ENOTCONN; + + return...
2019 Mar 06
2
[PATCH v2] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
...io_transport_common.c @@ -662,6 +662,8 @@ static int virtio_transport_reset(struct vsock_sock *vsk, */ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) { + const struct virtio_transport *t; + struct virtio_vsock_pkt *reply; struct virtio_vsock_pkt_info info = { .op = VIRTIO_VSOCK_OP_RST, .type = le16_to_cpu(pkt->hdr.type), @@ -672,15 +674,21 @@ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) if (le16_to_cpu(pkt->hdr.op) == VIRTIO_VSOCK_OP_RST) return 0; - pkt = virtio_transport_alloc_pkt(&info, 0, - le64_to_cpu(pkt->hdr.dst_cid),...
2019 Mar 06
2
[PATCH v2] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
...io_transport_common.c @@ -662,6 +662,8 @@ static int virtio_transport_reset(struct vsock_sock *vsk, */ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) { + const struct virtio_transport *t; + struct virtio_vsock_pkt *reply; struct virtio_vsock_pkt_info info = { .op = VIRTIO_VSOCK_OP_RST, .type = le16_to_cpu(pkt->hdr.type), @@ -672,15 +674,21 @@ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) if (le16_to_cpu(pkt->hdr.op) == VIRTIO_VSOCK_OP_RST) return 0; - pkt = virtio_transport_alloc_pkt(&info, 0, - le64_to_cpu(pkt->hdr.dst_cid),...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...uf_alloc; > +} __packed; > + > +enum { > + VIRTIO_VSOCK_OP_INVALID = 0, > + VIRTIO_VSOCK_OP_REQUEST = 1, > + VIRTIO_VSOCK_OP_NEGOTIATE = 2, > + VIRTIO_VSOCK_OP_OFFER = 3, > + VIRTIO_VSOCK_OP_ATTACH = 4, > + VIRTIO_VSOCK_OP_RW = 5, > + VIRTIO_VSOCK_OP_CREDIT = 6, > + VIRTIO_VSOCK_OP_RST = 7, > + VIRTIO_VSOCK_OP_SHUTDOWN = 8, > +}; > + > +#endif /* _UAPI_LINUX_VIRTIO_VSOCK_H */ > diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c > new file mode 100644 > index 0000000..0482eb1 > --- /dev/null > +++ b/net/vmw_vso...
2013 Jun 27
1
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...uf_alloc; > +} __packed; > + > +enum { > + VIRTIO_VSOCK_OP_INVALID = 0, > + VIRTIO_VSOCK_OP_REQUEST = 1, > + VIRTIO_VSOCK_OP_NEGOTIATE = 2, > + VIRTIO_VSOCK_OP_OFFER = 3, > + VIRTIO_VSOCK_OP_ATTACH = 4, > + VIRTIO_VSOCK_OP_RW = 5, > + VIRTIO_VSOCK_OP_CREDIT = 6, > + VIRTIO_VSOCK_OP_RST = 7, > + VIRTIO_VSOCK_OP_SHUTDOWN = 8, > +}; > + > +#endif /* _UAPI_LINUX_VIRTIO_VSOCK_H */ > diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c > new file mode 100644 > index 0000000..0482eb1 > --- /dev/null > +++ b/net/vmw_vso...
2015 Dec 09
0
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
.../* enum virtio_vsock_op */ + __le32 flags; + __le32 buf_alloc; + __le32 fwd_cnt; +}; + +enum virtio_vsock_type { + VIRTIO_VSOCK_TYPE_STREAM = 1, +}; + +enum virtio_vsock_op { + VIRTIO_VSOCK_OP_INVALID = 0, + + /* Connect operations */ + VIRTIO_VSOCK_OP_REQUEST = 1, + VIRTIO_VSOCK_OP_RESPONSE = 2, + VIRTIO_VSOCK_OP_RST = 3, + VIRTIO_VSOCK_OP_SHUTDOWN = 4, + + /* To send payload */ + VIRTIO_VSOCK_OP_RW = 5, + + /* Tell the peer our credit info */ + VIRTIO_VSOCK_OP_CREDIT_UPDATE = 6, + /* Request the peer to send the credit info to us */ + VIRTIO_VSOCK_OP_CREDIT_REQUEST = 7, +}; + +/* VIRTIO_VSOCK_OP_SHUTDOWN flags...
2013 Jun 27
0
[RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko
...ype; + __u8 op; + __u8 shut; + __u64 fwd_cnt; + __u64 buf_alloc; +} __packed; + +enum { + VIRTIO_VSOCK_OP_INVALID = 0, + VIRTIO_VSOCK_OP_REQUEST = 1, + VIRTIO_VSOCK_OP_NEGOTIATE = 2, + VIRTIO_VSOCK_OP_OFFER = 3, + VIRTIO_VSOCK_OP_ATTACH = 4, + VIRTIO_VSOCK_OP_RW = 5, + VIRTIO_VSOCK_OP_CREDIT = 6, + VIRTIO_VSOCK_OP_RST = 7, + VIRTIO_VSOCK_OP_SHUTDOWN = 8, +}; + +#endif /* _UAPI_LINUX_VIRTIO_VSOCK_H */ diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c new file mode 100644 index 0000000..0482eb1 --- /dev/null +++ b/net/vmw_vsock/virtio_transport_common.c @@ -0,0 +1,992 @...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...__le32 fwd_cnt; > +}; > + > +enum virtio_vsock_type { > + VIRTIO_VSOCK_TYPE_STREAM = 1, > +}; > + > +enum virtio_vsock_op { > + VIRTIO_VSOCK_OP_INVALID = 0, > + > + /* Connect operations */ > + VIRTIO_VSOCK_OP_REQUEST = 1, > + VIRTIO_VSOCK_OP_RESPONSE = 2, > + VIRTIO_VSOCK_OP_RST = 3, > + VIRTIO_VSOCK_OP_SHUTDOWN = 4, > + > + /* To send payload */ > + VIRTIO_VSOCK_OP_RW = 5, > + > + /* Tell the peer our credit info */ > + VIRTIO_VSOCK_OP_CREDIT_UPDATE = 6, > + /* Request the peer to send the credit info to us */ > + VIRTIO_VSOCK_OP_CREDIT_REQUEST...
2015 Dec 10
1
[PATCH v3 1/4] VSOCK: Introduce virtio-vsock-common.ko
...__le32 fwd_cnt; > +}; > + > +enum virtio_vsock_type { > + VIRTIO_VSOCK_TYPE_STREAM = 1, > +}; > + > +enum virtio_vsock_op { > + VIRTIO_VSOCK_OP_INVALID = 0, > + > + /* Connect operations */ > + VIRTIO_VSOCK_OP_REQUEST = 1, > + VIRTIO_VSOCK_OP_RESPONSE = 2, > + VIRTIO_VSOCK_OP_RST = 3, > + VIRTIO_VSOCK_OP_SHUTDOWN = 4, > + > + /* To send payload */ > + VIRTIO_VSOCK_OP_RW = 5, > + > + /* Tell the peer our credit info */ > + VIRTIO_VSOCK_OP_CREDIT_UPDATE = 6, > + /* Request the peer to send the credit info to us */ > + VIRTIO_VSOCK_OP_CREDIT_REQUEST...
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
...REAM or SOCK_DGRAM */ + __le16 type; + /* operations of the pkt */ + __le16 op; + __le32 flags; + __le32 buf_alloc; + __le32 fwd_cnt; +}; + +enum { + VIRTIO_VSOCK_OP_INVALID = 0, + + /* Connect operations */ + VIRTIO_VSOCK_OP_REQUEST = 1, + VIRTIO_VSOCK_OP_RESPONSE = 2, + VIRTIO_VSOCK_OP_ACK = 3, + VIRTIO_VSOCK_OP_RST = 4, + VIRTIO_VSOCK_OP_SHUTDOWN = 5, + + /* To send payload */ + VIRTIO_VSOCK_OP_RW = 6, + + /* Tell the peer our credit info */ + VIRTIO_VSOCK_OP_CREDIT_UPDATE = 7, + /* Request the peer to send the credit info to us */ + VIRTIO_VSOCK_OP_CREDIT_REQUEST = 8, +}; + +#endif /* _UAPI_LINUX_VIRTIO_VSOC...
2016 Apr 01
7
[RFC v5 0/5] Add virtio transport for AF_VSOCK
This series is based on Michael Tsirkin's vhost branch (v4.5-rc6). I'm about to process Claudio Imbrenda's locking fixes for virtio-vsock but first I want to share the latest version of the code. Several people are playing with vsock now so sharing the latest code should avoid duplicate work. v5: * Transport reset event for live migration support * Reorder virtqueues, drop unused
2016 Apr 01
7
[RFC v5 0/5] Add virtio transport for AF_VSOCK
This series is based on Michael Tsirkin's vhost branch (v4.5-rc6). I'm about to process Claudio Imbrenda's locking fixes for virtio-vsock but first I want to share the latest version of the code. Several people are playing with vsock now so sharing the latest code should avoid duplicate work. v5: * Transport reset event for live migration support * Reorder virtqueues, drop unused
2016 Dec 07
0
[PATCH v2 1/4] vsock: track pkt owner vsock
...4,7 @@ virtio_transport_stream_enqueue(struct vsock_sock *vsk, .type = VIRTIO_VSOCK_TYPE_STREAM, .msg = msg, .pkt_len = len, + .vsk = vsk, }; return virtio_transport_send_pkt_info(vsk, &info); @@ -581,6 +586,7 @@ static int virtio_transport_reset(struct vsock_sock *vsk, .op = VIRTIO_VSOCK_OP_RST, .type = VIRTIO_VSOCK_TYPE_STREAM, .reply = !!pkt, + .vsk = vsk, }; /* Send RST only if the original pkt is not a RST pkt */ @@ -826,6 +832,7 @@ virtio_transport_send_response(struct vsock_sock *vsk, .remote_cid = le32_to_cpu(pkt->hdr.src_cid), .remote_port = le32_to_cpu(pkt-&...
2016 Dec 08
0
[PATCH v3 1/4] vsock: track pkt owner vsock
...4,7 @@ virtio_transport_stream_enqueue(struct vsock_sock *vsk, .type = VIRTIO_VSOCK_TYPE_STREAM, .msg = msg, .pkt_len = len, + .vsk = vsk, }; return virtio_transport_send_pkt_info(vsk, &info); @@ -581,6 +586,7 @@ static int virtio_transport_reset(struct vsock_sock *vsk, .op = VIRTIO_VSOCK_OP_RST, .type = VIRTIO_VSOCK_TYPE_STREAM, .reply = !!pkt, + .vsk = vsk, }; /* Send RST only if the original pkt is not a RST pkt */ @@ -826,6 +832,7 @@ virtio_transport_send_response(struct vsock_sock *vsk, .remote_cid = le32_to_cpu(pkt->hdr.src_cid), .remote_port = le32_to_cpu(pkt-&...
2016 Dec 12
0
[PATCH v4 1/4] vsock: track pkt owner vsock
...4,7 @@ virtio_transport_stream_enqueue(struct vsock_sock *vsk, .type = VIRTIO_VSOCK_TYPE_STREAM, .msg = msg, .pkt_len = len, + .vsk = vsk, }; return virtio_transport_send_pkt_info(vsk, &info); @@ -581,6 +586,7 @@ static int virtio_transport_reset(struct vsock_sock *vsk, .op = VIRTIO_VSOCK_OP_RST, .type = VIRTIO_VSOCK_TYPE_STREAM, .reply = !!pkt, + .vsk = vsk, }; /* Send RST only if the original pkt is not a RST pkt */ @@ -826,6 +832,7 @@ virtio_transport_send_response(struct vsock_sock *vsk, .remote_cid = le32_to_cpu(pkt->hdr.src_cid), .remote_port = le32_to_cpu(pkt-&...
2017 Mar 01
0
[PATCH-v4-RESEND 1/4] vsock: track pkt owner vsock
...3,7 @@ virtio_transport_stream_enqueue(struct vsock_sock *vsk, .type = VIRTIO_VSOCK_TYPE_STREAM, .msg = msg, .pkt_len = len, + .vsk = vsk, }; return virtio_transport_send_pkt_info(vsk, &info); @@ -580,6 +585,7 @@ static int virtio_transport_reset(struct vsock_sock *vsk, .op = VIRTIO_VSOCK_OP_RST, .type = VIRTIO_VSOCK_TYPE_STREAM, .reply = !!pkt, + .vsk = vsk, }; /* Send RST only if the original pkt is not a RST pkt */ @@ -825,6 +831,7 @@ virtio_transport_send_response(struct vsock_sock *vsk, .remote_cid = le64_to_cpu(pkt->hdr.src_cid), .remote_port = le32_to_cpu(pkt-&...
2019 Mar 06
0
[PATCH] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
...cumentation/process/submitting-patches.rst Chapter 11 for details on the Developer's Certificate of Origin). > static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) > { > + const struct virtio_transport *t; > struct virtio_vsock_pkt_info info = { > .op = VIRTIO_VSOCK_OP_RST, > .type = le16_to_cpu(pkt->hdr.type), > @@ -680,7 +681,11 @@ static int virtio_transport_reset_no_sock(struct virtio_vsock_pkt *pkt) > if (!pkt) > return -ENOMEM; > > - return virtio_transport_get_ops()->send_pkt(pkt); > + t = virtio_transport_get_ops(); > +...