Re: [PATCH] xen-netfront: fix xennet_start_xmit()'s return type

2018-05-17 Thread Juergen Gross
On 24/04/18 15:18, Luc Van Oostenryck wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, but the implementation in this > driver returns an 'int'. > > Fix this by returning 'netdev_tx_t' in this driver too. > > Signed-off-by: Luc

Re: [PATCH 2/3] xen netback: add fault injection facility

2018-04-20 Thread Juergen Gross
On 20/04/18 14:52, stask...@amazon.com wrote: > On 04/20/18 13:25, Juergen Gross wrote: >> On 20/04/18 12:47, Stanislav Kinsburskii wrote: >>> +    for (fi = 0; fi < XENVIF_FI_MAX; fi++) { >>> +    vfi->faults[fi] = xen_fi_dir_add(vfi->dir, >>>

Re: [PATCH 3/3] xen blkback: add fault injection facility

2018-04-20 Thread Juergen Gross
On 20/04/18 12:47, Stanislav Kinsburskii wrote: > This patch adds wrapper helpers around generic Xen fault inject > facility. > The major reason is to keep all the module fault injection directories > in a dedicated subdirectory instead of Xen fault inject root. > > IOW, when using these helpers,

Re: [PATCH 2/3] xen netback: add fault injection facility

2018-04-20 Thread Juergen Gross
CC: Daniel Borkmann <dan...@iogearbox.net> > CC: Gerard Garcia <ggar...@deic.uab.cat> > CC: David Ahern <d...@cumulusnetworks.com> > CC: Juergen Gross <jgr...@suse.com> > CC: Amir Levy <amir.jer.l...@intel.com> > CC: Jakub Kicinski <jakub.kicin...@netro

Re: [PATCH 1/3] xen: add generic fault injection facility

2018-04-20 Thread Juergen Gross
root fault injection directory. > > - xen_fi_dir_add(dir, name) - adds fault injection control directory "name" > to directory "dir" > > - xen_should_fail(fi) - check whether fi hav to fail. > > Signed-off-by: Stanislav Kinsburskii <stask...@amazon.

Re: [PATCH] xen-netfront: Fix hang on device removal

2018-02-28 Thread Juergen Gross
On 28/02/18 13:23, Jason Andryuk wrote: > A toolstack may delete the vif frontend and backend xenstore entries > while xen-netfront is in the removal code path. In that case, the > checks for xenbus_read_driver_state would return XenbusStateUnknown, and > xennet_remove would hang indefinitely.

Re: [PATCHv2] xen-netfront: remove warning when unloading module

2017-11-27 Thread Juergen Gross
ings on dmesg. > > The trick here is to make netfront to wait until netback frees all the g.e.'s > and only then continue to cleanup for the module removal, and this is done by > manipulating both device states. > > Signed-off-by: Eduardo Otubo <ot...@redhat.com> Acked-by: Juergen Gross <jgr...@suse.com> Juergen

Re: [PATCH] xen-netfront: remove warning when unloading module

2017-11-20 Thread Juergen Gross
On 20/11/17 11:49, Wei Liu wrote: > CC netfront maintainers. > > On Mon, Nov 20, 2017 at 11:41:09AM +0100, Eduardo Otubo wrote: >> When unloading module xen_netfront from guest, dmesg would output >> warning messages like below: >> >> [ 105.236836] xen:grant_table: WARNING: g.e. 0x903 still in

[PATCH v2] i40e/i40evf: use cpumask_copy() for assigning cpumask

2017-08-16 Thread Juergen Gross
/0x70 Fixes: 96db776a3682 ("i40e/i40evf: fix interrupt affinity bug") Cc: <sta...@vger.kernel.org> # 4.10+ Signed-off-by: Juergen Gross <jgr...@suse.com> --- V2: enhance commit message, merge patches --- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- drivers/net

[PATCH] net/i40evf: use cpumask_copy() for assigning cpumask

2017-08-12 Thread Juergen Gross
Using direct assignment for a cpumask is wrong, cpumask_copy() should be used instead. Cc: sta...@vger.kernel.org Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

[PATCH] net/i40e: use cpumask_copy() for assigning cpumask

2017-08-12 Thread Juergen Gross
Using direct assignment for a cpumask is wrong, cpumask_copy() should be used instead. Cc: sta...@vger.kernel.org Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

Re: [PATCH] xen/9pfs: select CONFIG_XEN_XENBUS_FRONTEND

2017-04-19 Thread Juergen Gross
On 20/04/17 01:10, Stefano Stabellini wrote: > Juergen, I have committed this patch to for-linus-4.12 and linux-next, I > hope that's OK. Sure. Juergen > > Og Wed, 19 Apr 2017, Stefano Stabellini wrote: >> On Wed, 19 Apr 2017, Arnd Bergmann wrote: >>> All Xen frontends need to select this

BUG due to "xen-netback: protect resource cleaning on XenBus disconnect"

2017-03-02 Thread Juergen Gross
With commits f16f1df65 and 9a6cdf52b we get in our Xen testing: [ 174.512861] switch: port 2(vif3.0) entered disabled state [ 174.522735] BUG: sleeping function called from invalid context at /home/build/linux-linus/mm/vmalloc.c:1441 [ 174.523451] in_atomic(): 1, irqs_disabled(): 0, pid: 28,

Re: [Xen-devel] [PATCH net 2/2] xen-netback: don't vfree() queues under spinlock

2017-03-02 Thread Juergen Gross
541898] ret_from_fork+0x21/0x2c > [ 174.548635] switch: port 2(vif3.0) entered disabled state > > This patch defers the vfree() until after the spinlock is released. > > Reported-by: Juergen Gross <jgr...@suse.com> > Signed-off-by: Paul Durrant <paul.durr...@citrix.com> Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen

Re: BUG due to "xen-netback: protect resource cleaning on XenBus disconnect"

2017-03-02 Thread Juergen Gross
On 02/03/17 13:06, Wei Liu wrote: > On Thu, Mar 02, 2017 at 12:56:20PM +0100, Juergen Gross wrote: >> With commits f16f1df65 and 9a6cdf52b we get in our Xen testing: >> >> [ 174.512861] switch: port 2(vif3.0) entered disabled state >> [ 174.522735] BUG: sleeping f

[PATCH v4 2/3] xen: modify xenstore watch event interface

2017-02-09 Thread Juergen Gross
xenbus_watch *, const char *path, const char *token); is the natural thing to do. Apply this change and adapt all users. Cc: konrad.w...@oracle.com Cc: roger@citrix.com Cc: wei.l...@citrix.com Cc: paul.durr...@citrix.com Cc: netdev@vger.kernel.org Signed-off-by: Juergen

