* [PATCH net] xen/netback: Properly initialize credit_bytes
@ 2015-05-11 17:04 Ross Lagerwall
2015-05-11 20:45 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Ross Lagerwall @ 2015-05-11 17:04 UTC (permalink / raw)
To: netdev; +Cc: wei.liu2, Ross Lagerwall
Commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into queue
struct") introduced a regression when moving queue-specific data into
the queue struct by failing to set the credit_bytes field. This
prevented bandwidth limiting from working. Initialize the field as it
was done before multiqueue support was added.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
drivers/net/xen-netback/xenbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index 3d8dbf5..1be3ef3 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -793,7 +793,7 @@ static void connect(struct backend_info *be)
goto err;
}
- queue->remaining_credit = credit_bytes;
+ queue->remaining_credit = queue->credit_bytes = credit_bytes;
queue->credit_usec = credit_usec;
err = connect_rings(be, queue);
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] xen/netback: Properly initialize credit_bytes
2015-05-11 17:04 [PATCH net] xen/netback: Properly initialize credit_bytes Ross Lagerwall
@ 2015-05-11 20:45 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2015-05-11 20:45 UTC (permalink / raw)
To: Ross Lagerwall, netdev; +Cc: wei.liu2
Hello.
On 05/11/2015 08:04 PM, Ross Lagerwall wrote:
> Commit e9ce7cb6b107 ("xen-netback: Factor queue-specific data into queue
> struct") introduced a regression when moving queue-specific data into
> the queue struct by failing to set the credit_bytes field. This
> prevented bandwidth limiting from working. Initialize the field as it
> was done before multiqueue support was added.
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> drivers/net/xen-netback/xenbus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
> index 3d8dbf5..1be3ef3 100644
> --- a/drivers/net/xen-netback/xenbus.c
> +++ b/drivers/net/xen-netback/xenbus.c
> @@ -793,7 +793,7 @@ static void connect(struct backend_info *be)
> goto err;
> }
>
> - queue->remaining_credit = credit_bytes;
> + queue->remaining_credit = queue->credit_bytes = credit_bytes;
[headless@wasted linux]$ scripts/checkpatch.pl
~/patches/xen_netback-Properly-initialize-credit_bytes.patch
CHECK: multiple assignments should be avoided
#22: FILE: drivers/net/xen-netback/xenbus.c:796:
+ queue->remaining_credit = queue->credit_bytes = credit_bytes;
total: 0 errors, 0 warnings, 1 checks, 8 lines checked
/home/headless/patches/xen_netback-Properly-initialize-credit_bytes.patch has
style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
WBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-11 20:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11 17:04 [PATCH net] xen/netback: Properly initialize credit_bytes Ross Lagerwall
2015-05-11 20:45 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).