Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f78cf0dc
Commit
f78cf0dc
authored
Feb 14, 2006
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
parents
4cbf8767
7d2babc4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
26 deletions
+55
-26
drivers/infiniband/core/mad.c
drivers/infiniband/core/mad.c
+9
-1
drivers/infiniband/hw/mthca/mthca_cmd.c
drivers/infiniband/hw/mthca/mthca_cmd.c
+19
-19
drivers/infiniband/hw/mthca/mthca_dev.h
drivers/infiniband/hw/mthca/mthca_dev.h
+2
-2
drivers/infiniband/ulp/ipoib/ipoib.h
drivers/infiniband/ulp/ipoib/ipoib.h
+1
-0
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+24
-4
No files found.
drivers/infiniband/core/mad.c
View file @
f78cf0dc
...
@@ -665,7 +665,15 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
...
@@ -665,7 +665,15 @@ static int handle_outgoing_dr_smp(struct ib_mad_agent_private *mad_agent_priv,
struct
ib_wc
mad_wc
;
struct
ib_wc
mad_wc
;
struct
ib_send_wr
*
send_wr
=
&
mad_send_wr
->
send_wr
;
struct
ib_send_wr
*
send_wr
=
&
mad_send_wr
->
send_wr
;
if
(
!
smi_handle_dr_smp_send
(
smp
,
device
->
node_type
,
port_num
))
{
/*
* Directed route handling starts if the initial LID routed part of
* a request or the ending LID routed part of a response is empty.
* If we are at the start of the LID routed part, don't update the
* hop_ptr or hop_cnt. See section 14.2.2, Vol 1 IB spec.
*/
if
((
ib_get_smp_direction
(
smp
)
?
smp
->
dr_dlid
:
smp
->
dr_slid
)
==
IB_LID_PERMISSIVE
&&
!
smi_handle_dr_smp_send
(
smp
,
device
->
node_type
,
port_num
))
{
ret
=
-
EINVAL
;
ret
=
-
EINVAL
;
printk
(
KERN_ERR
PFX
"Invalid directed route
\n
"
);
printk
(
KERN_ERR
PFX
"Invalid directed route
\n
"
);
goto
out
;
goto
out
;
...
...
drivers/infiniband/hw/mthca/mthca_cmd.c
View file @
f78cf0dc
...
@@ -1029,25 +1029,6 @@ int mthca_QUERY_DEV_LIM(struct mthca_dev *dev,
...
@@ -1029,25 +1029,6 @@ int mthca_QUERY_DEV_LIM(struct mthca_dev *dev,
MTHCA_GET
(
size
,
outbox
,
QUERY_DEV_LIM_UAR_ENTRY_SZ_OFFSET
);
MTHCA_GET
(
size
,
outbox
,
QUERY_DEV_LIM_UAR_ENTRY_SZ_OFFSET
);
dev_lim
->
uar_scratch_entry_sz
=
size
;
dev_lim
->
uar_scratch_entry_sz
=
size
;
mthca_dbg
(
dev
,
"Max QPs: %d, reserved QPs: %d, entry size: %d
\n
"
,
dev_lim
->
max_qps
,
dev_lim
->
reserved_qps
,
dev_lim
->
qpc_entry_sz
);
mthca_dbg
(
dev
,
"Max SRQs: %d, reserved SRQs: %d, entry size: %d
\n
"
,
dev_lim
->
max_srqs
,
dev_lim
->
reserved_srqs
,
dev_lim
->
srq_entry_sz
);
mthca_dbg
(
dev
,
"Max CQs: %d, reserved CQs: %d, entry size: %d
\n
"
,
dev_lim
->
max_cqs
,
dev_lim
->
reserved_cqs
,
dev_lim
->
cqc_entry_sz
);
mthca_dbg
(
dev
,
"Max EQs: %d, reserved EQs: %d, entry size: %d
\n
"
,
dev_lim
->
max_eqs
,
dev_lim
->
reserved_eqs
,
dev_lim
->
eqc_entry_sz
);
mthca_dbg
(
dev
,
"reserved MPTs: %d, reserved MTTs: %d
\n
"
,
dev_lim
->
reserved_mrws
,
dev_lim
->
reserved_mtts
);
mthca_dbg
(
dev
,
"Max PDs: %d, reserved PDs: %d, reserved UARs: %d
\n
"
,
dev_lim
->
max_pds
,
dev_lim
->
reserved_pds
,
dev_lim
->
reserved_uars
);
mthca_dbg
(
dev
,
"Max QP/MCG: %d, reserved MGMs: %d
\n
"
,
dev_lim
->
max_pds
,
dev_lim
->
reserved_mgms
);
mthca_dbg
(
dev
,
"Max CQEs: %d, max WQEs: %d, max SRQ WQEs: %d
\n
"
,
dev_lim
->
max_cq_sz
,
dev_lim
->
max_qp_sz
,
dev_lim
->
max_srq_sz
);
mthca_dbg
(
dev
,
"Flags: %08x
\n
"
,
dev_lim
->
flags
);
if
(
mthca_is_memfree
(
dev
))
{
if
(
mthca_is_memfree
(
dev
))
{
MTHCA_GET
(
field
,
outbox
,
QUERY_DEV_LIM_MAX_SRQ_SZ_OFFSET
);
MTHCA_GET
(
field
,
outbox
,
QUERY_DEV_LIM_MAX_SRQ_SZ_OFFSET
);
dev_lim
->
max_srq_sz
=
1
<<
field
;
dev_lim
->
max_srq_sz
=
1
<<
field
;
...
@@ -1093,6 +1074,25 @@ int mthca_QUERY_DEV_LIM(struct mthca_dev *dev,
...
@@ -1093,6 +1074,25 @@ int mthca_QUERY_DEV_LIM(struct mthca_dev *dev,
dev_lim
->
mpt_entry_sz
=
MTHCA_MPT_ENTRY_SIZE
;
dev_lim
->
mpt_entry_sz
=
MTHCA_MPT_ENTRY_SIZE
;
}
}
mthca_dbg
(
dev
,
"Max QPs: %d, reserved QPs: %d, entry size: %d
\n
"
,
dev_lim
->
max_qps
,
dev_lim
->
reserved_qps
,
dev_lim
->
qpc_entry_sz
);
mthca_dbg
(
dev
,
"Max SRQs: %d, reserved SRQs: %d, entry size: %d
\n
"
,
dev_lim
->
max_srqs
,
dev_lim
->
reserved_srqs
,
dev_lim
->
srq_entry_sz
);
mthca_dbg
(
dev
,
"Max CQs: %d, reserved CQs: %d, entry size: %d
\n
"
,
dev_lim
->
max_cqs
,
dev_lim
->
reserved_cqs
,
dev_lim
->
cqc_entry_sz
);
mthca_dbg
(
dev
,
"Max EQs: %d, reserved EQs: %d, entry size: %d
\n
"
,
dev_lim
->
max_eqs
,
dev_lim
->
reserved_eqs
,
dev_lim
->
eqc_entry_sz
);
mthca_dbg
(
dev
,
"reserved MPTs: %d, reserved MTTs: %d
\n
"
,
dev_lim
->
reserved_mrws
,
dev_lim
->
reserved_mtts
);
mthca_dbg
(
dev
,
"Max PDs: %d, reserved PDs: %d, reserved UARs: %d
\n
"
,
dev_lim
->
max_pds
,
dev_lim
->
reserved_pds
,
dev_lim
->
reserved_uars
);
mthca_dbg
(
dev
,
"Max QP/MCG: %d, reserved MGMs: %d
\n
"
,
dev_lim
->
max_pds
,
dev_lim
->
reserved_mgms
);
mthca_dbg
(
dev
,
"Max CQEs: %d, max WQEs: %d, max SRQ WQEs: %d
\n
"
,
dev_lim
->
max_cq_sz
,
dev_lim
->
max_qp_sz
,
dev_lim
->
max_srq_sz
);
mthca_dbg
(
dev
,
"Flags: %08x
\n
"
,
dev_lim
->
flags
);
out:
out:
mthca_free_mailbox
(
dev
,
mailbox
);
mthca_free_mailbox
(
dev
,
mailbox
);
return
err
;
return
err
;
...
...
drivers/infiniband/hw/mthca/mthca_dev.h
View file @
f78cf0dc
...
@@ -53,8 +53,8 @@
...
@@ -53,8 +53,8 @@
#define DRV_NAME "ib_mthca"
#define DRV_NAME "ib_mthca"
#define PFX DRV_NAME ": "
#define PFX DRV_NAME ": "
#define DRV_VERSION "0.0
6
"
#define DRV_VERSION "0.0
7
"
#define DRV_RELDATE "
June 23, 2005
"
#define DRV_RELDATE "
February 13, 2006
"
enum
{
enum
{
MTHCA_FLAG_DDR_HIDDEN
=
1
<<
1
,
MTHCA_FLAG_DDR_HIDDEN
=
1
<<
1
,
...
...
drivers/infiniband/ulp/ipoib/ipoib.h
View file @
f78cf0dc
...
@@ -78,6 +78,7 @@ enum {
...
@@ -78,6 +78,7 @@ enum {
IPOIB_FLAG_SUBINTERFACE
=
4
,
IPOIB_FLAG_SUBINTERFACE
=
4
,
IPOIB_MCAST_RUN
=
5
,
IPOIB_MCAST_RUN
=
5
,
IPOIB_STOP_REAPER
=
6
,
IPOIB_STOP_REAPER
=
6
,
IPOIB_MCAST_STARTED
=
7
,
IPOIB_MAX_BACKOFF_SECONDS
=
16
,
IPOIB_MAX_BACKOFF_SECONDS
=
16
,
...
...
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
View file @
f78cf0dc
...
@@ -533,8 +533,10 @@ void ipoib_mcast_join_task(void *dev_ptr)
...
@@ -533,8 +533,10 @@ void ipoib_mcast_join_task(void *dev_ptr)
}
}
if
(
!
priv
->
broadcast
)
{
if
(
!
priv
->
broadcast
)
{
priv
->
broadcast
=
ipoib_mcast_alloc
(
dev
,
1
);
struct
ipoib_mcast
*
broadcast
;
if
(
!
priv
->
broadcast
)
{
broadcast
=
ipoib_mcast_alloc
(
dev
,
1
);
if
(
!
broadcast
)
{
ipoib_warn
(
priv
,
"failed to allocate broadcast group
\n
"
);
ipoib_warn
(
priv
,
"failed to allocate broadcast group
\n
"
);
mutex_lock
(
&
mcast_mutex
);
mutex_lock
(
&
mcast_mutex
);
if
(
test_bit
(
IPOIB_MCAST_RUN
,
&
priv
->
flags
))
if
(
test_bit
(
IPOIB_MCAST_RUN
,
&
priv
->
flags
))
...
@@ -544,10 +546,11 @@ void ipoib_mcast_join_task(void *dev_ptr)
...
@@ -544,10 +546,11 @@ void ipoib_mcast_join_task(void *dev_ptr)
return
;
return
;
}
}
memcpy
(
priv
->
broadcast
->
mcmember
.
mgid
.
raw
,
priv
->
dev
->
broadcast
+
4
,
spin_lock_irq
(
&
priv
->
lock
);
memcpy
(
broadcast
->
mcmember
.
mgid
.
raw
,
priv
->
dev
->
broadcast
+
4
,
sizeof
(
union
ib_gid
));
sizeof
(
union
ib_gid
));
priv
->
broadcast
=
broadcast
;
spin_lock_irq
(
&
priv
->
lock
);
__ipoib_mcast_add
(
dev
,
priv
->
broadcast
);
__ipoib_mcast_add
(
dev
,
priv
->
broadcast
);
spin_unlock_irq
(
&
priv
->
lock
);
spin_unlock_irq
(
&
priv
->
lock
);
}
}
...
@@ -601,6 +604,10 @@ int ipoib_mcast_start_thread(struct net_device *dev)
...
@@ -601,6 +604,10 @@ int ipoib_mcast_start_thread(struct net_device *dev)
queue_work
(
ipoib_workqueue
,
&
priv
->
mcast_task
);
queue_work
(
ipoib_workqueue
,
&
priv
->
mcast_task
);
mutex_unlock
(
&
mcast_mutex
);
mutex_unlock
(
&
mcast_mutex
);
spin_lock_irq
(
&
priv
->
lock
);
set_bit
(
IPOIB_MCAST_STARTED
,
&
priv
->
flags
);
spin_unlock_irq
(
&
priv
->
lock
);
return
0
;
return
0
;
}
}
...
@@ -611,6 +618,10 @@ int ipoib_mcast_stop_thread(struct net_device *dev, int flush)
...
@@ -611,6 +618,10 @@ int ipoib_mcast_stop_thread(struct net_device *dev, int flush)
ipoib_dbg_mcast
(
priv
,
"stopping multicast thread
\n
"
);
ipoib_dbg_mcast
(
priv
,
"stopping multicast thread
\n
"
);
spin_lock_irq
(
&
priv
->
lock
);
clear_bit
(
IPOIB_MCAST_STARTED
,
&
priv
->
flags
);
spin_unlock_irq
(
&
priv
->
lock
);
mutex_lock
(
&
mcast_mutex
);
mutex_lock
(
&
mcast_mutex
);
clear_bit
(
IPOIB_MCAST_RUN
,
&
priv
->
flags
);
clear_bit
(
IPOIB_MCAST_RUN
,
&
priv
->
flags
);
cancel_delayed_work
(
&
priv
->
mcast_task
);
cancel_delayed_work
(
&
priv
->
mcast_task
);
...
@@ -693,6 +704,14 @@ void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid,
...
@@ -693,6 +704,14 @@ void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid,
*/
*/
spin_lock
(
&
priv
->
lock
);
spin_lock
(
&
priv
->
lock
);
if
(
!
test_bit
(
IPOIB_MCAST_STARTED
,
&
priv
->
flags
)
||
!
priv
->
broadcast
||
!
test_bit
(
IPOIB_MCAST_FLAG_ATTACHED
,
&
priv
->
broadcast
->
flags
))
{
++
priv
->
stats
.
tx_dropped
;
dev_kfree_skb_any
(
skb
);
goto
unlock
;
}
mcast
=
__ipoib_mcast_find
(
dev
,
mgid
);
mcast
=
__ipoib_mcast_find
(
dev
,
mgid
);
if
(
!
mcast
)
{
if
(
!
mcast
)
{
/* Let's create a new send only group now */
/* Let's create a new send only group now */
...
@@ -754,6 +773,7 @@ void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid,
...
@@ -754,6 +773,7 @@ void ipoib_mcast_send(struct net_device *dev, union ib_gid *mgid,
ipoib_send
(
dev
,
skb
,
mcast
->
ah
,
IB_MULTICAST_QPN
);
ipoib_send
(
dev
,
skb
,
mcast
->
ah
,
IB_MULTICAST_QPN
);
}
}
unlock:
spin_unlock
(
&
priv
->
lock
);
spin_unlock
(
&
priv
->
lock
);
}
}
...
...
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