From 89766a1b95df82e282a7bba112824fbfdcc2c675 Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Mon, 9 May 2016 22:51:11 -0700 Subject: [PATCH] RDS: IB: drop workaround for loopback connection hangs There is no need to modify the ARP cache directly under the assumption that it helps to speed up the failover/failback for loopback connections. The ARP cache is properly updated by core IPv4 code and one of the issue with RDS active bonding code with arp has been addressed as part of 'commit 42a7becc725f ("RDS: IB: Make use of ARPOP_REQUEST instead of ARPOP_REPLY in bonding code")'. Remove the workaround added as part of bug 16979994 with patch "RDS: Local address resolution may be delayed after IP has moved" Orabug: 22347191 Tested-by: Michael Nowak Tested-by: Rafael Alejandro Peralez Tested-by: Liwen Huang Tested-by: Hong Liu Reviewed-by: Mukesh Kacker Signed-off-by: Santosh Shilimkar --- net/rds/ib.c | 80 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 78 deletions(-) diff --git a/net/rds/ib.c b/net/rds/ib.c index e2234280b25e..b0408e14fbf8 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -584,26 +584,6 @@ static int rds_ib_addr_exist(struct net_device *ndev, return found; } -static void rds_ib_update_arp_cache(struct net_device *out_dev, - unsigned char *dev_addr, - __be32 ip_addr) -{ - int ret = 0; - struct neighbour *neigh; - - neigh = __neigh_lookup_errno(&arp_tbl, &ip_addr, out_dev); - if (!IS_ERR(neigh)) { - ret = neigh_update(neigh, dev_addr, NUD_STALE, - NEIGH_UPDATE_F_OVERRIDE | - NEIGH_UPDATE_F_ADMIN); - if (ret) - printk(KERN_ERR "RDS/IB: neigh_update failed (%d) " - "for out_dev %s IP %u.%u.%u.%u\n", - ret, out_dev->name, NIPQUAD(ip_addr)); - neigh_release(neigh); - } -} - static void rds_ib_conn_drop(struct work_struct *_work) { struct rds_ib_conn_drop_work *work = @@ -654,9 +634,9 @@ static int rds_ib_move_ip(char *from_dev, char to_dev2[2*IFNAMSIZ + 1]; char *tmp_str; int ret = 0; - u8 active_port, i, j, port = 0; + u8 active_port; struct in_device *in_dev; - struct rds_ib_connection *ic, *ic2; + struct rds_ib_connection *ic; struct rds_ib_device *rds_ibdev; struct rds_ib_conn_drop_work *work; struct rds_ib_addr_change_work *work_addrchange; @@ -785,62 +765,6 @@ static int rds_ib_move_ip(char *from_dev, spin_lock_bh(&rds_ibdev->spinlock); list_for_each_entry(ic, &rds_ibdev->conn_list, ib_node) { if (ic->conn->c_laddr == addr) { - /* if local connection, update the ARP cache */ - if (ic->conn->c_loopback) { - for (i = 1; i <= ip_port_cnt; i++) { - if (ip_config[i].ip_addr == - ic->conn->c_faddr) { - port = i; - break; - } - - for (j = 0; j < ip_config[i].alias_cnt; j++) { - if (ip_config[i].aliases[j].ip_addr == ic->conn->c_faddr) { - port = i; - break; - } - } - } - - BUG_ON(!port); - - rds_ib_update_arp_cache( - ip_config[from_port].dev, - ip_config[port].dev->dev_addr, - ic->conn->c_faddr); - - rds_ib_update_arp_cache( - ip_config[to_port].dev, - ip_config[port].dev->dev_addr, - ic->conn->c_faddr); - - rds_ib_update_arp_cache( - ip_config[from_port].dev, - ip_config[to_port].dev->dev_addr, - ic->conn->c_laddr); - - rds_ib_update_arp_cache( - ip_config[to_port].dev, - ip_config[to_port].dev->dev_addr, - ic->conn->c_laddr); - - list_for_each_entry(ic2, - &rds_ibdev->conn_list, - ib_node) { - if (ic2->conn->c_laddr == - ic->conn->c_faddr && - ic2->conn->c_faddr == - ic->conn->c_laddr) { - rds_rtd(RDS_RTD_CM_EXT_P, - "conn:%p, tos %d, calling rds_conn_drop\n", - ic2->conn, - ic2->conn->c_tos); - ic2->conn->c_drop_source = DR_IB_LOOPBACK_CONN_DROP; - rds_conn_drop(ic2->conn); - } - } - } - /* * For failover from HW PORT event, do * delayed connection drop, else call -- 2.50.1