From: Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
To: Ying Xue <ying.xue-CWA4WttNNZF54TAoqtyWWQ@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 14:04:30 +0200 [thread overview]
Message-ID: <20130407120430.GA23134@macbook.localnet> (raw)
In-Reply-To: <51613740.6050501-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
On Sun, Apr 07, 2013 at 05:07:12PM +0800, Ying Xue wrote:
>
> > --- 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().
Right, that's not necessary, although I think its cleaner to do have error
handling just be the opposite of initialization, IOW calling tipc_net_stop()
instead of tipc_core_stop_net().
But I don't care much either way, will fix this up for the next submission,
thanks.
>
> > +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 12:04 UTC|newest]
Thread overview: 19+ 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
2013-04-07 9:07 ` Ying Xue
[not found] ` <51613740.6050501-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2013-04-07 12:04 ` Patrick McHardy [this message]
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: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
2013-04-03 19:44 ` 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=20130407120430.GA23134@macbook.localnet \
--to=kaber-dcujhnylwpneowh0uzbu5w@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=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 \
--cc=ying.xue-CWA4WttNNZF54TAoqtyWWQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.