From: Ying Xue <ying.xue-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
To: Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
Cc: <jon.maloy-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org>,
<allan.stephens-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>,
<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
<roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
<sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 4/5] tipc: add InfiniBand media type
Date: Sun, 7 Apr 2013 17:07:12 +0800 [thread overview]
Message-ID: <51613740.6050501@windriver.com> (raw)
In-Reply-To: <1364993010-15515-5-git-send-email-kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
> --- a/net/tipc/core.c
> +++ b/net/tipc/core.c
> @@ -82,6 +82,7 @@ static void tipc_core_stop_net(void)
> {
> tipc_net_stop();
> tipc_eth_media_stop();
> + tipc_ib_media_stop();
> }
>
> /**
> @@ -93,8 +94,17 @@ int tipc_core_start_net(unsigned long addr)
>
> tipc_net_start(addr);
> res = tipc_eth_media_start();
> - if (res)
> - tipc_core_stop_net();
> + if (res < 0)
> + goto err1;
> + res = tipc_ib_media_start();
> + if (res < 0)
> + goto err2;
> + return res;
> +
> +err2:
> + tipc_eth_media_stop();
Why do we need to call tipc_eth_media_stop() separately?
In any failed case, we will finally invoke tipc_core_stop_net() which
already places tipc_eth_media_stop().
> +err1:
> + tipc_core_stop_net();
> return res;
> }
>
Regards,
Ying
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-04-07 9:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 12:43 [PATCH RFC 0/5] tipc: add support for TIPC over InfiniBand Patrick McHardy
2013-04-03 12:43 ` [PATCH 2/5] tipc: move bcast_addr from struct tipc_media to struct tipc_bearer Patrick McHardy
[not found] ` <1364993010-15515-1-git-send-email-kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2013-04-03 12:43 ` [PATCH 1/5] tipc: remove unused str2addr media callback Patrick McHardy
2013-04-03 12:43 ` [PATCH 3/5] tipc: set skb->protocol in eth_media packet transmission Patrick McHardy
2013-04-03 12:43 ` [PATCH 4/5] tipc: add InfiniBand media type Patrick McHardy
2013-04-03 14:41 ` Erik Hugne
2013-04-03 14:49 ` Patrick McHardy
[not found] ` <1364993010-15515-5-git-send-email-kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2013-04-07 9:07 ` Ying Xue [this message]
[not found] ` <51613740.6050501-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2013-04-07 12:04 ` Patrick McHardy
2013-04-07 9:19 ` Bart Van Assche
2013-04-07 9:43 ` Patrick McHardy
2013-04-03 12:43 ` [PATCH 5/5] IPoIB: add support for TIPC protocol Patrick McHardy
[not found] ` <1364993010-15515-6-git-send-email-kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2013-04-03 15:31 ` Or Gerlitz
2013-04-03 15:44 ` Patrick McHardy
2013-04-03 19:44 ` [PATCH RFC 0/5] tipc: add support for TIPC over InfiniBand Jon Maloy
-- strict thread matches above, loose matches on Subject: below --
2013-04-17 16:18 [PATCH v2 0/5] tipc: add TIPC over Infiniband support Patrick McHardy
2013-04-17 16:18 ` [PATCH 4/5] tipc: add InfiniBand media type Patrick McHardy
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=51613740.6050501@windriver.com \
--to=ying.xue-cwa4wttnnzf54taoqtywwq@public.gmane.org \
--cc=allan.stephens-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org \
--cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=jon.maloy-IzeFyvvaP7pWk0Htik3J/w@public.gmane.org \
--cc=kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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).