LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Stanislav Kinsburskii <staskins@amazon.com>
Cc: <jakub.kicinski@netronome.com>, <hpa@zytor.com>,
<mcroce@redhat.com>, <tglx@linutronix.de>, <ggarcia@abra.uab.cat>,
<daniel@iogearbox.net>, <x86@kernel.org>, <mingo@redhat.com>,
<xen-devel@lists.xenproject.org>, <axboe@kernel.dk>,
<konrad.wilk@oracle.com>, <amir.jer.levy@intel.com>,
<paul.durrant@citrix.com>, <stefanha@redhat.com>,
<dsa@cumulusnetworks.com>, <boris.ostrovsky@oracle.com>,
<jgross@suse.com>, <linux-block@vger.kernel.org>,
<wei.liu2@citrix.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <davem@davemloft.net>,
<dwmw@amazon.co.uk>, <roger.pau@citrix.com>
Subject: Re: [PATCH 2/3] xen netback: add fault injection facility
Date: Mon, 23 Apr 2018 10:58:59 +0100 [thread overview]
Message-ID: <20180423095859.vdi7f7r267urodlx@citrix.com> (raw)
In-Reply-To: <20180420104731.17823.97617.stgit@dev-dsk-staskins-1a-ca5afbf2.eu-west-1.amazon.com>
On Fri, Apr 20, 2018 at 10:47:31AM +0000, Stanislav Kinsburskii wrote:
>
> #include <linux/kthread.h>
> #include <linux/if_vlan.h>
> @@ -1649,6 +1650,7 @@ static int __init netback_init(void)
> PTR_ERR(xen_netback_dbg_root));
> #endif /* CONFIG_DEBUG_FS */
>
> + (void) xen_netbk_fi_init();
If you care about the return value, please propagate it to
netback_init's caller. Otherwise you can just make the function return
void.
> +
> +int xenvif_fi_init(struct xenvif *vif)
> +{
> + struct dentry *parent;
> + struct xenvif_fi *vfi;
> + int fi, err = -ENOMEM;
> +
> + parent = vif_fi_dir;
> + if (!parent)
> + return -ENOMEM;
> +
> + vfi = kmalloc(sizeof(*vfi), GFP_KERNEL);
> + if (!vfi)
> + return -ENOMEM;
> +
> + vfi->dir = debugfs_create_dir(vif->dev->name, parent);
> + if (!vfi->dir)
> + goto err_dir;
> +
> + for (fi = 0; fi < XENVIF_FI_MAX; fi++) {
> + vfi->faults[fi] = xen_fi_dir_add(vfi->dir,
> + xenvif_fi_names[fi]);
> + if (!vfi->faults[fi])
> + goto err_fault;
> + }
> +
> + vif->fi_info = vfi;
> + return 0;
> +
> +err_fault:
> + for (; fi > 0; fi--)
fi >= 0
Wei.
next prev parent reply other threads:[~2018-04-23 9:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 10:47 [PATCH 0/3] Introduce Xen " Stanislav Kinsburskii
2018-04-20 10:47 ` [PATCH 1/3] xen: add generic " Stanislav Kinsburskii
2018-04-20 10:59 ` Juergen Gross
2018-04-20 12:45 ` staskins
2018-04-20 10:47 ` [PATCH 2/3] xen netback: add " Stanislav Kinsburskii
2018-04-20 11:25 ` Juergen Gross
2018-04-20 12:52 ` staskins
2018-04-20 13:00 ` Juergen Gross
2018-04-20 13:02 ` staskins
2018-04-23 9:58 ` Wei Liu [this message]
2018-04-20 10:47 ` [PATCH 3/3] xen blkback: " Stanislav Kinsburskii
2018-04-20 11:28 ` Juergen Gross
2018-04-20 12:53 ` staskins
2018-04-22 15:41 ` kbuild test robot
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=20180423095859.vdi7f7r267urodlx@citrix.com \
--to=wei.liu2@citrix.com \
--cc=amir.jer.levy@intel.com \
--cc=axboe@kernel.dk \
--cc=boris.ostrovsky@oracle.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dsa@cumulusnetworks.com \
--cc=dwmw@amazon.co.uk \
--cc=ggarcia@abra.uab.cat \
--cc=hpa@zytor.com \
--cc=jakub.kicinski@netronome.com \
--cc=jgross@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcroce@redhat.com \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=paul.durrant@citrix.com \
--cc=roger.pau@citrix.com \
--cc=staskins@amazon.com \
--cc=stefanha@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
--subject='Re: [PATCH 2/3] xen netback: add fault injection facility' \
/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
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).