summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSean Hefty <sean.hefty@intel.com>2013-05-29 10:09:10 -0700
committerRoland Dreier <roland@purestorage.com>2013-06-20 13:08:02 -0700
commitef560861c01c301cde3da154eb9c1c2619924c3a (patch)
tree67c9b7ec2cc29f65a958c4d55afd8130eeeb8f62 /include
parent2e2d190c5eb05d5a2615f4092e5fe821710404f9 (diff)
downloadlinux-0-day-ef560861c01c301cde3da154eb9c1c2619924c3a.tar.gz
linux-0-day-ef560861c01c301cde3da154eb9c1c2619924c3a.tar.xz
IB/addr: Add AF_IB support to ip_addr_size
Add support for AF_IB to ip_addr_size, and rename the function to account for the change. Give the compiler more control over whether the call should be inline or not by moving the definition into the .c file, removing the static inline, and exporting it. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include')
-rw-r--r--include/rdma/ib_addr.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index 99965395c5f3a..f3ac0f2c4c66f 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -102,11 +102,7 @@ void rdma_addr_cancel(struct rdma_dev_addr *addr);
int rdma_copy_addr(struct rdma_dev_addr *dev_addr, struct net_device *dev,
const unsigned char *dst_dev_addr);
-static inline int ip_addr_size(struct sockaddr *addr)
-{
- return addr->sa_family == AF_INET6 ?
- sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in);
-}
+int rdma_addr_size(struct sockaddr *addr);
static inline u16 ib_addr_get_pkey(struct rdma_dev_addr *dev_addr)
{