[PATCH net-next v3] virtio-net: ethtool configurable RXCSUM

2020-10-11 Thread xiangxia . m . yue
From: Tonghao Zhang Allow user configuring RXCSUM separately with ethtool -K, reusing the existing virtnet_set_guest_offloads helper that configures RXCSUM for XDP. This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. If Rx checksum is disabled, LRO should also be disabled. Cc: Michael S.

[PATCH net-next v2] virtio-net: ethtool configurable RXCSUM

2020-09-29 Thread xiangxia . m . yue
From: Tonghao Zhang Allow user configuring RXCSUM separately with ethtool -K, reusing the existing virtnet_set_guest_offloads helper that configures RXCSUM for XDP. This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. If Rx checksum is disabled, LRO should also be disabled. Cc: Michael S.

[PATCH net v2] virtio-net: don't disable guest csum when disable LRO

2020-09-28 Thread xiangxia . m . yue
From: Tonghao Zhang Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: a02e8964eaf9 ("virtio-net: ethtool configurable LRO") Cc: Michael S.

[PATCH 1/2] virtio-net: don't disable guest csum when disable LRO

2020-09-27 Thread xiangxia . m . yue
From: Tonghao Zhang Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: e59ff2c49ae1 ("virtio-net: disable guest csum during XDP set") Cc:

[PATCH 2/2] virtio-net: ethtool configurable RXCSUM

2020-09-27 Thread xiangxia . m . yue
From: Tonghao Zhang Allow user configuring RXCSUM separately with ethtool -K, reusing the existing virtnet_set_guest_offloads helper that configures RXCSUM for XDP. This is conditional on VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. Cc: Michael S. Tsirkin Cc: Jason Wang Signed-off-by: Tonghao Zhang ---

[REBASE PATCH net-next v9 4/4] net: vhost: add rx busy polling in tx path

2018-09-25 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the netperf to test throughput and mean latency. When running the tests, the

