xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Wei Liu <wei.liu2@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] xen-netback: prefer xenbus_write() over xenbus_printf() where possible
Date: Thu, 7 Jul 2016 08:27:22 +0000	[thread overview]
Message-ID: <679a10e41ac9459fae5cbd88aee3216a__17712.4739661396$1467880116$gmane$org@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <577E27BA02000078000FBEC3@prv-mh.provo.novell.com>

> -----Original Message-----
> From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf Of Jan
> Beulich
> Sent: 07 July 2016 08:58
> To: Wei Liu
> Cc: xen-devel@lists.xenproject.org; netdev@vger.kernel.org
> Subject: [Xen-devel] [PATCH] xen-netback: prefer xenbus_write() over
> xenbus_printf() where possible
> 
> ... as being the simpler variant.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

> ---
>  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/xen-netback/xenbus.c
> @@ -301,17 +301,15 @@ static int netback_probe(struct xenbus_d
>  		}
> 
>  		/* We support partial checksum setup for IPv6 packets */
> -		err = xenbus_printf(xbt, dev->nodename,
> -				    "feature-ipv6-csum-offload",
> -				    "%d", 1);
> +		err = xenbus_write(xbt, dev->nodename,
> +				   "feature-ipv6-csum-offload", "1");
>  		if (err) {
>  			message = "writing feature-ipv6-csum-offload";
>  			goto abort_transaction;
>  		}
> 
>  		/* We support rx-copy path. */
> -		err = xenbus_printf(xbt, dev->nodename,
> -				    "feature-rx-copy", "%d", 1);
> +		err = xenbus_write(xbt, dev->nodename, "feature-rx-copy",
> "1");
>  		if (err) {
>  			message = "writing feature-rx-copy";
>  			goto abort_transaction;
> @@ -321,24 +319,22 @@ static int netback_probe(struct xenbus_d
>  		 * We don't support rx-flip path (except old guests who don't
>  		 * grok this feature flag).
>  		 */
> -		err = xenbus_printf(xbt, dev->nodename,
> -				    "feature-rx-flip", "%d", 0);
> +		err = xenbus_write(xbt, dev->nodename, "feature-rx-flip",
> "0");
>  		if (err) {
>  			message = "writing feature-rx-flip";
>  			goto abort_transaction;
>  		}
> 
>  		/* We support dynamic multicast-control. */
> -		err = xenbus_printf(xbt, dev->nodename,
> -				    "feature-multicast-control", "%d", 1);
> +		err = xenbus_write(xbt, dev->nodename,
> +				   "feature-multicast-control", "1");
>  		if (err) {
>  			message = "writing feature-multicast-control";
>  			goto abort_transaction;
>  		}
> 
> -		err = xenbus_printf(xbt, dev->nodename,
> -				    "feature-dynamic-multicast-control",
> -				    "%d", 1);
> +		err = xenbus_write(xbt, dev->nodename,
> +				   "feature-dynamic-multicast-control", "1");
>  		if (err) {
>  			message = "writing feature-dynamic-multicast-
> control";
>  			goto abort_transaction;
> @@ -368,9 +364,7 @@ static int netback_probe(struct xenbus_d
>  	if (err)
>  		pr_debug("Error writing multi-queue-max-queues\n");
> 
> -	err = xenbus_printf(XBT_NIL, dev->nodename,
> -			    "feature-ctrl-ring",
> -			    "%u", true);
> +	err = xenbus_write(XBT_NIL, dev->nodename, "feature-ctrl-ring",
> "1");
>  	if (err)
>  		pr_debug("Error writing feature-ctrl-ring\n");
> 
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-07-07  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07  7:58 [PATCH] xen-netback: prefer xenbus_write() over xenbus_printf() where possible Jan Beulich
2016-07-07  8:27 ` Paul Durrant [this message]
2016-07-08 16:13 ` Wei Liu
     [not found] ` <20160708161349.GB24399@citrix.com>
2016-07-08 16:15   ` Wei Liu

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='679a10e41ac9459fae5cbd88aee3216a__17712.4739661396$1467880116$gmane$org@AMSPEX02CL03.citrite.net' \
    --to=paul.durrant@citrix.com \
    --cc=JBeulich@suse.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;
as well as URLs for NNTP newsgroup(s).