Re: [PATCH net] Revert "vhost: cache used event for better performance"

2017-07-26 Thread Christian Borntraeger
On 07/26/2017 10:03 AM, Jason Wang wrote: > This reverts commit 809ecb9bca6a9424ccd392d67e368160f8b76c92. Since it > was reported to break vhost_net. We want to cache used event and use > it to check for notification. We try to valid cached used event by > checking whether or not it was ahead of

Re: [Patch net] tap: convert a mutex to a spinlock

2017-07-06 Thread Christian Borntraeger
On 07/05/2017 10:50 PM, Cong Wang wrote: > We are not allowed to block on the RCU reader side, so can't > just hold the mutex as before. As a quick fix, convert it to > a spinlock. > > Fixes: d9f1f61c0801 ("tap: Extending tap device create/destroy APIs") > Report

locking issues in macvtap (looks like due to tap: Extending tap device create/destroy APIs)

2017-07-03 Thread Christian Borntraeger
Sainath, with rcu debugging and lock debugging I get the following splats. I think doing a mutex_lock while in an rcu read-side is not allowed, since mutex_lock can sleep. This is in 4.11 and 4.12 and seems to be introduced with commit d9f1f61c0801a7("tap: Extending tap device create/destroy

Re: rhashtable - Cap total number of entries to 2^31

2017-04-28 Thread Christian Borntraeger
On 04/28/2017 01:31 PM, Herbert Xu wrote: > On Fri, Apr 28, 2017 at 12:23:15PM +0200, Christian Borntraeger wrote: >> >> I can reproduce this boot failure on s390 bisected to >> commit 6d684e54690caef45cf14051ddeb7c71beeb681b >>rhashtable: Cap total number of entri

Re: rhashtable - Cap total number of entries to 2^31

2017-04-28 Thread Christian Borntraeger
On 04/28/2017 12:21 AM, Florian Fainelli wrote: > On 04/27/2017 02:16 PM, Florian Fainelli wrote: >> Hi Herbert, >> >> On 04/26/2017 10:44 PM, Herbert Xu wrote: >>> On Tue, Apr 25, 2017 at 10:48:22AM -0400, David Miller wrote: From: Florian Westphal Date: Tue, 25 Apr

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-03 Thread Christian Borntraeger
On 03/02/2017 10:45 PM, Arnd Bergmann wrote: > On Thu, Mar 2, 2017 at 8:00 PM, Christian Borntraeger > <borntrae...@de.ibm.com> wrote: >> On 03/02/2017 06:55 PM, Arnd Bergmann wrote: >>> On Thu, Mar 2, 2017 at 5:51 PM, Christian Borntraeger >>> <borntrae...@d

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-02 Thread Christian Borntraeger
On 03/02/2017 06:55 PM, Arnd Bergmann wrote: > On Thu, Mar 2, 2017 at 5:51 PM, Christian Borntraeger > <borntrae...@de.ibm.com> wrote: >> On 03/02/2017 05:38 PM, Arnd Bergmann wrote: >>> >>> This attempts a rewrite of the two macros, using a simpler impleme

Re: [PATCH 02/26] rewrite READ_ONCE/WRITE_ONCE

2017-03-02 Thread Christian Borntraeger
On 03/02/2017 05:38 PM, Arnd Bergmann wrote: > When CONFIG_KASAN is enabled, the READ_ONCE/WRITE_ONCE macros cause > rather large kernel stacks, e.g.: > > mm/vmscan.c: In function 'shrink_page_list': > mm/vmscan.c:1333:1: error: the frame size of 3456 bytes is larger than 3072 > bytes

Re: [PATCH net-next] virtio: Fix affinity for >32 VCPUs

2017-02-06 Thread Christian Borntraeger
On 02/03/2017 07:19 AM, Ben Serebrin wrote: [...] > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1502,20 +1502,44 @@ static void virtnet_set_affinity(struct virtnet_info > *vi) >* queue pairs, we let the queue pairs to be private to one cpu by >* setting

Re: [PATCH 5/6] treewide: use kv[mz]alloc* rather than opencoded variants

2017-01-12 Thread Christian Borntraeger
) > - keys = vmalloc(sizeof(uint8_t) * args->count); > + keys = kvmalloc(sizeof(uint8_t) * args->count, GFP_KERNEL); > if (!keys) > return -ENOMEM; KVM/s390 parts Acked-by: Christian Borntraeger <borntrae...@de.ibm.com>

