From: "Jan Beulich" <JBeulich@suse.com>
To: "Wei Liu" <wei.liu2@citrix.com>
Cc: <david.vrabel@citrix.com>,
"Ian Campbell" <ian.campbell@citrix.com>,
"xen-devel" <xen-devel@lists.xenproject.org>,
<annie.li@oracle.com>, "Jason Luan" <jianhai.luan@oracle.com>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH net V2] xen-netback: use jiffies_64 value to calculate credit timeout
Date: Mon, 28 Oct 2013 11:49:55 +0000 [thread overview]
Message-ID: <526E5D7302000078000FD41A@nat28.tlf.novell.com> (raw)
In-Reply-To: <1382960117-13053-1-git-send-email-wei.liu2@citrix.com>
>>> On 28.10.13 at 12:35, Wei Liu <wei.liu2@citrix.com> wrote:
Two formal things:
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -1185,18 +1185,17 @@ out:
>
> static bool tx_credit_exceeded(struct xenvif *vif, unsigned size)
> {
> - unsigned long now = jiffies;
> - unsigned long next_credit =
> - vif->credit_timeout.expires +
> - msecs_to_jiffies(vif->credit_usec / 1000);
> + u64 now = get_jiffies_64();
> + u64 next_credit = vif->credit_window_start +
> + (u64)msecs_to_jiffies(vif->credit_usec / 1000);
The cast to u64 seems pointless here.
> @@ -1207,7 +1206,8 @@ static bool tx_credit_exceeded(struct xenvif *vif, unsigned size)
> vif->credit_timeout.function =
> tx_credit_callback;
> mod_timer(&vif->credit_timeout,
> - next_credit);
> + (unsigned long)next_credit);
And the cast here seems pointless too (gcc doesn't warn about
truncations).
Jan
next prev parent reply other threads:[~2013-10-28 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-28 11:35 [PATCH net V2] xen-netback: use jiffies_64 value to calculate credit timeout Wei Liu
2013-10-28 11:49 ` Jan Beulich [this message]
2013-10-28 12:01 ` Wei Liu
2013-10-28 11:53 ` [Xen-devel] " David Vrabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=526E5D7302000078000FD41A@nat28.tlf.novell.com \
--to=jbeulich@suse.com \
--cc=annie.li@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=jianhai.luan@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox