ib_rdma.c (664b0bae0b87f69bc9deb098f5e0158b9cf18e04) | ib_rdma.c (eee2fa6ab3225192d6d894c54a6fb02ac9efdff6) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2006 Oracle. All rights reserved. | 2 * Copyright (c) 2006, 2017 Oracle and/or its affiliates. All rights reserved. |
3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: 9 * 10 * Redistribution and use in source and binary forms, with or --- 84 unchanged lines hidden (view full) --- 95 } 96 } 97 spin_unlock_irq(&rds_ibdev->spinlock); 98 99 if (to_free) 100 kfree_rcu(to_free, rcu); 101} 102 | 3 * 4 * This software is available to you under a choice of one of two 5 * licenses. You may choose to be licensed under the terms of the GNU 6 * General Public License (GPL) Version 2, available from the file 7 * COPYING in the main directory of this source tree, or the 8 * OpenIB.org BSD license below: 9 * 10 * Redistribution and use in source and binary forms, with or --- 84 unchanged lines hidden (view full) --- 95 } 96 } 97 spin_unlock_irq(&rds_ibdev->spinlock); 98 99 if (to_free) 100 kfree_rcu(to_free, rcu); 101} 102 |
103int rds_ib_update_ipaddr(struct rds_ib_device *rds_ibdev, __be32 ipaddr) | 103int rds_ib_update_ipaddr(struct rds_ib_device *rds_ibdev, 104 struct in6_addr *ipaddr) |
104{ 105 struct rds_ib_device *rds_ibdev_old; 106 | 105{ 106 struct rds_ib_device *rds_ibdev_old; 107 |
107 rds_ibdev_old = rds_ib_get_device(ipaddr); | 108 rds_ibdev_old = rds_ib_get_device(ipaddr->s6_addr32[3]); |
108 if (!rds_ibdev_old) | 109 if (!rds_ibdev_old) |
109 return rds_ib_add_ipaddr(rds_ibdev, ipaddr); | 110 return rds_ib_add_ipaddr(rds_ibdev, ipaddr->s6_addr32[3]); |
110 111 if (rds_ibdev_old != rds_ibdev) { | 111 112 if (rds_ibdev_old != rds_ibdev) { |
112 rds_ib_remove_ipaddr(rds_ibdev_old, ipaddr); | 113 rds_ib_remove_ipaddr(rds_ibdev_old, ipaddr->s6_addr32[3]); |
113 rds_ib_dev_put(rds_ibdev_old); | 114 rds_ib_dev_put(rds_ibdev_old); |
114 return rds_ib_add_ipaddr(rds_ibdev, ipaddr); | 115 return rds_ib_add_ipaddr(rds_ibdev, ipaddr->s6_addr32[3]); |
115 } 116 rds_ib_dev_put(rds_ibdev_old); 117 118 return 0; 119} 120 121void rds_ib_add_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn) 122{ --- 416 unchanged lines hidden (view full) --- 539void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents, 540 struct rds_sock *rs, u32 *key_ret) 541{ 542 struct rds_ib_device *rds_ibdev; 543 struct rds_ib_mr *ibmr = NULL; 544 struct rds_ib_connection *ic = rs->rs_conn->c_transport_data; 545 int ret; 546 | 116 } 117 rds_ib_dev_put(rds_ibdev_old); 118 119 return 0; 120} 121 122void rds_ib_add_conn(struct rds_ib_device *rds_ibdev, struct rds_connection *conn) 123{ --- 416 unchanged lines hidden (view full) --- 540void *rds_ib_get_mr(struct scatterlist *sg, unsigned long nents, 541 struct rds_sock *rs, u32 *key_ret) 542{ 543 struct rds_ib_device *rds_ibdev; 544 struct rds_ib_mr *ibmr = NULL; 545 struct rds_ib_connection *ic = rs->rs_conn->c_transport_data; 546 int ret; 547 |
547 rds_ibdev = rds_ib_get_device(rs->rs_bound_addr); | 548 rds_ibdev = rds_ib_get_device(rs->rs_bound_addr.s6_addr32[3]); |
548 if (!rds_ibdev) { 549 ret = -ENODEV; 550 goto out; 551 } 552 553 if (!rds_ibdev->mr_8k_pool || !rds_ibdev->mr_1m_pool) { 554 ret = -ENODEV; 555 goto out; --- 80 unchanged lines hidden --- | 549 if (!rds_ibdev) { 550 ret = -ENODEV; 551 goto out; 552 } 553 554 if (!rds_ibdev->mr_8k_pool || !rds_ibdev->mr_1m_pool) { 555 ret = -ENODEV; 556 goto out; --- 80 unchanged lines hidden --- |