From: Bang Nguyen Date: Wed, 5 Jun 2013 22:49:10 +0000 (-0700) Subject: RDS: Rename HAIP parameters to Active Bonding X-Git-Tag: v4.1.12-92~293^2^2~63 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f897d417ab3e4b8380d1e164110c59bd5b88e68b;p=users%2Fjedix%2Flinux-maple.git RDS: Rename HAIP parameters to Active Bonding Orabug: 16810395 Signed-off-by: Bang Nguyen (cherry picked from commit 5fc4ef482f653e8510875e5fe0fd6936b5133d15) --- diff --git a/net/rds/ib.c b/net/rds/ib.c index 4eb29061ccac..9051b003fa6f 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -56,8 +56,8 @@ unsigned int rds_ib_retry_count = RDS_IB_DEFAULT_RETRY_COUNT; unsigned int rds_ib_apm_enabled = 0; unsigned int rds_ib_apm_fallback = 1; #endif -unsigned int rds_ib_haip_enabled = 0; -unsigned int rds_ib_haip_fallback = 1; +unsigned int rds_ib_active_bonding_enabled = 0; +unsigned int rds_ib_active_bonding_fallback = 1; #if RDMA_RDS_APM_SUPPORTED unsigned int rds_ib_apm_timeout = RDS_IB_DEFAULT_TIMEOUT; #endif @@ -65,8 +65,8 @@ unsigned int rds_ib_rnr_retry_count = RDS_IB_DEFAULT_RNR_RETRY_COUNT; #if IB_RDS_CQ_VECTOR_SUPPORTED unsigned int rds_ib_cq_balance_enabled = 1; #endif -static char *rds_ib_haip_failover_groups = NULL; -unsigned int rds_ib_haip_arps = RDS_IB_DEFAULT_NUM_ARPS; +static char *rds_ib_active_bonding_failover_groups = NULL; +unsigned int rds_ib_active_bonding_arps = RDS_IB_DEFAULT_NUM_ARPS; module_param(rds_ib_fmr_1m_pool_size, int, 0444); MODULE_PARM_DESC(rds_ib_fmr_1m_pool_size, " Max number of 1m fmr per HCA"); @@ -78,8 +78,8 @@ MODULE_PARM_DESC(rds_ib_retry_count, " Number of hw retries before reporting an module_param(rds_ib_apm_enabled, int, 0444); MODULE_PARM_DESC(rds_ib_apm_enabled, " APM Enabled"); #endif -module_param(rds_ib_haip_enabled, int, 0444); -MODULE_PARM_DESC(rds_ib_haip_enabled, " High Availability IP enabled"); +module_param(rds_ib_active_bonding_enabled, int, 0444); +MODULE_PARM_DESC(rds_ib_active_bonding_enabled, " Active Bonding enabled"); #if RDMA_RDS_APM_SUPPORTED module_param(rds_ib_apm_timeout, int, 0444); MODULE_PARM_DESC(rds_ib_apm_timeout, " APM timeout"); @@ -90,17 +90,17 @@ MODULE_PARM_DESC(rds_ib_rnr_retry_count, " QP rnr retry count"); module_param(rds_ib_apm_fallback, int, 0444); MODULE_PARM_DESC(rds_ib_apm_fallback, " APM failback enabled"); #endif -module_param(rds_ib_haip_fallback, int, 0444); -MODULE_PARM_DESC(rds_ib_haip_fallback, " HAIP failback Enabled"); -module_param(rds_ib_haip_failover_groups, charp, 0444); -MODULE_PARM_DESC(rds_ib_haip_failover_groups, +module_param(rds_ib_active_bonding_fallback, int, 0444); +MODULE_PARM_DESC(rds_ib_active_bonding_fallback, " Active Bonding failback Enabled"); +module_param(rds_ib_active_bonding_failover_groups, charp, 0444); +MODULE_PARM_DESC(rds_ib_active_bonding_failover_groups, "[,]*[;[,]*]*"); #if IB_RDS_CQ_VECTOR_SUPPORTED module_param(rds_ib_cq_balance_enabled, int, 0444); MODULE_PARM_DESC(rds_ib_cq_balance_enabled, " CQ load balance Enabled"); #endif -module_param(rds_ib_haip_arps, int, 0444); -MODULE_PARM_DESC(rds_ib_haip_arps, " Num ARPs to be sent when IP moved"); +module_param(rds_ib_active_bonding_arps, int, 0444); +MODULE_PARM_DESC(rds_ib_active_bonding_arps, " Num ARPs to be sent when IP moved"); /* * we have a clumsy combination of RCU and a rwsem protecting this list @@ -232,7 +232,7 @@ void rds_ib_remove_one(struct ib_device *device) if (!rds_ibdev) return; - if (rds_ib_haip_enabled) + if (rds_ib_active_bonding_enabled) ib_unregister_event_handler(&rds_ibdev->event_handler); rds_ib_dev_shutdown(rds_ibdev); @@ -406,7 +406,7 @@ static void rds_ib_send_gratuitous_arp(struct net_device *out_dev, int i; /* Send multiple ARPs to improve reliability */ - for (i = 0; i < rds_ib_haip_arps; i++) { + for (i = 0; i < rds_ib_active_bonding_arps; i++) { arp_send(ARPOP_REQUEST, ETH_P_ARP, ip_addr, out_dev, ip_addr, NULL, @@ -972,7 +972,7 @@ static void rds_ib_event_handler(struct ib_event_handler *handler, u8 port; struct rds_ib_port_ud_work *work; - if (!rds_ib_haip_enabled || !ip_port_cnt) + if (!rds_ib_active_bonding_enabled || !ip_port_cnt) return; if (event->event != IB_EVENT_PORT_ACTIVE && @@ -1002,7 +1002,7 @@ static void rds_ib_event_handler(struct ib_event_handler *handler, work->event_type = RDS_IB_PORT_EVENT_IB; if (event->event == IB_EVENT_PORT_ACTIVE) { - if (rds_ib_haip_fallback) { + if (rds_ib_active_bonding_fallback) { INIT_DELAYED_WORK(&work->work, rds_ib_failback); queue_delayed_work(rds_wq, &work->work, 0); } else @@ -1018,7 +1018,7 @@ static void rds_ib_dump_ip_config(void) { int i, j; - if (!rds_ib_haip_enabled) + if (!rds_ib_active_bonding_enabled) return; printk(KERN_ERR "RDS/IB: IP configuration ...\n"); @@ -1065,7 +1065,7 @@ static int rds_ib_ip_config_init(bool reinit) u8 port_num; u8 port; - if (!rds_ib_haip_enabled) + if (!rds_ib_active_bonding_enabled) return 0; if (!reinit) @@ -1139,10 +1139,10 @@ void rds_ib_ip_failover_groups_init(void) int i; struct rds_ib_device *rds_ibdev; - if (!rds_ib_haip_enabled) + if (!rds_ib_active_bonding_enabled) return; - if (rds_ib_haip_failover_groups == NULL) { + if (rds_ib_active_bonding_failover_groups == NULL) { rcu_read_lock(); list_for_each_entry_rcu(rds_ibdev, &rds_ib_devices, list) { for (i = 1; i <= ip_port_cnt; i++) { @@ -1155,7 +1155,7 @@ void rds_ib_ip_failover_groups_init(void) return; } - strcpy(str, rds_ib_haip_failover_groups); + strcpy(str, rds_ib_active_bonding_failover_groups); nxt_grp = strchr(str, ';'); if (nxt_grp) { *nxt_grp = '\0'; @@ -1252,7 +1252,7 @@ void rds_ib_add_one(struct ib_device *device) goto put_dev; } - if (rds_ib_haip_enabled) { + if (rds_ib_active_bonding_enabled) { INIT_IB_EVENT_HANDLER(&rds_ibdev->event_handler, rds_ibdev->dev, rds_ib_event_handler); if (ib_register_event_handler(&rds_ibdev->event_handler)) { @@ -1323,9 +1323,9 @@ static int rds_ib_netdev_callback(struct notifier_block *self, unsigned long eve struct net_device *ndev = netdev_notifier_info_to_dev(ctx); u8 port = 0; u8 i; - struct rds_ib_port_ud_work *work; + struct rds_ib_port_ud_work *work = NULL; - if (!rds_ib_haip_enabled || !ip_port_cnt) + if (!rds_ib_active_bonding_enabled || !ip_port_cnt) return NOTIFY_DONE; if (event != NETDEV_UP && event != NETDEV_DOWN && @@ -1361,7 +1361,7 @@ static int rds_ib_netdev_callback(struct notifier_block *self, unsigned long eve switch (event) { case NETDEV_UP: - if (rds_ib_haip_fallback) { + if (rds_ib_active_bonding_fallback) { if (rds_ib_ip_config_down()) { INIT_DELAYED_WORK(&work->work, rds_ib_net_failback); diff --git a/net/rds/ib.h b/net/rds/ib.h index 886d91f71546..e85b31a8acfb 100644 --- a/net/rds/ib.h +++ b/net/rds/ib.h @@ -445,9 +445,8 @@ extern unsigned int rds_ib_rnr_retry_count; extern unsigned int rds_ib_apm_enabled; extern unsigned int rds_ib_apm_fallback; #endif -extern unsigned int rds_ib_haip_enabled; -extern unsigned int rds_ib_haip_fallback; -extern unsigned int rds_ib_haip_failover_enabled; +extern unsigned int rds_ib_active_bonding_enabled; +extern unsigned int rds_ib_active_bonding_fallback; #if RDMA_RDS_APM_SUPPORTED extern unsigned int rds_ib_apm_timeout; #endif diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index 45cc22311295..8ef5e4498b0a 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c @@ -164,12 +164,13 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_even } printk(KERN_NOTICE - "RDS/IB: connected to %u.%u.%u.%u version %u.%u%s Tos %d\n", + "RDS/IB: connected <%u.%u.%u.%u,%u.%u.%u.%u,%d> version %u.%u%s\n", + NIPQUAD(conn->c_laddr), NIPQUAD(conn->c_faddr), + conn->c_tos, RDS_PROTOCOL_MAJOR(conn->c_version), RDS_PROTOCOL_MINOR(conn->c_version), - ic->i_flowctl ? ", flow control" : "", - conn->c_tos); + ic->i_flowctl ? ", flow control" : ""); ic->i_sl = ic->i_cm_id->route.path_rec->sl; diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index 40fdd665c7a8..26a4d0540121 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c @@ -1267,10 +1267,14 @@ void rds_ib_recv_cqe_handler(struct rds_ib_connection *ic, } else { /* We expect errors as the qp is drained during shutdown */ if (rds_conn_up(conn) || rds_conn_connecting(conn)) - rds_ib_conn_error(conn, "recv completion on " - "%pI4 had status %u, disconnecting and " - "reconnecting\n", &conn->c_faddr, - wc->status); + rds_ib_conn_error(conn, "recv completion " + "<%pI4,%pI4,%d> had " + "status %u, disconnecting and " + "reconnecting\n", + &conn->c_laddr, + &conn->c_faddr, + conn->c_tos, + wc->status); } /* diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index b46114076140..f7f0c9460208 100644 --- a/net/rds/ib_send.c +++ b/net/rds/ib_send.c @@ -307,9 +307,11 @@ void rds_ib_send_cqe_handler(struct rds_ib_connection *ic, struct ib_wc *wc) /* We expect errors as the qp is drained during shutdown */ if (wc->status != IB_WC_SUCCESS && rds_conn_up(conn)) { rds_ib_conn_error(conn, - "send completion on %pI4 " + "send completion <%u.%u.%u.%u,%u.%u.%u.%u,%d> " "had status %u, disconnecting and reconnecting\n", - &conn->c_faddr, wc->status); + NIPQUAD(conn->c_laddr), + NIPQUAD(conn->c_faddr), + conn->c_tos, wc->status); } else ic->i_last_migration = 0; }