diff options
author | Andy Grover <andy.grover@oracle.com> | 2009-08-21 14:28:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-24 04:13:12 +0200 |
commit | 335776bd696a6bf95134baf8ad95847371e4d5f6 (patch) | |
tree | 76393aa4683e02b87209981ae96ed44f9689a080 /net/rds/rds.h | |
parent | RDS: Modularize RDMA and TCP transports (diff) | |
download | linux-335776bd696a6bf95134baf8ad95847371e4d5f6.tar.xz linux-335776bd696a6bf95134baf8ad95847371e4d5f6.zip |
RDS: Track transports via an array, not a list
Now that transports can be loaded in arbitrary order,
it is important for rds_trans_get_preferred() to look
for them in a particular order, instead of walking the list
until it finds a transport that works for a given address.
Now, each transport registers for a specific transport slot,
and these are ordered so that preferred transports come first,
and then if they are not loaded, other transports are queried.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/rds.h')
-rw-r--r-- | net/rds/rds.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/rds/rds.h b/net/rds/rds.h index 290566c69d28..85d6f897ecc7 100644 --- a/net/rds/rds.h +++ b/net/rds/rds.h @@ -311,11 +311,17 @@ struct rds_notifier { * flag and header. */ +#define RDS_TRANS_IB 0 +#define RDS_TRANS_IWARP 1 +#define RDS_TRANS_TCP 2 +#define RDS_TRANS_COUNT 3 + struct rds_transport { char t_name[TRANSNAMSIZ]; struct list_head t_item; struct module *t_owner; unsigned int t_prefer_loopback:1; + unsigned int t_type; int (*laddr_check)(__be32 addr); int (*conn_alloc)(struct rds_connection *conn, gfp_t gfp); |