ib_sa.h (ecd740c6f2f092b90b95fa35f757973589eaaca2) ib_sa.h (ba36e37fd3ca3dc8f215b14bcfdccf9f41b65767)
1/*
2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
4 * Copyright (c) 2006 Intel Corporation. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file

--- 25 unchanged lines hidden (view full) ---

34
35#ifndef IB_SA_H
36#define IB_SA_H
37
38#include <linux/completion.h>
39#include <linux/compiler.h>
40
41#include <linux/atomic.h>
1/*
2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
4 * Copyright (c) 2006 Intel Corporation. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file

--- 25 unchanged lines hidden (view full) ---

34
35#ifndef IB_SA_H
36#define IB_SA_H
37
38#include <linux/completion.h>
39#include <linux/compiler.h>
40
41#include <linux/atomic.h>
42#include <linux/netdevice.h>
42
43#include <rdma/ib_verbs.h>
44#include <rdma/ib_mad.h>
45
46enum {
47 IB_SA_CLASS_VERSION = 2, /* IB spec version 1.1/1.2 */
48
49 IB_SA_METHOD_GET_TABLE = 0x12,

--- 102 unchanged lines hidden (view full) ---

152 u8 rate_selector;
153 u8 rate;
154 u8 packet_life_time_selector;
155 u8 packet_life_time;
156 u8 preference;
157 u8 smac[ETH_ALEN];
158 u8 dmac[ETH_ALEN];
159 u16 vlan_id;
43
44#include <rdma/ib_verbs.h>
45#include <rdma/ib_mad.h>
46
47enum {
48 IB_SA_CLASS_VERSION = 2, /* IB spec version 1.1/1.2 */
49
50 IB_SA_METHOD_GET_TABLE = 0x12,

--- 102 unchanged lines hidden (view full) ---

153 u8 rate_selector;
154 u8 rate;
155 u8 packet_life_time_selector;
156 u8 packet_life_time;
157 u8 preference;
158 u8 smac[ETH_ALEN];
159 u8 dmac[ETH_ALEN];
160 u16 vlan_id;
161 /* ignored in IB */
162 int ifindex;
163 /* ignored in IB */
164 struct net *net;
160};
161
165};
166
167static inline struct net_device *ib_get_ndev_from_path(struct ib_sa_path_rec *rec)
168{
169 return rec->net ? dev_get_by_index(rec->net, rec->ifindex) : NULL;
170}
171
162#define IB_SA_MCMEMBER_REC_MGID IB_SA_COMP_MASK( 0)
163#define IB_SA_MCMEMBER_REC_PORT_GID IB_SA_COMP_MASK( 1)
164#define IB_SA_MCMEMBER_REC_QKEY IB_SA_COMP_MASK( 2)
165#define IB_SA_MCMEMBER_REC_MLID IB_SA_COMP_MASK( 3)
166#define IB_SA_MCMEMBER_REC_MTU_SELECTOR IB_SA_COMP_MASK( 4)
167#define IB_SA_MCMEMBER_REC_MTU IB_SA_COMP_MASK( 5)
168#define IB_SA_MCMEMBER_REC_TRAFFIC_CLASS IB_SA_COMP_MASK( 6)
169#define IB_SA_MCMEMBER_REC_PKEY IB_SA_COMP_MASK( 7)

--- 262 unchanged lines hidden ---
172#define IB_SA_MCMEMBER_REC_MGID IB_SA_COMP_MASK( 0)
173#define IB_SA_MCMEMBER_REC_PORT_GID IB_SA_COMP_MASK( 1)
174#define IB_SA_MCMEMBER_REC_QKEY IB_SA_COMP_MASK( 2)
175#define IB_SA_MCMEMBER_REC_MLID IB_SA_COMP_MASK( 3)
176#define IB_SA_MCMEMBER_REC_MTU_SELECTOR IB_SA_COMP_MASK( 4)
177#define IB_SA_MCMEMBER_REC_MTU IB_SA_COMP_MASK( 5)
178#define IB_SA_MCMEMBER_REC_TRAFFIC_CLASS IB_SA_COMP_MASK( 6)
179#define IB_SA_MCMEMBER_REC_PKEY IB_SA_COMP_MASK( 7)

--- 262 unchanged lines hidden ---