From: Ian Campbell <Ian.Campbell@citrix.com>
To: rshriram@cs.ubc.ca
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2 of 5 V3] tools/hotplug: Remus network buffering setup scripts
Date: Thu, 31 Oct 2013 22:25:36 +0000 [thread overview]
Message-ID: <1383258336.5436.169.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <CAP8mzPP-zz1sQ5ChEU_AgB+cnVrNWDZhjknPo55vaj0hmcJ==A@mail.gmail.com>
On Thu, 2013-10-31 at 14:06 -0700, Shriram Rajagopalan wrote:
> On Thu, Oct 31, 2013 at 1:21 PM, Ian Campbell
> <Ian.Campbell@citrix.com> wrote:
> > +
>
> > +case "$command" in
> > + setup)
> > + check_libnl_tools
> > + check_modules
> > +
> > + claim_lock "pickifb"
> > + setup_ifb
> > + redirect_vif_traffic "$vifname" "$IFB"
> > + add_plug_qdisc "$vifname" "$IFB"
> > + release_lock "pickifb"
> > +
> > + #not using xenstore_write that automatically exits on
> error
> > + # because we need to cleanup
>
>
> whitespace inconsistency.
>
>
>
>
> I seem to get this wrong again and again..
> Did you mean the space trailing the second # ? or should the code
> block inside setup/teardown
> be indented with two tabs instead of one ?
I meant "#foo" (1st line) vs "# foo" (2nd line) which just caught my
eye. They should be the same. More normal would be a space after the # I
think.
I don't think we have a particularly strict coding style for shell
scripts, but code being consistent with itself is a good start.
>
>
>
> > + _xenstore_write "$XENBUS_PATH/ifb" "$IFB" ||
> xs_write_failed "$vifname" "$IFB"
> > + ;;
> > + teardown)
> > + : ${IFB?}
>
>
> Do you mean log debug or something here?
>
>
>
>
> This was to just make sure that the IFB variable was supplied as part
> of the environment..
> Just like the two checks on top of this script..
> "
> : ${vifname?}
> : ${XENBUS_PATH?}
> "
Do these result in useful error reporting to the end user? Bearing in
mind that the end user might be using libxl but not xl and therefore not
see stdout/err (which might be going into some daemon's log file).
Also, either I'm missing it or the bash manpage only documents
${parameter:?} and not ${parameter?}. Are both actually valid?
Ian.
next prev parent reply other threads:[~2013-10-31 22:25 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 5:58 [PATCH 0 of 5 V3] Remus/Libxl: Network buffering support Shriram Rajagopalan
2013-10-21 5:58 ` [PATCH 1 of 5 V3] remus: add libnl3 dependency to autoconf scripts Shriram Rajagopalan
2013-10-31 20:13 ` Ian Campbell
2013-10-21 5:58 ` [PATCH 2 of 5 V3] tools/hotplug: Remus network buffering setup scripts Shriram Rajagopalan
2013-10-31 20:21 ` Ian Campbell
2013-10-31 21:06 ` Shriram Rajagopalan
2013-10-31 22:25 ` Ian Campbell [this message]
2013-11-14 3:55 ` Shriram Rajagopalan
2013-10-21 5:58 ` [PATCH 3 of 5 V3] tools/libxl: setup/teardown Remus network buffering Shriram Rajagopalan
2013-10-31 20:28 ` Ian Campbell
2013-10-21 5:58 ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks Shriram Rajagopalan
2013-10-31 20:31 ` Ian Campbell
2013-11-01 18:28 ` Ian Jackson
2013-11-01 19:57 ` Shriram Rajagopalan
2013-11-04 12:12 ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks [and 1 more messages] Ian Jackson
2013-11-04 15:17 ` Shriram Rajagopalan
2013-11-04 15:32 ` Ian Campbell
2013-11-04 16:06 ` Ian Jackson
2013-11-04 16:40 ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks [and 1 more messages] " Ian Jackson
2013-11-11 17:56 ` Shriram Rajagopalan
2013-11-12 9:48 ` Ian Campbell
2013-11-12 15:38 ` Ian Jackson
2013-11-12 16:24 ` Shriram Rajagopalan
2013-11-12 16:38 ` Ian Jackson
2013-11-12 16:43 ` Shriram Rajagopalan
2013-11-12 17:00 ` Ian Jackson
2013-11-04 16:45 ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks " Ian Campbell
2013-11-04 16:47 ` Shriram Rajagopalan
2013-11-04 17:01 ` Ian Jackson
2013-11-04 17:23 ` Shriram Rajagopalan
2013-11-04 17:33 ` Ian Jackson
2013-11-01 20:04 ` [PATCH 4 of 5 V3] tools/libxl: Control network buffering in remus callbacks Shriram Rajagopalan
2013-10-21 5:58 ` [PATCH 5 of 5 V3] tools/xl: Remus - Network buffering cmdline switch Shriram Rajagopalan
2013-10-31 20:38 ` Ian Campbell
2013-10-31 21:47 ` Shriram Rajagopalan
2013-10-31 22:29 ` Ian Campbell
2013-10-30 23:05 ` [PATCH 0 of 5 V3] Remus/Libxl: Network buffering support Shriram Rajagopalan
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=1383258336.5436.169.camel@dagon.hellion.org.uk \
--to=ian.campbell@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=roger.pau@citrix.com \
--cc=rshriram@cs.ubc.ca \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.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).