Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369277
b: refs/heads/master
c: a29a194
h: refs/heads/master
i:
  369275: 74572bf
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Apr 17, 2013
1 parent b7b8ae6 commit c8506ba
Show file tree
Hide file tree
Showing 7 changed files with 417 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76f5c6f359a18abd3359ad8523cb23fbf58602b7
refs/heads/master: a29a194a15df9840b24c6c383a9a9a1236979db5
7 changes: 7 additions & 0 deletions trunk/net/tipc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ config TIPC_PORTS

Setting this to a smaller value saves some memory,
setting it to higher allows for more ports.

config TIPC_MEDIA_IB
bool "InfiniBand media type support"
depends on TIPC && INFINIBAND_IPOIB
help
Saying Y here will enable support for running TIPC on
IP-over-InfiniBand devices.
2 changes: 2 additions & 0 deletions trunk/net/tipc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ tipc-y += addr.o bcast.o bearer.o config.o \
name_distr.o subscr.o name_table.o net.o \
netlink.o node.o node_subscr.o port.o ref.o \
socket.o log.o eth_media.o

tipc-$(CONFIG_TIPC_MEDIA_IB) += ib_media.o
2 changes: 1 addition & 1 deletion trunk/net/tipc/bearer.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "bearer.h"
#include "discover.h"

#define MAX_ADDR_STR 32
#define MAX_ADDR_STR 60

static struct tipc_media *media_list[MAX_MEDIA];
static u32 media_count;
Expand Down
9 changes: 9 additions & 0 deletions trunk/net/tipc/bearer.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* Identifiers of supported TIPC media types
*/
#define TIPC_MEDIA_TYPE_ETH 1
#define TIPC_MEDIA_TYPE_IB 2

/**
* struct tipc_media_addr - destination address used by TIPC bearers
Expand Down Expand Up @@ -174,6 +175,14 @@ int tipc_disable_bearer(const char *name);
int tipc_eth_media_start(void);
void tipc_eth_media_stop(void);

#ifdef CONFIG_TIPC_MEDIA_IB
int tipc_ib_media_start(void);
void tipc_ib_media_stop(void);
#else
static inline int tipc_ib_media_start(void) { return 0; }
static inline void tipc_ib_media_stop(void) { return; }
#endif

int tipc_media_set_priority(const char *name, u32 new_value);
int tipc_media_set_window(const char *name, u32 new_value);
void tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a);
Expand Down
12 changes: 10 additions & 2 deletions trunk/net/tipc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ static void tipc_core_stop_net(void)
{
tipc_net_stop();
tipc_eth_media_stop();
tipc_ib_media_stop();
}

/**
Expand All @@ -93,8 +94,15 @@ 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 err;
res = tipc_ib_media_start();
if (res < 0)
goto err;
return res;

err:
tipc_core_stop_net();
return res;
}

Expand Down
Loading

0 comments on commit c8506ba

Please sign in to comment.