[REBASE PATCH net-next v9 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-09-25 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. To avoid duplicate codes, introduce the helper functions: * sock_has_rx_data(changed from sk_has_rx_data)

[REBASE PATCH net-next v9 2/4] net: vhost: replace magic number of lock annotation

2018-09-25 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[REBASE PATCH net-next v9 1/4] net: vhost: lock the vqs one by one

2018-09-25 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 24 +++- 1

[REBASE PATCH net-next v9 0/4] net: vhost: improve performance when enable busyloop

2018-09-25 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4 Tonghao Zhang (4): net: vhost: lock the vqs one by one net: vhost:

[PATCH net-next v9 4/6] net: vhost: add rx busy polling in tx path

2018-09-09 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the netperf to test throughput and mean latency. When running the tests, the

[PATCH net-next v9 3/6] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-09-09 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. To avoid duplicate codes, introduce the helper functions: * sock_has_rx_data(changed from sk_has_rx_data)

[PATCH net-next v9 2/6] net: vhost: replace magic number of lock annotation

2018-09-09 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[PATCH net-next v9 1/6] net: vhost: lock the vqs one by one

2018-09-09 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 24 +++- 1

[PATCH net-next v9 0/6] net: vhost: improve performance when enable busyloop

2018-09-09 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4, 5, 6 Tonghao Zhang (6): net: vhost: lock the vqs one by one net:

[PATCH net-next v8 7/7] net: vhost: make busyloop_intr more accurate

2018-08-19 Thread xiangxia . m . yue
From: Tonghao Zhang The patch uses vhost_has_work_pending() to check if the specified handler is scheduled, because in the most case, vhost_has_work() return true when other side handler is added to worker list. Use the vhost_has_work_pending() insead of vhost_has_work(). Topology: [Host]

[PATCH net-next v8 6/7] net: vhost: disable rx wakeup during tx busypoll

2018-08-19 Thread xiangxia . m . yue
From: Tonghao Zhang In the handle_tx, the busypoll will vhost_net_disable/enable_vq because we have poll the sock. This can improve performance. This is suggested by Toshiaki Makita and Jason Wang. If the rx handle is scheduled, we will not enable vq, because it's not necessary. We do it not

[PATCH net-next v8 5/7] net: vhost: introduce bitmap for vhost_poll

2018-08-19 Thread xiangxia . m . yue
From: Tonghao Zhang The bitmap of vhost_dev can help us to check if the specified poll is scheduled. This patch will be used for next two patches. Signed-off-by: Tonghao Zhang --- drivers/vhost/net.c | 11 +-- drivers/vhost/vhost.c | 17 +++-- drivers/vhost/vhost.h | 7

[PATCH net-next v8 4/7] net: vhost: add rx busy polling in tx path

2018-08-19 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the netperf to test throughput and mean latency. When running the tests, the

[PATCH net-next v8 3/7] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-08-19 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. To avoid duplicate codes, introduce the helper functions: * sock_has_rx_data(changed from sk_has_rx_data)

[PATCH net-next v8 2/7] net: vhost: replace magic number of lock annotation

2018-08-19 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[PATCH net-next v8 1/7] net: vhost: lock the vqs one by one

2018-08-19 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 24 +++- 1

[PATCH net-next v8 0/7] net: vhost: improve performance when enable busyloop

2018-08-19 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4, 6, 7 Tonghao Zhang (7): net: vhost: lock the vqs one by one net:

[PATCH net-next v7 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-07-31 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. In the handle_tx, the busypoll will vhost_net_disable/enable_vq because we have poll the sock. This can

[PATCH net-next v7 4/4] net: vhost: add rx busy polling in tx path

2018-07-31 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the netperf to test throughput and mean latency. When running the tests, the

[PATCH net-next v7 1/4] net: vhost: lock the vqs one by one

2018-07-31 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 24 +++- 1

[PATCH net-next v7 2/4] net: vhost: replace magic number of lock annotation

2018-07-31 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[PATCH net-next v7 0/4] net: vhost: improve performance when enable busyloop

2018-07-31 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4. v6->v7: fix issue and rebase codes: 1. on tx, busypoll will

[PATCH net-next v6 4/4] net: vhost: add rx busy polling in tx path

2018-07-21 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the netperf to test throughput and mean latency. When running the tests, the

[PATCH net-next v6 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-07-21 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. Signed-off-by: Tonghao Zhang --- drivers/vhost/net.c | 114

[PATCH net-next v6 2/4] net: vhost: replace magic number of lock annotation

2018-07-21 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[PATCH net-next v6 1/4] net: vhost: lock the vqs one by one

2018-07-21 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 24 +++- 1

[PATCH net-next v6 0/4] net: vhost: improve performance when enable busyloop

2018-07-21 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4. v5->v6: rebase the codes. Tonghao Zhang (4): net: vhost: lock the vqs

[PATCH net-next v5 4/4] net: vhost: add rx busy polling in tx path

2018-07-03 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the iperf3 to test its bandwidth, use the netperf to test throughput

[PATCH net-next v5 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-07-03 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. Signed-off-by: Tonghao Zhang --- drivers/vhost/net.c | 94

[PATCH net-next v5 2/4] net: vhost: replace magic number of lock annotation

2018-07-03 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[PATCH net-next v5 0/4] net: vhost: improve performance when enable busyloop

2018-07-03 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4. v4 -> v5: fix some issues v3 -> v4: fix some issues v2 ->

[PATCH net-next v5 1/4] net: vhost: lock the vqs one by one

2018-07-03 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 24 +++- 1

[PATCH net-next v4 4/4] net: vhost: add rx busy polling in tx path

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the iperf3 to test its bandwidth, use the netperf to test throughput

[PATCH net-next v4 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for in tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. Signed-off-by: Tonghao Zhang --- drivers/vhost/net.c | 94

[PATCH net-next v4 2/4] net: vhost: replace magic number of lock annotation

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index

[PATCH net-next v4 1/4] vhost: lock the vqs one by one

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang Acked-by: Jason Wang Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 24 +++- 1

[PATCH net-next v4 0/4] net: vhost: improve performance when enable busyloop

2018-07-02 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For more performance report, see patch 4. v3 -> v4: fix some issues v2 -> v3: This patches are

[PATCH net-next v3 4/4] net: vhost: add rx busy polling in tx path

2018-06-30 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. We set the poll-us=100us and use the iperf3 to test its bandwidth, use the netperf to test throughput

[PATCH net-next v3 3/4] net: vhost: factor out busy polling logic to vhost_net_busy_poll()

2018-06-30 Thread xiangxia . m . yue
From: Tonghao Zhang Factor out generic busy polling logic and will be used for tx path in the next patch. And with the patch, qemu can set differently the busyloop_timeout for rx queue. Signed-off-by: Tonghao Zhang --- drivers/vhost/net.c | 92

[PATCH net-next v3 2/4] net: vhost: replace magic number of lock annotation

2018-06-30 Thread xiangxia . m . yue
From: Tonghao Zhang Use the VHOST_NET_VQ_XXX as a subclass for mutex_lock_nested. Signed-off-by: Tonghao Zhang --- drivers/vhost/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index e7cf7d2..62bb8e8 100644 ---

[PATCH net-next v3 1/4] net: vhost: lock the vqs one by one

2018-06-30 Thread xiangxia . m . yue
From: Tonghao Zhang This patch changes the way that lock all vqs at the same, to lock them one by one. It will be used for next patch to avoid the deadlock. Signed-off-by: Tonghao Zhang --- drivers/vhost/vhost.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-)

[PATCH net-next v3 0/4] net: vhost: improve performance when enable busyloop

2018-06-30 Thread xiangxia . m . yue
From: Tonghao Zhang This patches improve the guest receive and transmit performance. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. This patches are splited from previous big patch: http://patchwork.ozlabs.org/patch/934673/ For more

[PATCH net-next v2] net: vhost: improve performance when enable busyloop

2018-06-25 Thread xiangxia . m . yue
From: Tonghao Zhang This patch improves the guest receive performance from host. On the handle_tx side, we poll the sock receive queue at the same time. handle_rx do that in the same way. For avoiding deadlock, change the code to lock the vq one by one and use the VHOST_NET_VQ_XX as a subclass