Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
a418500b
Commit
a418500b
authored
Sep 21, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
parents
62a36c43
f2065e42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
drivers/infiniband/core/mad_rmpp.c
drivers/infiniband/core/mad_rmpp.c
+8
-11
include/rdma/ib_mad.h
include/rdma/ib_mad.h
+11
-4
No files found.
drivers/infiniband/core/mad_rmpp.c
View file @
a418500b
...
...
@@ -412,8 +412,8 @@ static inline int get_mad_len(struct mad_rmpp_recv *rmpp_recv)
hdr_size
=
data_offset
(
rmpp_mad
->
mad_hdr
.
mgmt_class
);
data_size
=
sizeof
(
struct
ib_rmpp_mad
)
-
hdr_size
;
pad
=
data_size
-
be32_to_cpu
(
rmpp_mad
->
rmpp_hdr
.
paylen_newwin
);
if
(
pad
>
data_size
||
pad
<
0
)
pad
=
IB_MGMT_RMPP_DATA
-
be32_to_cpu
(
rmpp_mad
->
rmpp_hdr
.
paylen_newwin
);
if
(
pad
>
IB_MGMT_RMPP_DATA
||
pad
<
0
)
pad
=
0
;
return
hdr_size
+
rmpp_recv
->
seg_num
*
data_size
-
pad
;
...
...
@@ -583,6 +583,7 @@ static int send_next_seg(struct ib_mad_send_wr_private *mad_send_wr)
{
struct
ib_rmpp_mad
*
rmpp_mad
;
int
timeout
;
u32
paylen
;
rmpp_mad
=
(
struct
ib_rmpp_mad
*
)
mad_send_wr
->
send_wr
.
wr
.
ud
.
mad_hdr
;
ib_set_rmpp_flags
(
&
rmpp_mad
->
rmpp_hdr
,
IB_MGMT_RMPP_FLAG_ACTIVE
);
...
...
@@ -590,11 +591,9 @@ static int send_next_seg(struct ib_mad_send_wr_private *mad_send_wr)
if
(
mad_send_wr
->
seg_num
==
1
)
{
rmpp_mad
->
rmpp_hdr
.
rmpp_rtime_flags
|=
IB_MGMT_RMPP_FLAG_FIRST
;
rmpp_mad
->
rmpp_hdr
.
paylen_newwin
=
cpu_to_be32
(
mad_send_wr
->
total_seg
*
(
sizeof
(
struct
ib_rmpp_mad
)
-
offsetof
(
struct
ib_rmpp_mad
,
data
))
-
mad_send_wr
->
pad
);
paylen
=
mad_send_wr
->
total_seg
*
IB_MGMT_RMPP_DATA
-
mad_send_wr
->
pad
;
rmpp_mad
->
rmpp_hdr
.
paylen_newwin
=
cpu_to_be32
(
paylen
);
mad_send_wr
->
sg_list
[
0
].
length
=
sizeof
(
struct
ib_rmpp_mad
);
}
else
{
mad_send_wr
->
send_wr
.
num_sge
=
2
;
...
...
@@ -608,10 +607,8 @@ static int send_next_seg(struct ib_mad_send_wr_private *mad_send_wr)
if
(
mad_send_wr
->
seg_num
==
mad_send_wr
->
total_seg
)
{
rmpp_mad
->
rmpp_hdr
.
rmpp_rtime_flags
|=
IB_MGMT_RMPP_FLAG_LAST
;
rmpp_mad
->
rmpp_hdr
.
paylen_newwin
=
cpu_to_be32
(
sizeof
(
struct
ib_rmpp_mad
)
-
offsetof
(
struct
ib_rmpp_mad
,
data
)
-
mad_send_wr
->
pad
);
paylen
=
IB_MGMT_RMPP_DATA
-
mad_send_wr
->
pad
;
rmpp_mad
->
rmpp_hdr
.
paylen_newwin
=
cpu_to_be32
(
paylen
);
}
/* 2 seconds for an ACK until we can find the packet lifetime */
...
...
include/rdma/ib_mad.h
View file @
a418500b
...
...
@@ -108,6 +108,13 @@
#define IB_QP1_QKEY 0x80010000
#define IB_QP_SET_QKEY 0x80000000
enum
{
IB_MGMT_MAD_DATA
=
232
,
IB_MGMT_RMPP_DATA
=
220
,
IB_MGMT_VENDOR_DATA
=
216
,
IB_MGMT_SA_DATA
=
200
};
struct
ib_mad_hdr
{
u8
base_version
;
u8
mgmt_class
;
...
...
@@ -149,20 +156,20 @@ struct ib_sa_hdr {
struct
ib_mad
{
struct
ib_mad_hdr
mad_hdr
;
u8
data
[
232
];
u8
data
[
IB_MGMT_MAD_DATA
];
};
struct
ib_rmpp_mad
{
struct
ib_mad_hdr
mad_hdr
;
struct
ib_rmpp_hdr
rmpp_hdr
;
u8
data
[
220
];
u8
data
[
IB_MGMT_RMPP_DATA
];
};
struct
ib_sa_mad
{
struct
ib_mad_hdr
mad_hdr
;
struct
ib_rmpp_hdr
rmpp_hdr
;
struct
ib_sa_hdr
sa_hdr
;
u8
data
[
200
];
u8
data
[
IB_MGMT_SA_DATA
];
}
__attribute__
((
packed
));
struct
ib_vendor_mad
{
...
...
@@ -170,7 +177,7 @@ struct ib_vendor_mad {
struct
ib_rmpp_hdr
rmpp_hdr
;
u8
reserved
;
u8
oui
[
3
];
u8
data
[
216
];
u8
data
[
IB_MGMT_VENDOR_DATA
];
};
struct
ib_class_port_info
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment