* [Qemu-devel] [PULL V2 0/3] Net patches
@ 2016-12-06 2:32 Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 1/3] net: mcf: check receive buffer size register value Jason Wang
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Jason Wang @ 2016-12-06 2:32 UTC (permalink / raw)
To: peter.maydell, stefanha, qemu-devel; +Cc: Jason Wang
The following changes since commit bd8ef5060dd2124a54578241da9a572faf7658dd:
Merge remote-tracking branch 'dgibson/tags/ppc-for-2.8-20161201' into staging (2016-12-01 13:39:29 +0000)
are available in the git repository at:
https://github.com/jasowang/qemu.git tags/net-pull-request
for you to fetch changes up to 9f5832d34b0c155e9538a745c80e441aed257670:
fsl_etsec: Fix various small problems in hexdump code (2016-12-06 10:23:50 +0800)
----------------------------------------------------------------
Changes from V1:
- fix coding style
----------------------------------------------------------------
Andrey Smirnov (2):
fsl_etsec: Pad short payloads with zeros
fsl_etsec: Fix various small problems in hexdump code
Prasad J Pandit (1):
net: mcf: check receive buffer size register value
hw/net/fsl_etsec/etsec.c | 4 ++--
hw/net/fsl_etsec/rings.c | 8 ++++++++
hw/net/mcf_fec.c | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 11+ messages in thread* [Qemu-devel] [PULL V2 1/3] net: mcf: check receive buffer size register value
2016-12-06 2:32 [Qemu-devel] [PULL V2 0/3] Net patches Jason Wang
@ 2016-12-06 2:32 ` Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 2/3] fsl_etsec: Pad short payloads with zeros Jason Wang
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Jason Wang @ 2016-12-06 2:32 UTC (permalink / raw)
To: peter.maydell, stefanha, qemu-devel; +Cc: Prasad J Pandit, Jason Wang
From: Prasad J Pandit <pjp@fedoraproject.org>
ColdFire Fast Ethernet Controller uses a receive buffer size
register(EMRBR) to hold maximum size of all receive buffers.
It is set by a user before any operation. If it was set to be
zero, ColdFire emulator would go into an infinite loop while
receiving data in mcf_fec_receive. Add check to avoid it.
Reported-by: Wjjzhang <wjjzhang@tencent.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/mcf_fec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
index dc61bac..4025eb3 100644
--- a/hw/net/mcf_fec.c
+++ b/hw/net/mcf_fec.c
@@ -393,7 +393,7 @@ static void mcf_fec_write(void *opaque, hwaddr addr,
s->tx_descriptor = s->etdsr;
break;
case 0x188:
- s->emrbr = value & 0x7f0;
+ s->emrbr = value > 0 ? value & 0x7F0 : 0x7F0;
break;
default:
hw_error("mcf_fec_write Bad address 0x%x\n", (int)addr);
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Qemu-devel] [PULL V2 2/3] fsl_etsec: Pad short payloads with zeros
2016-12-06 2:32 [Qemu-devel] [PULL V2 0/3] Net patches Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 1/3] net: mcf: check receive buffer size register value Jason Wang
@ 2016-12-06 2:32 ` Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 3/3] fsl_etsec: Fix various small problems in hexdump code Jason Wang
2016-12-06 10:24 ` [Qemu-devel] [PULL V2 0/3] Net patches Stefan Hajnoczi
3 siblings, 0 replies; 11+ messages in thread
From: Jason Wang @ 2016-12-06 2:32 UTC (permalink / raw)
To: peter.maydell, stefanha, qemu-devel; +Cc: Andrey Smirnov, Jason Wang
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Depending on QEMU network setup it is possible for us to receive a
complete Ethernet packet that is less 64 bytes long. One such example is
when QEMU is configured to use a standalone TAP device (not set to be a
part of any bridge) receives and ARP packet. In cases like that we need
to add more than just 4-bytes of CRC padding and ensure that our payload
is at least 60 bytes long, such that, when combined with CRC padding
bytes the resulting size is at least 802.3 minimum MTU bytes
long (64). Failing to do that results in code in etsec_walk_rx_ring()
setting BD_RX_SH which, in turn, makes corresponding Linux driver of
emulated host to reject buffer as a runt packet
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/fsl_etsec/rings.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/net/fsl_etsec/rings.c b/hw/net/fsl_etsec/rings.c
index 79d2f14..54c0127 100644
--- a/hw/net/fsl_etsec/rings.c
+++ b/hw/net/fsl_etsec/rings.c
@@ -474,6 +474,14 @@ static void rx_init_frame(eTSEC *etsec, const uint8_t *buf, size_t size)
/* CRC padding (We don't have to compute the CRC) */
etsec->rx_padding = 4;
+ /*
+ * Ensure that payload length + CRC length is at least 802.3
+ * minimum MTU size bytes long (64)
+ */
+ if (etsec->rx_buffer_len < 60) {
+ etsec->rx_padding += 60 - etsec->rx_buffer_len;
+ }
+
etsec->rx_first_in_frame = 1;
etsec->rx_remaining_data = etsec->rx_buffer_len;
RING_DEBUG("%s: rx_buffer_len:%u rx_padding+crc:%u\n", __func__,
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Qemu-devel] [PULL V2 3/3] fsl_etsec: Fix various small problems in hexdump code
2016-12-06 2:32 [Qemu-devel] [PULL V2 0/3] Net patches Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 1/3] net: mcf: check receive buffer size register value Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 2/3] fsl_etsec: Pad short payloads with zeros Jason Wang
@ 2016-12-06 2:32 ` Jason Wang
2016-12-06 10:24 ` [Qemu-devel] [PULL V2 0/3] Net patches Stefan Hajnoczi
3 siblings, 0 replies; 11+ messages in thread
From: Jason Wang @ 2016-12-06 2:32 UTC (permalink / raw)
To: peter.maydell, stefanha, qemu-devel; +Cc: Andrey Smirnov, Jason Wang
From: Andrey Smirnov <andrew.smirnov@gmail.com>
Fix various small problems in hexdump code, such as:
- Reference to non-existing field etsec->nic->nc.name is replaced
with nc->name
- Type mismatch warnings
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/fsl_etsec/etsec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
index 951c5f0..fadf9c8 100644
--- a/hw/net/fsl_etsec/etsec.c
+++ b/hw/net/fsl_etsec/etsec.c
@@ -348,8 +348,8 @@ static ssize_t etsec_receive(NetClientState *nc,
eTSEC *etsec = qemu_get_nic_opaque(nc);
#if defined(HEX_DUMP)
- fprintf(stderr, "%s receive size:%d\n", etsec->nic->nc.name, size);
- qemu_hexdump(buf, stderr, "", size);
+ fprintf(stderr, "%s receive size:%zd\n", nc->name, size);
+ qemu_hexdump((void *)buf, stderr, "", size);
#endif
/* Flush is unnecessary as are already in receiving path */
etsec->need_flush = false;
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [Qemu-devel] [PULL V2 0/3] Net patches
2016-12-06 2:32 [Qemu-devel] [PULL V2 0/3] Net patches Jason Wang
` (2 preceding siblings ...)
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 3/3] fsl_etsec: Fix various small problems in hexdump code Jason Wang
@ 2016-12-06 10:24 ` Stefan Hajnoczi
3 siblings, 0 replies; 11+ messages in thread
From: Stefan Hajnoczi @ 2016-12-06 10:24 UTC (permalink / raw)
To: Jason Wang; +Cc: peter.maydell, stefanha, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
On Tue, Dec 06, 2016 at 10:32:29AM +0800, Jason Wang wrote:
> The following changes since commit bd8ef5060dd2124a54578241da9a572faf7658dd:
>
> Merge remote-tracking branch 'dgibson/tags/ppc-for-2.8-20161201' into staging (2016-12-01 13:39:29 +0000)
>
> are available in the git repository at:
>
> https://github.com/jasowang/qemu.git tags/net-pull-request
>
> for you to fetch changes up to 9f5832d34b0c155e9538a745c80e441aed257670:
>
> fsl_etsec: Fix various small problems in hexdump code (2016-12-06 10:23:50 +0800)
>
> ----------------------------------------------------------------
>
> Changes from V1:
> - fix coding style
>
> ----------------------------------------------------------------
> Andrey Smirnov (2):
> fsl_etsec: Pad short payloads with zeros
> fsl_etsec: Fix various small problems in hexdump code
>
> Prasad J Pandit (1):
> net: mcf: check receive buffer size register value
>
> hw/net/fsl_etsec/etsec.c | 4 ++--
> hw/net/fsl_etsec/rings.c | 8 ++++++++
> hw/net/mcf_fec.c | 2 +-
> 3 files changed, 11 insertions(+), 3 deletions(-)
>
>
Thanks, applied to my staging tree:
https://github.com/stefanha/qemu/commits/staging
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] [PULL V2 0/3] Net patches
@ 2016-11-14 2:54 Jason Wang
2016-11-14 6:46 ` Zhang Chen
2016-11-14 16:40 ` Stefan Hajnoczi
0 siblings, 2 replies; 11+ messages in thread
From: Jason Wang @ 2016-11-14 2:54 UTC (permalink / raw)
To: peter.maydell; +Cc: qemu-devel, Jason Wang
The following changes since commit 83c83f9a5266ff113060f887f106a47920fa6974:
Merge remote-tracking branch 'bonzini/tags/for-upstream' into staging (2016-11-11 12:51:50 +0000)
are available in the git repository at:
https://github.com/jasowang/qemu.git tags/net-pull-request
for you to fetch changes up to 73c46860454f8e43d1679d1367552d15a66b7790:
net: fix sending of data with -net socket, listen backend (2016-11-14 10:26:22 +0800)
----------------------------------------------------------------
Changes from V1:
- no change, V1 misses the list
----------------------------------------------------------------
Daniel P. Berrange (1):
net: fix sending of data with -net socket, listen backend
Pavel Dovgalyuk (1):
record/replay: add network support
Yuri Benditovich (1):
net: skip virtio-net config of deleted nic's peers
docs/replay.txt | 14 +++++++
hw/net/virtio-net.c | 4 ++
include/sysemu/replay.h | 12 ++++++
net/Makefile.objs | 1 +
net/filter-replay.c | 92 ++++++++++++++++++++++++++++++++++++++++++
net/net.c | 5 +--
net/socket.c | 1 +
replay/Makefile.objs | 1 +
replay/replay-events.c | 11 +++++
replay/replay-internal.h | 10 +++++
replay/replay-net.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++
replay/replay.c | 2 +-
vl.c | 3 +-
13 files changed, 253 insertions(+), 5 deletions(-)
create mode 100644 net/filter-replay.c
create mode 100644 replay/replay-net.c
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Qemu-devel] [PULL V2 0/3] Net patches
2016-11-14 2:54 Jason Wang
@ 2016-11-14 6:46 ` Zhang Chen
2016-11-15 3:19 ` Jason Wang
2016-11-14 16:40 ` Stefan Hajnoczi
1 sibling, 1 reply; 11+ messages in thread
From: Zhang Chen @ 2016-11-14 6:46 UTC (permalink / raw)
To: Jason Wang, peter.maydell; +Cc: qemu-devel
Hi~ Jason~
Can you pick up this patch?
[PATCH] docs: fix COLO architecture diagram
Thanks
Zhang Chen
On 11/14/2016 10:54 AM, Jason Wang wrote:
> The following changes since commit 83c83f9a5266ff113060f887f106a47920fa6974:
>
> Merge remote-tracking branch 'bonzini/tags/for-upstream' into staging (2016-11-11 12:51:50 +0000)
>
> are available in the git repository at:
>
> https://github.com/jasowang/qemu.git tags/net-pull-request
>
> for you to fetch changes up to 73c46860454f8e43d1679d1367552d15a66b7790:
>
> net: fix sending of data with -net socket, listen backend (2016-11-14 10:26:22 +0800)
>
> ----------------------------------------------------------------
>
> Changes from V1:
> - no change, V1 misses the list
>
> ----------------------------------------------------------------
> Daniel P. Berrange (1):
> net: fix sending of data with -net socket, listen backend
>
> Pavel Dovgalyuk (1):
> record/replay: add network support
>
> Yuri Benditovich (1):
> net: skip virtio-net config of deleted nic's peers
>
> docs/replay.txt | 14 +++++++
> hw/net/virtio-net.c | 4 ++
> include/sysemu/replay.h | 12 ++++++
> net/Makefile.objs | 1 +
> net/filter-replay.c | 92 ++++++++++++++++++++++++++++++++++++++++++
> net/net.c | 5 +--
> net/socket.c | 1 +
> replay/Makefile.objs | 1 +
> replay/replay-events.c | 11 +++++
> replay/replay-internal.h | 10 +++++
> replay/replay-net.c | 102 +++++++++++++++++++++++++++++++++++++++++++++++
> replay/replay.c | 2 +-
> vl.c | 3 +-
> 13 files changed, 253 insertions(+), 5 deletions(-)
> create mode 100644 net/filter-replay.c
> create mode 100644 replay/replay-net.c
>
>
>
>
>
--
Thanks
zhangchen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PULL V2 0/3] Net patches
2016-11-14 2:54 Jason Wang
2016-11-14 6:46 ` Zhang Chen
@ 2016-11-14 16:40 ` Stefan Hajnoczi
2016-11-15 3:22 ` Jason Wang
1 sibling, 1 reply; 11+ messages in thread
From: Stefan Hajnoczi @ 2016-11-14 16:40 UTC (permalink / raw)
To: Jason Wang; +Cc: peter.maydell, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
On Mon, Nov 14, 2016 at 10:54:23AM +0800, Jason Wang wrote:
> Pavel Dovgalyuk (1):
> record/replay: add network support
QEMU is in soft freeze. The policy has changed this release and only
bug fixes are being accepted during soft freeze. Please don't include
new features.
http://qemu-project.org/Planning/SoftFeatureFreeze
Please submit a new version without this patch or explain why it is a
necessary bug fix for -rc0.
Thanks,
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] [PULL v2 0/3] Net patches
@ 2013-10-18 16:38 Stefan Hajnoczi
0 siblings, 0 replies; 11+ messages in thread
From: Stefan Hajnoczi @ 2013-10-18 16:38 UTC (permalink / raw)
To: qemu-devel; +Cc: Stefan Hajnoczi, Anthony Liguori
v2:
* Dropped multicast MAC patch due to issues pointed out by Amos
The following changes since commit 1680d485777ecf436d724631ea8722cc0c66990e:
Merge remote-tracking branch 'rth/tcg-ldst-6' into staging (2013-10-14 09:59:59 -0700)
are available in the git repository at:
git://github.com/stefanha/qemu.git net
for you to fetch changes up to 23c37c37f0280761072c23bf67d3a4f3c0ff25aa:
net/rtl8139: update network information when macaddr is changed in guest (2013-10-18 13:28:09 +0200)
----------------------------------------------------------------
Amos Kong (3):
net: update nic info during device reset
net/e1000: update network information when macaddr is changed in guest
net/rtl8139: update network information when macaddr is changed in guest
hw/net/e1000.c | 9 +++++++++
hw/net/rtl8139.c | 7 ++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-12-06 10:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-06 2:32 [Qemu-devel] [PULL V2 0/3] Net patches Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 1/3] net: mcf: check receive buffer size register value Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 2/3] fsl_etsec: Pad short payloads with zeros Jason Wang
2016-12-06 2:32 ` [Qemu-devel] [PULL V2 3/3] fsl_etsec: Fix various small problems in hexdump code Jason Wang
2016-12-06 10:24 ` [Qemu-devel] [PULL V2 0/3] Net patches Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2016-11-14 2:54 Jason Wang
2016-11-14 6:46 ` Zhang Chen
2016-11-15 3:19 ` Jason Wang
2016-11-14 16:40 ` Stefan Hajnoczi
2016-11-15 3:22 ` Jason Wang
2013-10-18 16:38 [Qemu-devel] [PULL v2 " Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).