Commit 7e8f4413 authored by Sowmini Varadhan's avatar Sowmini Varadhan Committed by David S. Miller

RDS: add t_mp_capable bit to be set by MP capable transports

The t_mp_capable bit will be used in the core rds module
to support multipathing logic when the transport supports it.
Signed-off-by: default avatarSowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0cb43965
...@@ -446,7 +446,8 @@ struct rds_transport { ...@@ -446,7 +446,8 @@ struct rds_transport {
char t_name[TRANSNAMSIZ]; char t_name[TRANSNAMSIZ];
struct list_head t_item; struct list_head t_item;
struct module *t_owner; struct module *t_owner;
unsigned int t_prefer_loopback:1; unsigned int t_prefer_loopback:1,
t_mp_capable:1;
unsigned int t_type; unsigned int t_type;
int (*laddr_check)(struct net *net, __be32 addr); int (*laddr_check)(struct net *net, __be32 addr);
...@@ -673,6 +674,7 @@ rds_conn_path_transition(struct rds_conn_path *cp, int old, int new) ...@@ -673,6 +674,7 @@ rds_conn_path_transition(struct rds_conn_path *cp, int old, int new)
static inline int static inline int
rds_conn_transition(struct rds_connection *conn, int old, int new) rds_conn_transition(struct rds_connection *conn, int old, int new)
{ {
WARN_ON(conn->c_trans->t_mp_capable);
return rds_conn_path_transition(&conn->c_path[0], old, new); return rds_conn_path_transition(&conn->c_path[0], old, new);
} }
...@@ -685,6 +687,7 @@ rds_conn_path_state(struct rds_conn_path *cp) ...@@ -685,6 +687,7 @@ rds_conn_path_state(struct rds_conn_path *cp)
static inline int static inline int
rds_conn_state(struct rds_connection *conn) rds_conn_state(struct rds_connection *conn)
{ {
WARN_ON(conn->c_trans->t_mp_capable);
return rds_conn_path_state(&conn->c_path[0]); return rds_conn_path_state(&conn->c_path[0]);
} }
...@@ -697,6 +700,7 @@ rds_conn_path_up(struct rds_conn_path *cp) ...@@ -697,6 +700,7 @@ rds_conn_path_up(struct rds_conn_path *cp)
static inline int static inline int
rds_conn_up(struct rds_connection *conn) rds_conn_up(struct rds_connection *conn)
{ {
WARN_ON(conn->c_trans->t_mp_capable);
return rds_conn_path_up(&conn->c_path[0]); return rds_conn_path_up(&conn->c_path[0]);
} }
...@@ -709,6 +713,7 @@ rds_conn_path_connecting(struct rds_conn_path *cp) ...@@ -709,6 +713,7 @@ rds_conn_path_connecting(struct rds_conn_path *cp)
static inline int static inline int
rds_conn_connecting(struct rds_connection *conn) rds_conn_connecting(struct rds_connection *conn)
{ {
WARN_ON(conn->c_trans->t_mp_capable);
return rds_conn_path_connecting(&conn->c_path[0]); return rds_conn_path_connecting(&conn->c_path[0]);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment