[PATCH] xen-netback: use local var in xenvif_tx_check_gop() instead of re-calculating

2021-02-25 Thread Jan Beulich
shinfo already holds the result of skb_shinfo(skb) at this point - no need to re-invoke the construct even twice. Signed-off-by: Jan Beulich --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -557,8 +557,8 @@ check_frags: } if (skb_has_frag_list

Re: [PATCH] xen-netback: correct success/error reporting for the SKB-with-fraglist case

2021-02-25 Thread Jan Beulich
On 25.02.2021 13:11, Paul Durrant wrote: > On 25/02/2021 07:33, Jan Beulich wrote: >> On 24.02.2021 17:39, Paul Durrant wrote: >>> On 23/02/2021 16:29, Jan Beulich wrote: >>>> When re-entering the main loop of xenvif_tx_check_gop() a 2nd time, the >>>>

Re: [PATCH] xen-netback: correct success/error reporting for the SKB-with-fraglist case

2021-02-24 Thread Jan Beulich
On 24.02.2021 17:39, Paul Durrant wrote: > On 23/02/2021 16:29, Jan Beulich wrote: >> When re-entering the main loop of xenvif_tx_check_gop() a 2nd time, the >> special considerations for the head of the SKB no longer apply. Don't >> mistakenly report ERROR to the front

[PATCH] xen-netback: correct success/error reporting for the SKB-with-fraglist case

2021-02-23 Thread Jan Beulich
l transmit will need to be considered failed anyway. Signed-off-by: Jan Beulich --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -499,7 +499,7 @@ check_frags: * the header's copy faile

Re: [PATCH v2 4/8] xen/netback: fix spurious event detection for common event case

2021-02-11 Thread Jan Beulich
; > xen_irq_lateeoi(irq, XEN_EOI_FLAG_SPURIOUS); > } > Ah yes, what was originally meant really was if (!(xenvif_handle_tx_interrupt(queue) | xenvif_handle_rx_interrupt(queue))) { (also hinted at by the otherwise pointless inner parentheses), which you simply write in an alternative way. Reviewed-by: Jan Beulich Jan

Re: [Xen-devel] [PATCH net-next] xen-netback: mark expected switch fall-through

2019-02-11 Thread Jan Beulich
>>> On 08.02.19 at 20:58, wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > > Warning level 3 was used: -Wimplicit-fallthrough=3 > > This patch is part of the ongoing efforts to enabling > -Wimplicit-fallthrough. > > Signed

Re: [Xen-devel] [PATCH net-next v1] xen-netback: make copy batch size configurable

2017-11-13 Thread Jan Beulich
>>> On 13.11.17 at 11:33, wrote: >> From: Joao Martins [mailto:joao.m.mart...@oracle.com] >> Sent: 10 November 2017 19:35 >> --- a/drivers/net/xen-netback/netback.c >> +++ b/drivers/net/xen-netback/netback.c >> @@ -96,6 +96,11 @@ unsigned int xenvif_hash_cache_size = >> XENVIF_HASH_CACHE_SIZE_DEFA

[PATCH v3] xen-netback: prefer xenbus_scanf() over xenbus_gather()

2016-11-07 Thread Jan Beulich
For single items being collected this should be preferred as being more typesafe (as the compiler can check format string and to-be-written-to variable match) and more efficient (requiring one less parameter to be passed). Signed-off-by: Jan Beulich --- v3: For consistency with other code don&#

Re: [Xen-devel] [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short

2016-10-31 Thread Jan Beulich
>>> On 31.10.16 at 09:28, wrote: >> > ref = gnttab_claim_grant_reference(&queue->gref_rx_head); >> > -BUG_ON((signed short)ref < 0); >> > +WARN_ON_ONCE(IS_ERR_VALUE((unsigned long)ref)); > >> You really need to cast to plain (or signed) long here -

Re: [Xen-devel] [PATCH 1/1] xen-netfront: do not cast grant table reference to signed short

2016-10-31 Thread Jan Beulich
>>> On 31.10.16 at 06:38, wrote: > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -304,7 +304,7 @@ static void xennet_alloc_rx_buffers(struct netfront_queue > *queue) > queue->rx_skbs[id] = skb; > > ref = gnttab_claim_grant_reference(&queue-

RE: [PATCH v2 RESEND] xen-netback: prefer xenbus_scanf() over xenbus_gather()

2016-10-25 Thread Jan Beulich
>>> On 25.10.16 at 09:52, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 24 October 2016 16:08 >> --- 4.9-rc2/drivers/net/xen-netback/xenbus.c >> +++ 4.9-rc2-xen-netback-prefer-xenbus_scanf/drivers/net/xen-netback/xenbus.c >> @@ -889,16

[PATCH v2 RESEND] xen-netback: prefer xenbus_scanf() over xenbus_gather()

2016-10-24 Thread Jan Beulich
For single items being collected this should be preferred as being more typesafe (as the compiler can check format string and to-be-written-to variable match) and more efficient (requiring one less parameter to be passed). Signed-off-by: Jan Beulich --- v2: Avoid commit message to continue from

[PATCH v2 4/4] xen-netback: prefer xenbus_scanf() over xenbus_gather()

2016-07-08 Thread Jan Beulich
For single items being collected this should be preferred as being more typesafe (as the compiler can check format string and to-be-written-to variable match) and more efficient (requiring one less parameter to be passed). Signed-off-by: Jan Beulich --- v2: Avoid commit message to continue from

RE: [Xen-devel] [PATCH] xen-netback: correct return value checks on xenbus_scanf()

2016-07-07 Thread Jan Beulich
>>> On 07.07.16 at 12:55, wrote: >> -Original Message- >> From: netdev-ow...@vger.kernel.org [mailto:netdev- >> ow...@vger.kernel.org] On Behalf Of David Vrabel >> Sent: 07 July 2016 11:45 >> To: Wei Liu; David Vrabel >> Cc: xen-de

Re: [Xen-devel] [PATCH] xen-netfront: prefer xenbus_write() over xenbus_printf() where possible

2016-07-07 Thread Jan Beulich
>>> On 07.07.16 at 13:12, wrote: > The better clean-up is to remove xenbus_write() in favour of > xenbus_printf() everywhere (especially since one of your "cleanups" made > it worse). I don't think I've seen any reply indicating something has got made worse. The fact that in one case I left the x

Re: [Xen-devel] [PATCH] xen-netback: prefer xenbus_scanf() over xenbus_gather()

2016-07-07 Thread Jan Beulich
>>> On 07.07.16 at 11:55, wrote: > On 07/07/16 08:57, Jan Beulich wrote: >> --- 4.7-rc6-prefer-xenbus_scanf.orig/drivers/net/xen-netback/xenbus.c >> +++ 4.7-rc6-prefer-xenbus_scanf/drivers/net/xen-netback/xenbus.c >> @@ -842,16 +842,16 @@ static int connect_ctrl_rin

[PATCH] xen-netfront: prefer xenbus_write() over xenbus_printf() where possible

2016-07-07 Thread Jan Beulich
... as being the simpler variant. Signed-off-by: Jan Beulich --- drivers/net/xen-netfront.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) --- 4.7-rc6-prefer-xenbus_write.orig/drivers/net/xen-netfront.c +++ 4.7-rc6-prefer-xenbus_write/drivers/net/xen-netfront.c @@ -1886,26

[PATCH] xen-netback: prefer xenbus_write() over xenbus_printf() where possible

2016-07-07 Thread Jan Beulich
... as being the simpler variant. Signed-off-by: Jan Beulich --- drivers/net/xen-netback/xenbus.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) --- 4.7-rc6-prefer-xenbus_write.orig/drivers/net/xen-netback/xenbus.c +++ 4.7-rc6-prefer-xenbus_write/drivers/net

[PATCH] xen-netfront: correct return value checks on xenbus_scanf()

2016-07-07 Thread Jan Beulich
Only a positive return value indicates success. Signed-off-by: Jan Beulich --- drivers/net/xen-netfront.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) --- 4.7-rc6-xenbus_scanf.orig/drivers/net/xen-netfront.c +++ 4.7-rc6-xenbus_scanf/drivers/net/xen-netfront.c @@ -1158,7

[PATCH] xen-netback: prefer xenbus_scanf() over xenbus_gather()

2016-07-07 Thread Jan Beulich
... for single items being collected: It is more typesafe (as the compiler can check format string and to-be-written-to variable match) and requires one less parameter to be passed. Signed-off-by: Jan Beulich --- drivers/net/xen-netback/xenbus.c | 14 +++--- 1 file changed, 7

[PATCH] xen-netback: correct return value checks on xenbus_scanf()

2016-07-07 Thread Jan Beulich
Only a positive return value indicates success. Signed-off-by: Jan Beulich --- drivers/net/xen-netback/xenbus.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) --- 4.7-rc6-xenbus_scanf.orig/drivers/net/xen-netback/xenbus.c +++ 4.7-rc6-xenbus_scanf/drivers

Re: [PATCH V2 2/2] xen-netfront: limit vnic max_queues number to online cpus

2015-10-23 Thread Jan Beulich
>>> On 23.10.15 at 11:19, wrote: > > @@ -164,6 +166,19 @@ struct netfront_rx_info { > struct xen_netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX - 1]; > }; > > +static int xennet_set_max_queues(const char *val, struct kernel_param *kp) > +{ > + unsigned int cpus = num_online_cpus()

Re: [Xen-devel] [PATCH 0/2] limit xen vnic max queues number to online cpu number

2015-10-23 Thread Jan Beulich
>>> On 23.10.15 at 11:05, wrote: > On 10/23/2015 04:47 PM, Paul Durrant wrote: >>> -Original Message- >>> From: netdev-ow...@vger.kernel.org [mailto:netdev- >>> ow...@vger.kernel.org] On Behalf Of Joe Jin >>> Sent: 23 October 2015 08:54 >>> To: Wei Liu; Ian Campbell; Boris Ostrovsky; Konra

Re: [Xen-devel] [PATCH 1/2] xen-netback: limit xen vif max queues number to online cpus

2015-10-23 Thread Jan Beulich
>>> On 23.10.15 at 09:58, wrote: > --- a/drivers/net/xen-netback/netback.c > +++ b/drivers/net/xen-netback/netback.c > @@ -68,7 +68,9 @@ unsigned int rx_stall_timeout_msecs = 6; > module_param(rx_stall_timeout_msecs, uint, 0444); > > unsigned int xenvif_max_queues; > -module_param_named(ma

Re: [Xen-devel] [PATCH v2 net-next] xen-netback: add support for multicast control

2015-09-03 Thread Jan Beulich
>>> On 02.09.15 at 18:58, wrote: > @@ -1215,6 +1289,31 @@ static void xenvif_tx_build_gops(struct xenvif_queue > *queue, > break; > } > > + if (extras[XEN_NETIF_EXTRA_TYPE_MCAST_ADD - 1].type) { > + struct xen_netif_ext

Re: [Xen-devel] [PATCH v4 3/3] net/xen-netback: Don't mix hexa and decimal with 0x in the printf format

2015-06-17 Thread Jan Beulich
>>> On 16.06.15 at 21:10, wrote: > Append 0x to all %x in order to avoid while reading when there is other > decimal value in the log. To save on the space taken by the format strings you should prefer %#x over 0x%x (like we do in the hypervisor). Jan -- To unsubscribe from this list: send the

Re: [Xen-devel] xen-netfront sets partial checksum at wrong offset

2015-05-29 Thread Jan Beulich
>>> On 29.05.15 at 12:39, wrote: > On Fri, May 29, 2015 at 11:34:07AM +0100, Jan Beulich wrote: >> >>> On 11.05.15 at 19:25, wrote: >> >> >> >> Please CC the maintainers of the driver. You can get that from >> >>

Re: [Xen-devel] xen-netfront sets partial checksum at wrong offset

2015-05-29 Thread Jan Beulich
>>> On 11.05.15 at 19:25, wrote: >> >> Please CC the maintainers of the driver. You can get that from >> 'scripts/get_maintainer.pl' >> >> I've done that for you. > > Thanks, Konrad. > > I am copying Wei too who had fixed the below problem earlier. > It fixed the incorrect ip_hdr(). tcp_hdr()

Re: [patch 1/7] typhoon section fix

2008-02-11 Thread Jan Beulich
>So do we have other options that to drop the constification and thus >dropping the __devinitconst and the other __*const annotations - I think not >:-( As I had said already in another reply - I think the most reasonable thing to do is to fold section name attribute *and* const into __*initconst