socket: pass correct size in net_socket_send()
Subsystems (2)
PATCH 1/1 socket: pass correct size in net_socket_send()
We should pass the size of packet instead of the remaining to qemu_send_packet_async().
Fixes 6e99c631f116221d169ea53953d91b8aa74d297a
("net/socket: Drop net_socket_can_send")
Signed-off-by Jason Wang <[email protected]>
--- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/socket.c +1 -1
@@ -213,7 +213,7 @@ static void net_socket_send(void *opaque)if (s->index >= s->packet_len) { s->index =0 ; s->state =0 ; -if (qemu_send_packet_async (&s->nc, s->buf, size, +if (qemu_send_packet_async (&s->nc, s->buf, s->packet_len, net_socket_send_completed) ==0 ) {net_socket_read_poll (s, false);break ;
Signature · 1 line
2.1.4
Quoted 7 lines · Jason Wang
We should pass the size of packet instead of the remaining to
qemu_send_packet_async().Fixes 6e99c631f116221d169ea53953d91b8aa74d297a("net/socket: Drop
net_socket_can_send")Signed-off-by Jason Wang <[email protected]>
Thanks!
Reviewed-by Fam Zheng <[email protected]>
Quoted 20 lines
--- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/socket.c +1
-1@@ -213,7 +213,7 @@ static void net_socket_send(void *opaque)if (s->index >= s->packet_len) { s->index =0 ; s->state =0 ; -if (qemu_send_packet_async (&s->nc, s->buf, size, +if (qemu_send_packet_async (&s->nc, s->buf, s->packet_len, net_socket_send_completed) ==0 ) {net_socket_read_poll (s, false);break ;Signature · 1 line
2.1.4
Stefan Hajnoczi
AppliedQuoted 10 lines · Jason Wang
We should pass the size of packet instead of the remaining to
qemu_send_packet_async().Fixes 6e99c631f116221d169ea53953d91b8aa74d297a("net/socket: Drop
net_socket_can_send")Signed-off-by Jason Wang <[email protected]>--- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net
Stefan