Re: [PATCH] xen-netfront: Delete rx_refill_timer in xennet_disconnect_backend()

2017-02-03 Thread Juergen Gross
is set to NULL in xennet_disconnect_backend(). > > Signed-off-by: Boris Ostrovsky <boris.ostrov...@oracle.com> > CC: sta...@vger.kernel.org Reviewed-by: Juergen Gross <jgr...@suse.com> Juergen

[PATCH v3 2/3] xen: modify xenstore watch event interface

2017-01-23 Thread Juergen Gross
xenbus_watch *, const char *path, const char *token); is the natural thing to do. Apply this change and adapt all users. Cc: konrad.w...@oracle.com Cc: roger@citrix.com Cc: wei.l...@citrix.com Cc: paul.durr...@citrix.com Cc: netdev@vger.kernel.org Signed-off-by: Juergen

[PATCH v3 0/3] xen: optimize xenbus performance

2017-01-23 Thread Juergen Gross
like naming of variables Juergen Gross (3): xen: clean up xenbus internal headers xen: modify xenstore watch event interface xen: optimize xenbus driver for multiple concurrent xenstore accesses drivers/block/xen-blkback/xenbus.c | 6 +- drivers/net/xen-netback/xenbus.c

[PATCH v2 2/3] xen: modify xenstore watch event interface

2017-01-16 Thread Juergen Gross
xenbus_watch *, const char *path, const char *token); is the natural thing to do. Apply this change and adapt all users. Cc: konrad.w...@oracle.com Cc: roger@citrix.com Cc: wei.l...@citrix.com Cc: paul.durr...@citrix.com Cc: netdev@vger.kernel.org Signed-off-by: Juergen

[PATCH v2 0/3] xen: optimize xenbus performance

2017-01-16 Thread Juergen Gross
: - guard xs_request_id by lock - move state struct definitions to the place where they are being used - rate limit some warnings - use barrier() instead of cpu_relax() - add/remove some comments - minor changes like naming of variables Juergen Gross (3): xen: clean up

Re: [PATCH v2] xen-netfront: Fix Rx stall during network stress and OOM

2017-01-15 Thread Juergen Gross
d > and rsp_cons which could be more than the actual slots, if there are > unconsumed responses. > > The fix is to calculate the count of newly created slots as the > difference between new req_prod and old req_prod. > > Signed-off-by: Vineeth Remanan Pillai <vinee...@amazon

Re: [PATCH 1/2] xen/netfront: set default upper limit of tx/rx queues to 8

2017-01-10 Thread Juergen Gross
On 10/01/17 15:53, Boris Ostrovsky wrote: > On 01/10/2017 08:32 AM, Juergen Gross wrote: >> The default for the number of tx/rx queues of one interface is the >> number of vcpus of the system today. As each queue pair reserves 512 >> grant pages this default consumes a ridicu

[PATCH 1/2] xen/netfront: set default upper limit of tx/rx queues to 8

2017-01-10 Thread Juergen Gross
parameter if required. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/net/xen-netfront.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index a479cd9..490c865 100644 --- a/drivers/net/xen-netf