Re: [PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()

2016-11-25 Thread Christian Borntraeger
On 11/25/2016 10:08 PM, Michael S. Tsirkin wrote: > On Fri, Nov 25, 2016 at 05:49:45PM +0100, Christian Borntraeger wrote: >> On 11/25/2016 05:17 PM, Peter Zijlstra wrote: >>> On Fri, Nov 25, 2016 at 04:10:04PM +, Mark Rutland wrote: >>>> On Fri, Nov 25, 2016 at 0

Re: [PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()

2016-11-25 Thread Christian Borntraeger
On 11/25/2016 06:28 PM, Mark Rutland wrote: > On Fri, Nov 25, 2016 at 05:49:45PM +0100, Christian Borntraeger wrote: >> On 11/25/2016 05:17 PM, Peter Zijlstra wrote: >>> On Fri, Nov 25, 2016 at 04:10:04PM +, Mark Rutland wrote: >>>> On Fri, Nov 25, 2016 at 04:21:3

Re: [PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()

2016-11-25 Thread Christian Borntraeger
On 11/25/2016 05:17 PM, Peter Zijlstra wrote: > On Fri, Nov 25, 2016 at 04:10:04PM +, Mark Rutland wrote: >> On Fri, Nov 25, 2016 at 04:21:39PM +0100, Dmitry Vyukov wrote: > >>> What are use cases for such primitive that won't be OK with "read once >>> _and_ atomically"? >> >> I have none to

Re: [PATCH 0/3] virtio/vringh: kill off ACCESS_ONCE()

2016-11-25 Thread Christian Borntraeger
On 11/25/2016 12:22 PM, Mark Rutland wrote: > On Thu, Nov 24, 2016 at 10:36:58PM +0200, Michael S. Tsirkin wrote: >> On Thu, Nov 24, 2016 at 10:25:11AM +, Mark Rutland wrote: >>> For several reasons, it would be beneficial to kill off ACCESS_ONCE() >>> tree-wide, in favour of

Re: [PATCH 2/3] vringh: kill off ACCESS_ONCE()

2016-11-24 Thread Christian Borntraeger
_cpu(vrh, READ_ONCE(*p)); > return 0; > } > > static inline int putu16_kern(const struct vringh *vrh, __virtio16 *p, u16 > val) > { > - ACCESS_ONCE(*p) = cpu_to_vringh16(vrh, val); > + WRITE_ONCE(*p, cpu_to_vringh16(vrh, val)); > return 0; > } > Makes sense Reviewed-by: Christian Borntraeger <borntrae...@de.ibm.com>

Re: [PATCH V3 3/3] vhost_net: basic polling support

2016-02-28 Thread Christian Borntraeger
On 02/26/2016 09:42 AM, Jason Wang wrote: > This patch tries to poll for new added tx buffer or socket receive > queue for a while at the end of tx/rx processing. The maximum time > spent on polling were specified through a new kind of vring ioctl. > > Signed-off-by: Jason Wang

Re: [PATCH v2] vhost: replace % with & on data path

2015-11-30 Thread Christian Borntraeger
On 11/30/2015 10:15 AM, Michael S. Tsirkin wrote: > We know vring num is a power of 2, so use & > to mask the high bits. Makes a lot of sense and virtio_ring.c seems to use the same logic. Acked-by: Christian Borntraeger <borntrae...@de.ibm.com> > > Signed-off-by:

Re: 4.4-rc1 errors on bridge/macvtap interfaces (maybe commit 0bc05d58 switchdev: allow caller to exp...).

2015-11-16 Thread Christian Borntraeger
On 11/16/2015 02:25 PM, Jiri Pirko wrote: > Mon, Nov 16, 2015 at 02:19:55PM CET, mkube...@suse.cz wrote: >> On Mon, Nov 16, 2015 at 02:00:32PM +0100, Christian Borntraeger wrote: >>> >>> on 4.4-rc1 running on an s390x box (so qeth OSA network cards as real N

4.4-rc1 errors on bridge/macvtap interfaces (maybe commit 0bc05d58 switchdev: allow caller to exp...).

2015-11-16 Thread Christian Borntraeger
Jiri, on 4.4-rc1 running on an s390x box (so qeth OSA network cards as real NICs) I get errors like: [ 10.940523] Ebtables v2.0 registered [ 11.685609] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this. [

Re: 4.4-rc1 errors on bridge/macvtap interfaces (maybe commit 0bc05d58 switchdev: allow caller to exp...).

2015-11-16 Thread Christian Borntraeger
On 11/16/2015 02:19 PM, Michal Kubecek wrote: > On Mon, Nov 16, 2015 at 02:00:32PM +0100, Christian Borntraeger wrote: >> >> on 4.4-rc1 running on an s390x box (so qeth OSA network cards as real NICs) >> I get errors like: >> >> [ 10.940523] Ebtables v2.0 re

[PATCH 0/1] macvtap regression since 3.18

2015-09-18 Thread Christian Borntraeger
than sorry as we dont want to rely on the implementation of macros. Opinions? Christian Borntraeger (1): macvtap: Fix regression for macvtap ioctls drivers/net/macvtap.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.3.0 -- To unsubscribe from this list: send the line &q

[PATCH 1/1] macvtap: Fix regression for macvtap ioctls

2015-09-18 Thread Christian Borntraeger
net> Reported-by: Mark A. Peloquin Bisected-by: Matthew Rosato <mjros...@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com> Fixes: 39ec7de7092b ("macvtap: fix uninitialized access on TUNSETIFF") Cc: sta...@vger.kernel.org --- drivers/net/macvtap.c

Re: [PATCH] macvtap: fix TUNSETSNDBUF values > 64k

2015-09-18 Thread Christian Borntraeger
x uninitialized access on TUNSETIFF") > Reported-by: Mark A. Peloquin > Bisected-by: Matthew Rosato <mjros...@linux.vnet.ibm.com> > Reported-by: Christian Borntraeger <borntrae...@de.ibm.com> > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> You can add Tested-b

Re: [PATCH RFC] tun, macvtap: higher order allocations for skbs

2015-06-18 Thread Christian Borntraeger
Am 18.06.2015 um 12:20 schrieb Michael S. Tsirkin: Needs more testing. Anyone see anything wrong with this? Can you explain the motivation? FWIW, basic networking between two guest over macvtap still seems to work on s390 so I dont see any obvious regression. Christian Signed-off-by:

[PATCH resend] virtio_net: Fix oops on early interrupts - introduced by virtio reset code

2008-02-18 Thread Christian Borntraeger
-priv before we call try_fill_recv. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] Acked-by: Anthony Liguori [EMAIL PROTECTED] --- drivers/net/virtio_net.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: kvm/drivers/net/virtio_net.c

[PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code

2008-02-11 Thread Christian Borntraeger
-priv before we call try_fill_recv. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] Acked-by: Anthony Liguori [EMAIL PROTECTED] --- drivers/net/virtio_net.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: kvm/drivers/net/virtio_net.c

[PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code

2008-02-11 Thread Christian Borntraeger
] cpu_idle+0x21a/0x230 We must initialize vdev-priv before we use the notify hypercall as vdev-priv is used in skb_recv_done. So lets move the assignment of vdev-priv before we call try_fill_recv. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] --- drivers/net/virtio_net.c |2 +- 1

[PATCH] virtio_net: Fix open - interrupt race

2008-02-05 Thread Christian Borntraeger
by using netif_rx_schedule_prep in the same way as skb_recv_done. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] --- drivers/net/virtio_net.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) Index: kvm/drivers/net/virtio_net.c

