Net patches
The following changes since commit e95edefbd0559e1d0aa09549641b5d9af1f96fac:
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-migration-2.4-tag' into staging (2015-08-03 17:33:35 +0100)
are available in the git repository at:
git://github.com/stefanha/qemu.git tags/net-pull-request
for you to fetch changes up to 8887f84c54f6e74124544d1700a205e5b6821b3d:
tests: test rx recovery from cont (2015-08-04 09:41:28 +0100)
----------------------------------------------------------------
----------------------------------------------------------------
Dana Rubin (1):
net/vmxnet3: Fix incorrect debug message
Jason Wang (2):
tests: introduce basic pci test for virtio-net
tests: test rx recovery from cont
hw/net/vmxnet3.c | 4 +- tests/Makefile | 2 +- tests/virtio-net-test.c | 237 ++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 233 insertions(+), 10 deletions(-)
Signature · 1 line
2.4.3
[Qemu-devel] [PULL 1/3] net/vmxnet3: Fix incorrect debug message
From: Dana Rubin <[email protected]>
From: Dana Rubin <[email protected]>
In commit 80da311d81,
"net/vmxnet3: Fix RX TCP/UDP checksum on partially summed packets"
a debug message was introduced in vmxnet3_rx_need_csum_calculate() for an unlikely input condition.
The message accidentally printed 'len' variable instead of 'pkt_len'. Fix, providing the correct argument.
Message-id: 1438109090-18957-1-git-send-email-shmulik.ladkani@ravellosystems.com
--- hw/net/vmxnet3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/net/vmxnet3.c +2 -2
@@ -927,9 +927,9 @@ static void vmxnet3_rx_need_csum_calculate(struct VmxnetRxPkt *pkt,/* Validate packet len: csum_start + scum_offset + length of csum field */ if (pkt_len < (vhdr->csum_start + vhdr->csum_offset +2 )) { -VMW_PKPRN ("packet len:%d < csum_start(%d) + csum_offset(%d) + 2, " +VMW_PKPRN ("packet len:%lu < csum_start(%d) + csum_offset(%d) + 2, " "cannot calculate checksum" , - len, vhdr->csum_start, vhdr->csum_offset); + pkt_len, vhdr->csum_start, vhdr->csum_offset);return ; }
Signature · 1 line
2.4.3
[Qemu-devel] [PULL 2/3] tests: introduce basic pci test for virtio-net
In reply to Stefan HajnocziFrom: Jason Wang <[email protected]>
Message-id: [email protected]
--- tests/Makefile | 2 +- tests/virtio-net-test.c | 185 ++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 179 insertions(+), 8 deletions(-)
tests/Makefile +1 -1
@@ -381,7 +381,7 @@ tests/wdt_ib700-test$(EXESUF): tests/wdt_ib700-test.o tests/tco-test$(EXESUF): tests/tco-test.o $(libqos-pc-obj-y) tests/virtio-balloon-test$(EXESUF): tests/virtio-balloon-test.o tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o $(libqos-virtio-obj-y) -tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o $(libqos-pc-obj-y) +tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o $(libqos-pc-obj-y) $(libqos-virtio-obj-y) tests/virtio-rng-test$(EXESUF): tests/virtio-rng-test.o $(libqos-pc-obj-y) tests/virtio-scsi-test$(EXESUF): tests/virtio-scsi-test.o $(libqos-virtio-obj-y) tests/virtio-9p-test$(EXESUF): tests/virtio-9p-test.o
tests/virtio-net-test.c +178 -7
211 lines not on this page · raw message
Signature · 1 line
2.4.3
[Qemu-devel] [PULL 3/3] tests: test rx recovery from cont
In reply to Stefan HajnocziFrom: Jason Wang <[email protected]>
Rx should be recovered after cont.
Message-id: [email protected]
--- tests/virtio-net-test.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+)
tests/virtio-net-test.c +52 -0
@@ -140,6 +140,49 @@ static void tx_test(const QVirtioBus *bus, QVirtioDevice *dev, g_assert_cmpstr(buffer, ==, "TEST"); } +static void rx_stop_cont_test (const QVirtioBus *bus,QVirtioDevice *dev, +QGuestAllocator *alloc,QVirtQueue *vq, +int socket) +{ +uint64_t req_addr; +uint32_t free_head; +char test[] ="TEST" ; +char buffer[64 ]; +int len =htonl (sizeof (test)); +struct iovec iov[] = { + { + .iov_base = &len, + .iov_len =sizeof (len), + }, { + .iov_base = test, + .iov_len =sizeof (test), + }, + }; +int ret; + + req_addr =guest_alloc (alloc,64 ); + + free_head =qvirtqueue_add (vq, req_addr,64 , true, false); +qvirtqueue_kick (bus, dev, vq, free_head); + +qmp ("{ 'execute' : 'stop'}" ); + + ret =iov_send (socket, iov,2 ,0 ,sizeof (len) +sizeof (test)); + g_assert_cmpint(ret, ==, sizeof(test) + sizeof(len)); + +/* We could check the status, but this command is more importantly to +* ensure the packet data gets queued in QEMU, before we do 'cont'. +*/ +qmp ("{ 'execute' : 'query-status'}" ); +qmp ("{ 'execute' : 'cont'}" ); + +qvirtio_wait_queue_isr (bus, dev, vq,QVIRTIO_NET_TIMEOUT_US ); +memread (req_addr +VNET_HDR_SIZE , buffer,sizeof (test)); + g_assert_cmpstr(buffer, ==, "TEST"); + +guest_free (alloc, req_addr); +} +static void send_recv_test (const QVirtioBus *bus,QVirtioDevice *dev,QGuestAllocator *alloc,QVirtQueue *rvq,QVirtQueue *tvq,int socket)
@@ -148,6 +191,13 @@ static void send_recv_test(const QVirtioBus *bus, QVirtioDevice *dev,tx_test (bus, dev, alloc, tvq, socket); } +static void stop_cont_test (const QVirtioBus *bus,QVirtioDevice *dev, +QGuestAllocator *alloc,QVirtQueue *rvq, +QVirtQueue *tvq,int socket) +{ +rx_stop_cont_test (bus, dev, alloc, rvq, socket); +} +static void pci_basic (gconstpointer data) {QVirtioPCIDevice *dev;
@@ -205,6 +255,8 @@ int main(int argc, char **argv)g_test_init (&argc, &argv,NULL );#ifndef _WIN32qtest_add_data_func ("/virtio/net/pci/basic" , send_recv_test, pci_basic); +qtest_add_data_func ("/virtio/net/pci/rx_stop_cont" , + stop_cont_test, pci_basic);#endif qtest_add_func ("/virtio/net/pci/hotplug" , hotplug);
Signature · 1 line
2.4.3
Peter Maydell
AppliedQuoted 6 lines · Stefan Hajnoczi
The following changes since commit
e95edefbd0559e1d0aa09549641b5d9af1f96fac:Merge remote-tracking branch 'remotes/sstabellini/tags/xen-migration-2.4-tag' into staging (2015-08-03 17:33:35 +0100)
are available in the git repository at:
Quoted 8 lines
git://github.com/stefanha/qemu.gittags/net-pull-requestfor you to fetch changes up to
8887f84c54f6e74124544d1700a205e5b6821b3d:tests: test rx recovery from cont (2015-08-04 09:41:28 +0100)
----------------------------------------------------------------
Applied, thanks.
-- PMM