]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: Rename HAIP parameters to Active Bonding
authorBang Nguyen <bang.nguyen@oracle.com>
Wed, 5 Jun 2013 22:49:10 +0000 (15:49 -0700)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Wed, 8 Jul 2015 20:37:58 +0000 (13:37 -0700)
Orabug: 16810395
Signed-off-by: Bang Nguyen <bang.nguyen@oracle.com>
(cherry picked from commit 5fc4ef482f653e8510875e5fe0fd6936b5133d15)

net/rds/ib.c
net/rds/ib.h
net/rds/ib_cm.c
net/rds/ib_recv.c
net/rds/ib_send.c

index 4eb29061ccac5c6106141e01ecd1511379c0c239..9051b003fa6fde6a0b22b2fc01783aa2bdece17e 100644 (file)
@@ -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,
        "<ifname>[,<ifname>]*[;<ifname>[,<ifname>]*]*");
 #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);
index 886d91f71546d9b33a3ffcafdef5bac68c6a869a..e85b31a8acfb54386ecff4be74e1cb088cd52b7d 100644 (file)
@@ -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
index 45cc22311295004423bb2daa191aa4899617353c..8ef5e4498b0a96f207d5398ce90a3a998ad0cb3d 100644 (file)
@@ -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;
 
index 40fdd665c7a81a835d70d83618b5ca2079ae9e3e..26a4d0540121cf1b7599bb91cb27c8a52329398b 100644 (file)
@@ -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);
        }
 
        /*
index b4611407614075459f4b04db60cf323ae1c742aa..f7f0c94602080e519689991f6fc789d2c17a8758 100644 (file)
@@ -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;
 }