[PATCH] virtio_net: Fix open - interrupt race

2008-02-05 Thread Christian Borntraeger
, as interrupts were already disabled by cpu 2. I think the proper solution is to make the call to disable_cb depend on the atomic update of NAPI_STATE_SCHED by using netif_rx_schedule_prep in the same way as skb_recv_done. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] Acked-by: Rusty Russell [EMAIL

Re: virtio_net and SMP guests

2008-01-10 Thread Christian Borntraeger
Am Donnerstag, 10. Januar 2008 schrieb Christian Borntraeger: Am Donnerstag, 10. Januar 2008 schrieb Christian Borntraeger: Am Dienstag, 18. Dezember 2007 schrieb Rusty Russell: To me this points to doing interrupt suppression a different way. If we have a -disable_cb() virtio function

Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-13 Thread Christian Borntraeger
Am Donnerstag, 13. Dezember 2007 schrieb Dor Laor: You're right I got confused somehow. So in that case setting the driver status field on open in addition to your enable will do the trick. On DRIVER_OPEN the host will trigger an interrupt if the queue is not empty.. Thanks, Dor After

Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: This is why initially I suggested another status code in order to split the ring logic with driver status. but also not filling any buffers as long as VIRTIO_CONFIG_DEV_OPEN is not set. I will have a look but I think that add_status needs

Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Rusty Russell: On Wednesday 12 December 2007 00:16:12 Christian Borntraeger wrote: That would also work. We already have VRING_AVAIL_F_NO_INTERRUPT in virtio_ring.c - maybe we can use that. Its hidden in callback and restart handling, what about adding

Re: [kvm-devel] [virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -406,10 +405,10 @@ again: Hmm, while I agree in general with the patch, I fail to find the proper version of virtio_net where this patch applies. I tried kvm.git and

Re: [kvm-devel] [virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: Christian Borntraeger wrote: Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -406,10 +405,10 @@ again: Hmm, while I agree in general with the patch, I fail to find

Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-12 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Dor Laor: I think the change below handles the race. Otherwise please detail the use case. [...] @@ -292,6 +292,9 @@ static int virtnet_open(struct net_devic return -ENOMEM; napi_enable(vi-napi); + +

[PATCH resend] virtio_net: remove double ether_setup

2007-12-11 Thread Christian Borntraeger
Hello Rusty, this is a small fix for virtio_net. virtnet_probe already calls alloc_etherdev, which calls ether_setup. There is no need to do that again. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] --- drivers/net/virtio_net.c |1 - 1 file changed, 1 deletion(-) Index: kvm

[PATCH resent] virtio_net: Fix stalled inbound traffic on early packets

2007-12-11 Thread Christian Borntraeger
for this device. One solution is the enable napi before inbound buffer are available. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] --- drivers/net/virtio_net.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Index: kvm/drivers/net/virtio_net.c

Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-11 Thread Christian Borntraeger
2nd try. I somehow enable html on the last post Dor Laor wrote: Christian Borntraeger wrote: Hello Rusty, while implementing and testing virtio on s390 I found a problem in virtio_net: The current virtio_net driver has a startup race, which prevents any incoming traffic: If try_fill_recv

Re: [kvm-devel] [PATCH resent] virtio_net: Fix stalled inbound trafficon early packets

2007-12-11 Thread Christian Borntraeger
Am Dienstag, 11. Dezember 2007 schrieb Christian Borntraeger: The way other physical NICs doing it is by dis/en/abling interrupt using registers (look at e1000). I suggest we can export add_status and use the original code but before enabling napi add a call to add_status(dev

[PATCH] virtio_net: remove double ether_setup

2007-12-11 Thread Christian Borntraeger
Am Mittwoch, 12. Dezember 2007 schrieb Rusty Russell: Can you send straight to akpm or davem? I'm supposed to be on vacation at this is a small fix for virtio_net. virtnet_probe already calls alloc_etherdev, which calls ether_setup. There is no need to do that again. Signed-off-by: Christian

[PATCH] virtio_net: Fix stalled inbound traffic on early packets

2007-12-06 Thread Christian Borntraeger
-off-by: Christian Borntraeger [EMAIL PROTECTED] --- drivers/net/virtio_net.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Index: kvm/drivers/net/virtio_net.c === --- kvm.orig/drivers/net/virtio_net.c +++ kvm/drivers

Re: [PATCH 2/2] virtio: free transmit skbs when notified, not on next xmit.

2007-11-19 Thread Christian Borntraeger
Rusty, that was the 2nd next item on my todo list :-) Acked-by: Christian Borntraeger [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] IPVS: Fix sysctl warnings about missing strategy

2007-11-13 Thread Christian Borntraeger
[EMAIL PROTECTED] CC: Julian Anastasov [EMAIL PROTECTED] Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] --- include/net/ip_vs.h |4 kernel/sysctl_check.c |4 net/ipv4/ipvs/ip_vs_ctl.c |4 3 files changed, 12 deletions(-) Index: linux-2.6/include/net/ip_vs.h

[PATCH] note that NETIF_F_LLTX is deprecated (was: [kvm-devel][PATCH 3/6] virtio net driver)

2007-09-21 Thread Christian Borntraeger
Am Freitag, 21. September 2007 schrieb Herbert Xu: Please don't use LLTX in new drivers. We're trying to get rid of it since it's 1) unnecessary; 2) causes problems with AF_PACKET seeing things twice. I suggest to document that LLTX is deprecated. Signed-off-by: Christian Borntraeger

Re: [PATCH] Virtual ethernet device (v2.1)

2007-07-11 Thread Christian Borntraeger
Am Mittwoch, 11. Juli 2007 schrieb Pavel Emelianov: drivers/net/veth.c | 452 include/net/veth.h | 14 + I know, I am late in the game, but wont the name collide somewhat with drivers/net/ibmveth.h, drivers/net/iseries_veth.c, and drivers/net/ibmveth.c? Christian - To unsubscribe from

Re: [PATCH 1/6] ehea: interface to network stack

2006-08-09 Thread Christian Borntraeger
)) + return 0; + } + return 1; +} The poll function seems too long and therefore hard to review. Please consider splitting it. -- Mit freundlichen Grüßen / Best Regards Christian Borntraeger Linux Software Engineer zSeries Linux Virtualization - To unsubscribe from this list

