hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/include/rdma/ib_addr.h
....@@ -1,37 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
12 /*
23 * Copyright (c) 2005 Voltaire Inc. All rights reserved.
34 * Copyright (c) 2005 Intel Corporation. All rights reserved.
4
- *
5
- * This software is available to you under a choice of one of two
6
- * licenses. You may choose to be licensed under the terms of the GNU
7
- * General Public License (GPL) Version 2, available from the file
8
- * COPYING in the main directory of this source tree, or the
9
- * OpenIB.org BSD license below:
10
- *
11
- * Redistribution and use in source and binary forms, with or
12
- * without modification, are permitted provided that the following
13
- * conditions are met:
14
- *
15
- * - Redistributions of source code must retain the above
16
- * copyright notice, this list of conditions and the following
17
- * disclaimer.
18
- *
19
- * - Redistributions in binary form must reproduce the above
20
- * copyright notice, this list of conditions and the following
21
- * disclaimer in the documentation and/or other materials
22
- * provided with the distribution.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
325 */
336
34
-#if !defined(IB_ADDR_H)
7
+#ifndef IB_ADDR_H
358 #define IB_ADDR_H
369
3710 #include <linux/in.h>
....@@ -46,7 +19,6 @@
4619 #include <net/ip.h>
4720 #include <rdma/ib_verbs.h>
4821 #include <rdma/ib_pack.h>
49
-#include <net/ipv6.h>
5022 #include <net/net_namespace.h>
5123
5224 /**
....@@ -95,19 +67,17 @@
9567 * @timeout_ms: Amount of time to wait for the address resolution to complete.
9668 * @callback: Call invoked once address resolution has completed, timed out,
9769 * or been canceled. A status of 0 indicates success.
70
+ * @resolve_by_gid_attr: Resolve the ip based on the GID attribute from
71
+ * rdma_dev_addr.
9872 * @context: User-specified context associated with the call.
9973 */
10074 int rdma_resolve_ip(struct sockaddr *src_addr, const struct sockaddr *dst_addr,
101
- struct rdma_dev_addr *addr, int timeout_ms,
75
+ struct rdma_dev_addr *addr, unsigned long timeout_ms,
10276 void (*callback)(int status, struct sockaddr *src_addr,
10377 struct rdma_dev_addr *addr, void *context),
104
- void *context);
78
+ bool resolve_by_gid_attr, void *context);
10579
10680 void rdma_addr_cancel(struct rdma_dev_addr *addr);
107
-
108
-void rdma_copy_addr(struct rdma_dev_addr *dev_addr,
109
- const struct net_device *dev,
110
- const unsigned char *dst_dev_addr);
11181
11282 int rdma_addr_size(const struct sockaddr *addr);
11383 int rdma_addr_size_in6(struct sockaddr_in6 *addr);