[PATCH 0/2] xen/net: limit number of tx/rx queues

2017-01-10 Thread Juergen Gross
of the related guest. On large systems this can lead to ridiculous large number of queues exhausting the required number of grant pages rather quick. To avoid this limit the default maximum on both sides to 8. Both frontend and backend maximum can be individually tuned via module parameters. Juergen

[PATCH 2/2] xen/netback: set default upper limit of tx/rx queues to 8

2017-01-10 Thread Juergen Gross
a module parameter if required. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/net/xen-netback/netback.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 47b4810..f9bcf4a

Re: [PATCH 2/3] xen: modify xenstore watch event interface

2017-01-08 Thread Juergen Gross
On 06/01/17 22:57, Boris Ostrovsky wrote: > On 01/06/2017 10:05 AM, Juergen Gross wrote: >> Today a Xenstore watch event is delivered via a callback function >> declared as: >> >> void (*callback)(struct xenbus_watch *, >> const char **vec, unsi

[PATCH 0/3] xen: optimize xenbus performance

2017-01-06 Thread Juergen Gross
of Xenstore being capable to handle multiple parallel accesses. Clean up the external interface(s) of xenbus and optimize its performance by allowing multiple concurrent accesses to Xenstore. Juergen Gross (3): xen: clean up xenbus internal headers xen: modify xenstore watch event interface xen

[PATCH 2/3] xen: modify xenstore watch event interface

2017-01-06 Thread Juergen Gross
xenbus_watch *, const char *path, const char *token); is the natural thing to do. Apply this change and adapt all users. Cc: konrad.w...@oracle.com Cc: roger@citrix.com Cc: wei.l...@citrix.com Cc: paul.durr...@citrix.com Cc: netdev@vger.kernel.org Signed-off-by: Juergen

Re: [Xen PATCH] xen-netback: fix error handling output

2016-11-10 Thread Juergen Gross
On 08/11/16 14:34, Arnd Bergmann wrote: > The connect function prints an unintialized error code after an > earlier initialization was removed: > > drivers/net/xen-netback/xenbus.c: In function 'connect': > drivers/net/xen-netback/xenbus.c:938:3: error: 'err' may be used > uninitialized in this

Re: [PATCH 00/12] xen: add common function for reading optional value

2016-10-31 Thread Juergen Gross
On 31/10/16 18:08, David Miller wrote: > From: Juergen Gross <jgr...@suse.com> > Date: Mon, 31 Oct 2016 17:48:18 +0100 > >> There are multiple instances of code reading an optional unsigned >> parameter from Xenstore via xenbus_scanf(). Instead of repeating the >

[PATCH 07/12] xen: make use of xenbus_read_unsigned() in xen-netfront

2016-10-31 Thread Juergen Gross
Use xenbus_read_unsigned() instead of xenbus_scanf() when possible. This requires to change the type of some reads from int to unsigned, but these cases have been wrong before: negative values are not allowed for the modified cases. Cc: netdev@vger.kernel.org Signed-off-by: Juergen Gross <

[PATCH 00/12] xen: add common function for reading optional value

2016-10-31 Thread Juergen Gross
There are multiple instances of code reading an optional unsigned parameter from Xenstore via xenbus_scanf(). Instead of repeating the same code over and over add a service function doing the job and replace the call of xenbus_scanf() with the call of the new function where appropriate. Juergen

[PATCH 06/12] xen: make use of xenbus_read_unsigned() in xen-netback

2016-10-31 Thread Juergen Gross
@vger.kernel.org Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/net/xen-netback/xenbus.c | 50 +++- 1 file changed, 14 insertions(+), 36 deletions(-) diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c index 8

Re: [Xen-devel] [PATCH resend] xen-netback: switch to threaded irq for control ring

2016-09-22 Thread Juergen Gross
On 22/09/16 12:31, Paul Durrant wrote: >> -Original Message- >> From: Juergen Gross [mailto:jgr...@suse.com] >> Sent: 22 September 2016 11:17 >> To: Paul Durrant <paul.durr...@citrix.com>; xen-de...@lists.xenproject.org; >> net...@vger.kernel.orga <

Re: [Xen-devel] [PATCH resend] xen-netback: switch to threaded irq for control ring

2016-09-22 Thread Juergen Gross
On 22/09/16 11:09, Paul Durrant wrote: >> -Original Message- >> From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of >> Juergen Gross >> Sent: 22 September 2016 10:03 >> To: xen-de...@lists.xenproject.org; net...@vger.kernel.orga; linux- &

[PATCH resend 2] xen-netback: switch to threaded irq for control ring

2016-09-22 Thread Juergen Gross
Instead of open coding it use the threaded irq mechanism in xen-netback. Signed-off-by: Juergen Gross <jgr...@suse.com> --- resend due to missing netdev list in first attempt and wrong address in second. --- drivers/net/xen-netback/common.h| 4 +--- drivers/net/xen-netback/interface.