Re: Netchannles: first stage has been completed. Further ideas.

2006-07-18 Thread Christian Borntraeger
unetchannel_control))) + return -ERESTARTSYS; ^^^ I think this should be -EFAULT instead of -ERESTARTSYS, right? -- Mit freundlichen Grüßen / Best Regards Christian Borntraeger Linux Software Engineer zSeries Linux Virtualization - To unsubscribe from this list

Re: Netchannles: first stage has been completed. Further ideas.

2006-07-18 Thread Christian Borntraeger
of ERESTARTSYS. Furthermore, copy*user transparently faults in necessary pages as long as the address is valid in the user context. Let's change it to -EFAULT. Thanks :-) -- Mit freundlichen Grüßen / Best Regards Christian Borntraeger Linux Software Engineer zSeries Linux Virtualization

Re: [RFC] changing value of NETDEV_ALIGN to cacheline size

2006-05-16 Thread Christian Borntraeger
. -- Mit freundlichen Grüßen / Best Regards Christian Borntraeger Linux Software Engineer zSeries Linux Virtualization - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[RFC] changing value of NETDEV_ALIGN to cacheline size

2006-05-15 Thread Christian Borntraeger
in most cases. I think we should not rely on the behaviour of the memory allocator and use a different value for NETDEV_ALIGN instead. Any comments or corrections? cheers Christian The patch below is compile and boot tested on s390 and x86. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED

Re: [patch] ipv4: initialize arp_tbl rw lock

2006-04-19 Thread Christian Borntraeger
net initcalls should be using something higher priority than device_initcall(). I agree that the initcall order offers a lot of room for improvement (like dependencies). Is anybody aware of any work into this direction? -- Mit freundlichen Grüßen / Best Regards Christian Borntraeger Linux