* Re: [PATCH] net/core: use net_device dev_id to indicate port number
From: Stephen Hemminger @ 2010-05-26 15:23 UTC (permalink / raw)
To: Eli Cohen
Cc: davem-fT/PcQaiUtIeIZ0/mPfg9Q, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, rdreier-FYB4Gu1CFyUAvxtiuMwx3w,
yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
In-Reply-To: <20100526095200.GA7370-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
On Wed, 26 May 2010 12:52:00 +0300
Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org> wrote:
> Today, there are no means to know which port of a hardware device a netdev
> interface uses. struct net_device conatins a field, dev_id, that can be used
> for that. This patch adds a new macro, SET_NETDEV_DEV_ID(), to provide a
> standard way to set the value of this field.
> Also also make use of this feature in the mlx4_en driver to set the port
> number; port numbers are zero based.
Why is a macro wrapper needed?
--
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] net/core: use net_device dev_id to indicate port number
From: Eli Cohen @ 2010-05-26 15:27 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Eli Cohen, davem, netdev, linux-rdma, rdreier, yevgenyp
In-Reply-To: <20100526082306.25959fb6@nehalam>
On Wed, May 26, 2010 at 08:23:06AM -0700, Stephen Hemminger wrote:
> On Wed, 26 May 2010 12:52:00 +0300
> Eli Cohen <eli@mellanox.co.il> wrote:
>
> > Today, there are no means to know which port of a hardware device a netdev
> > interface uses. struct net_device conatins a field, dev_id, that can be used
> > for that. This patch adds a new macro, SET_NETDEV_DEV_ID(), to provide a
> > standard way to set the value of this field.
> > Also also make use of this feature in the mlx4_en driver to set the port
> > number; port numbers are zero based.
>
> Why is a macro wrapper needed?
>
I guess for the same reason we use SET_NETDEV_DEV - to provide a
consistent interface for setting this value...
^ permalink raw reply
* Re: [PATCH] net/core: use net_device dev_id to indicate port number
From: Stephen Hemminger @ 2010-05-26 15:33 UTC (permalink / raw)
To: Eli Cohen; +Cc: Eli Cohen, davem, netdev, linux-rdma, rdreier, yevgenyp
In-Reply-To: <20100526152730.GA10890@mtldesk030.lab.mtl.com>
On Wed, 26 May 2010 18:27:30 +0300
Eli Cohen <eli@dev.mellanox.co.il> wrote:
> On Wed, May 26, 2010 at 08:23:06AM -0700, Stephen Hemminger wrote:
> > On Wed, 26 May 2010 12:52:00 +0300
> > Eli Cohen <eli@mellanox.co.il> wrote:
> >
> > > Today, there are no means to know which port of a hardware device a netdev
> > > interface uses. struct net_device conatins a field, dev_id, that can be used
> > > for that. This patch adds a new macro, SET_NETDEV_DEV_ID(), to provide a
> > > standard way to set the value of this field.
> > > Also also make use of this feature in the mlx4_en driver to set the port
> > > number; port numbers are zero based.
> >
> > Why is a macro wrapper needed?
> >
>
> I guess for the same reason we use SET_NETDEV_DEV - to provide a
> consistent interface for setting this value...
SET_NETDEV_DEV macro exists because at the time 2.5 kernel was being developed
it was important to be able to maintain source compatibility between 2.4 and
2.6 (nee 2.5) drivers. Since 2.4 did not have sysfs, the macro was a mechanism
to allow the same code to run on both kernel versions.
Your situation is different, just use dev_id and update documentation if
you need to.
--
^ permalink raw reply
* Re: [PATCH] net/core: use net_device dev_id to indicate port number
From: Eli Cohen @ 2010-05-26 16:09 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Eli Cohen, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
rdreier-FYB4Gu1CFyUAvxtiuMwx3w, yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
In-Reply-To: <20100526083318.5b7b7704@nehalam>
On Wed, May 26, 2010 at 08:33:18AM -0700, Stephen Hemminger wrote:
>
> SET_NETDEV_DEV macro exists because at the time 2.5 kernel was being developed
> it was important to be able to maintain source compatibility between 2.4 and
> 2.6 (nee 2.5) drivers. Since 2.4 did not have sysfs, the macro was a mechanism
> to allow the same code to run on both kernel versions.
>
> Your situation is different, just use dev_id and update documentation if
> you need to.
>
OK, great. Things get much much simpler :-)
I'll send another patch for mlx4_en only.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] IB/qib: fix powerpc compile warnings
From: Ralph Campbell @ 2010-05-26 18:42 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Fix the compile warnings for uninitialized variables in qib_fs.c
when compiling for powerpc.
Signed-off-by: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/qib/qib_fs.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index 7554704..8a354f7 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -143,7 +143,7 @@ static const struct file_operations driver_ops[] = {
static ssize_t dev_counters_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- u64 *counters;
+ u64 *counters = NULL;
struct qib_devdata *dd = private2dd(file);
return simple_read_from_buffer(buf, count, ppos, counters,
@@ -154,7 +154,7 @@ static ssize_t dev_counters_read(struct file *file, char __user *buf,
static ssize_t dev_names_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- char *names;
+ char *names = NULL;
struct qib_devdata *dd = private2dd(file);
return simple_read_from_buffer(buf, count, ppos, names,
@@ -175,7 +175,7 @@ static const struct file_operations cntr_ops[] = {
static ssize_t portnames_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- char *names;
+ char *names = NULL;
struct qib_devdata *dd = private2dd(file);
return simple_read_from_buffer(buf, count, ppos, names,
@@ -186,7 +186,7 @@ static ssize_t portnames_read(struct file *file, char __user *buf,
static ssize_t portcntrs_1_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- u64 *counters;
+ u64 *counters = NULL;
struct qib_devdata *dd = private2dd(file);
return simple_read_from_buffer(buf, count, ppos, counters,
@@ -197,7 +197,7 @@ static ssize_t portcntrs_1_read(struct file *file, char __user *buf,
static ssize_t portcntrs_2_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- u64 *counters;
+ u64 *counters = NULL;
struct qib_devdata *dd = private2dd(file);
return simple_read_from_buffer(buf, count, ppos, counters,
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH] IB/core User RMPP patch
From: Mike Heinz @ 2010-05-26 20:14 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
Currently, if a user application calls umad_register() or umad_register_oui() with an rmpp_version of zero, incoming rmpp messages are discarded.
This patch changes this behavior so that rmpp_version of zero causes incoming rmpp packets to be passed through without alteration, instead.
Signed-off-by: Michael Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
----
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 80282f1..b3457ae 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -1830,25 +1830,39 @@ static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv,
if (ib_response_mad(mad_recv_wc->recv_buf.mad)) {
spin_lock_irqsave(&mad_agent_priv->lock, flags);
mad_send_wr = ib_find_send_mad(mad_agent_priv, mad_recv_wc);
- if (!mad_send_wr) {
+ if (mad_send_wr) {
+ ib_mark_mad_done(mad_send_wr);
spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
- ib_free_recv_mad(mad_recv_wc);
- deref_mad_agent(mad_agent_priv);
- return;
- }
- ib_mark_mad_done(mad_send_wr);
- spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
- /* Defined behavior is to complete response before request */
- mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
- mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
- mad_recv_wc);
- atomic_dec(&mad_agent_priv->refcount);
+ /* Defined behavior is to complete response before request */
+ mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
+ mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
+ mad_recv_wc);
+ atomic_dec(&mad_agent_priv->refcount);
- mad_send_wc.status = IB_WC_SUCCESS;
- mad_send_wc.vendor_err = 0;
- mad_send_wc.send_buf = &mad_send_wr->send_buf;
- ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
+ mad_send_wc.status = IB_WC_SUCCESS;
+ mad_send_wc.vendor_err = 0;
+ mad_send_wc.send_buf = &mad_send_wr->send_buf;
+ ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
+ } else {
+ if ( !mad_agent_priv->agent.rmpp_version
+ && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class)
+ && (ib_get_rmpp_flags(&((struct ib_rmpp_mad *)mad_recv_wc->recv_buf.mad)->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
+ // user rmpp is in effect
+ spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+
+ mad_recv_wc->wc->wr_id = 0;
+ mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
+ mad_recv_wc);
+ atomic_dec(&mad_agent_priv->refcount);
+ } else {
+ // not user rmpp, revert to normal behavior and drop the mad
+ spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
+ ib_free_recv_mad(mad_recv_wc);
+ deref_mad_agent(mad_agent_priv);
+ return;
+ }
+ }
} else {
mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
mad_recv_wc);
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index 36f815c..f9cacbc 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -508,7 +508,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data;
hdr_len = ib_get_mad_data_offset(rmpp_mad->mad_hdr.mgmt_class);
- if (!ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
+ if (!agent->rmpp_version || !ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
copy_offset = IB_MGMT_MAD_HDR;
rmpp_active = 0;
} else {
@@ -560,14 +560,22 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
rmpp_mad->mad_hdr.tid = *tid;
}
- spin_lock_irq(&file->send_lock);
- ret = is_duplicate(file, packet);
- if (!ret)
+ if ( !agent->rmpp_version
+ && ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)
+ && (ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
+ spin_lock_irq(&file->send_lock);
list_add_tail(&packet->list, &file->send_list);
- spin_unlock_irq(&file->send_lock);
- if (ret) {
- ret = -EINVAL;
- goto err_msg;
+ spin_unlock_irq(&file->send_lock);
+ } else {
+ spin_lock_irq(&file->send_lock);
+ ret = is_duplicate(file, packet);
+ if (!ret)
+ list_add_tail(&packet->list, &file->send_list);
+ spin_unlock_irq(&file->send_lock);
+ if (ret) {
+ ret = -EINVAL;
+ goto err_msg;
+ }
}
ret = ib_post_send_mad(packet->msg, NULL);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* Re: [PATCH] IB/qib: fix powerpc compile warnings
From: Roland Dreier @ 2010-05-26 20:15 UTC (permalink / raw)
To: Ralph Campbell; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20100526184205.11285.79404.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>
> Fix the compile warnings for uninitialized variables in qib_fs.c
> when compiling for powerpc.
> - u64 *counters;
> + u64 *counters = NULL;
I do not believe this is the correct fix. The problem is the code like:
return simple_read_from_buffer(buf, count, ppos, counters,
dd->f_read_cntrs(dd, *ppos, NULL, &counters));
which passes the pointer counters as a parameter to simple_read_from_buffer()
but relies on the call to dd->f_read_cntrs() to initialize the parameter.
However the order of evaluation of function parameters is undefined in C.
So just initializing counters to NULL as you do means that you might be
passing in NULL instead of an uninitialized value -- not much improvement.
The reason this code works for you I think is that gcc on x86 evaluates
function parameters from right to left, and apparently powerpc does the
opposite (hence the warning). You can see that by compiling the code
below -- with gcc -O2 -Wall, I see:
a.c: In function ‘b’:
a.c:14: warning: ‘ap’ is used uninitialized in this function
so the warning comes from the particular order:
extern int x(int **xp);
extern int y(int *yp, int ypp);
extern int z(int zpp, int *zp);
int a(void)
{
int *ap;
return y(ap, x(&ap));
}
int b(void)
{
int *ap;
return z(x(&ap), ap);
}
So I think the correct fix (which I queued up) is the following:
commit f27ec1d6db4aa3348ca7be896f1466599aecea3e
Author: Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Date: Wed May 26 13:15:06 2010 -0700
IB/qib: Don't rely on (undefined) order of function parameter evaluation
Some of the qib sysfs code passes a buffer pointer into
simple_read_from_buffer() but relies on a function call in another
parameter of the same call to initialize that pointer. Since the order
of evaluation of function parameters is undefined, this will break if
gcc chooses the wrong order.
Fix this by splitting the code into two separate function calls.
This was noticed because of warnings like the following on ppc:
drivers/infiniband/hw/qib/qib_fs.c: In function 'portcntrs_2_read':
drivers/infiniband/hw/qib/qib_fs.c:203: warning: 'counters' is used uninitialized in this function
Reported-by: Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
Signed-off-by: Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index 7554704..edef852 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -144,10 +144,11 @@ static ssize_t dev_counters_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
u64 *counters;
+ size_t avail;
struct qib_devdata *dd = private2dd(file);
- return simple_read_from_buffer(buf, count, ppos, counters,
- dd->f_read_cntrs(dd, *ppos, NULL, &counters));
+ avail = dd->f_read_cntrs(dd, *ppos, NULL, &counters);
+ return simple_read_from_buffer(buf, count, ppos, counters, avail);
}
/* read the per-device counters */
@@ -155,10 +156,11 @@ static ssize_t dev_names_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
char *names;
+ size_t avail;
struct qib_devdata *dd = private2dd(file);
- return simple_read_from_buffer(buf, count, ppos, names,
- dd->f_read_cntrs(dd, *ppos, &names, NULL));
+ avail = dd->f_read_cntrs(dd, *ppos, &names, NULL);
+ return simple_read_from_buffer(buf, count, ppos, names, avail);
}
static const struct file_operations cntr_ops[] = {
@@ -176,10 +178,11 @@ static ssize_t portnames_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
char *names;
+ size_t avail;
struct qib_devdata *dd = private2dd(file);
- return simple_read_from_buffer(buf, count, ppos, names,
- dd->f_read_portcntrs(dd, *ppos, 0, &names, NULL));
+ avail = dd->f_read_portcntrs(dd, *ppos, 0, &names, NULL);
+ return simple_read_from_buffer(buf, count, ppos, names, avail);
}
/* read the per-port counters for port 1 (pidx 0) */
@@ -187,10 +190,11 @@ static ssize_t portcntrs_1_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
u64 *counters;
+ size_t avail;
struct qib_devdata *dd = private2dd(file);
- return simple_read_from_buffer(buf, count, ppos, counters,
- dd->f_read_portcntrs(dd, *ppos, 0, NULL, &counters));
+ avail = dd->f_read_portcntrs(dd, *ppos, 0, NULL, &counters);
+ return simple_read_from_buffer(buf, count, ppos, counters, avail);
}
/* read the per-port counters for port 2 (pidx 1) */
@@ -198,10 +202,11 @@ static ssize_t portcntrs_2_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
u64 *counters;
+ size_t avail;
struct qib_devdata *dd = private2dd(file);
- return simple_read_from_buffer(buf, count, ppos, counters,
- dd->f_read_portcntrs(dd, *ppos, 1, NULL, &counters));
+ avail = dd->f_read_portcntrs(dd, *ppos, 1, NULL, &counters);
+ return simple_read_from_buffer(buf, count, ppos, counters, avail);
}
static const struct file_operations portcntr_ops[] = {
--
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* RE: [ANNOUNCE] librdmacm 1.0.12
From: Hefty, Sean @ 2010-05-26 20:58 UTC (permalink / raw)
To: Andrea Gozzelino, Davis, Arlin R
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
'Vladimir Sokolovsky'
In-Reply-To: <79817.1274794571169.SLOX.WebMail.wwwrun-XDIR3SKYeFbgKi2NxijLtw@public.gmane.org>
> I'm not an expert of code, but I read this thread and I understand that
> new librdmacm version will be easier for users.
New APIs were added to the librdmacm that make it easier for a developer to establish a connection over an RDMA device. Additionally, wrappers were added around several of the verbs calls to make it easier to post work requests. Man pages were added for the newer connection related interfaces, and two additional sample applications were added to demonstrate their use.
See: rdma_create_ep, rdma_getaddrinfo, rdma_destroy_ep calls, and
rdma_server, rdma_client apps
The wrapper calls are in rdma/rdma_verbs.h
Most of the concepts were based on feedback from MPI developers and students who needed easier interfaces to use and understand, with some specific ideas pulled in from an libiwarp helper library developed by Philip Frey.
For the most part, you can mix new interfaces calls with lower level verbs calls as needed by your application.
I'm still 1-2 weeks away from writing up the release notes.
- Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] IB/qib: use a single txselect module parameter for serdes tuning
From: Ralph Campbell @ 2010-05-26 23:08 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
As part of the earlier patches submitted and reviewed, it was agreed
to change the way serdes tuning parameters were specified to the
driver. The updated patch got dropped by the linux-rdma email list
so the earlier version of qib_iba7322.c was integrated.
This patch updates qib_iab7322.c with the simpler, single parameter
method of setting the serdes parameters.
Signed-off-by: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/qib/qib_iba7322.c | 582 ++++++++++---------------------
1 files changed, 179 insertions(+), 403 deletions(-)
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index 2c24eab..23fb9ef 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -114,40 +114,18 @@ static ushort qib_singleport;
module_param_named(singleport, qib_singleport, ushort, S_IRUGO);
MODULE_PARM_DESC(singleport, "Use only IB port 1; more per-port buffer space");
-
-/*
- * Setup QMH7342 receive and transmit parameters, necessary because
- * each bay, Mez connector, and IB port need different tuning, beyond
- * what the switch and HCA can do automatically.
- * It's expected to be done by cat'ing files to the modules file,
- * rather than setting up as a module parameter.
- * It's a "write-only" file, returns 0 when read back.
- * The unit, port, bay (if given), and values MUST be done as a single write.
- * The unit, port, and bay must precede the values to be effective.
- */
-static int setup_qmh_params(const char *, struct kernel_param *);
-static unsigned dummy_qmh_params;
-module_param_call(qmh_serdes_setup, setup_qmh_params, param_get_uint,
- &dummy_qmh_params, S_IWUSR | S_IRUGO);
-
-/* similarly for QME7342, but it's simpler */
-static int setup_qme_params(const char *, struct kernel_param *);
-static unsigned dummy_qme_params;
-module_param_call(qme_serdes_setup, setup_qme_params, param_get_uint,
- &dummy_qme_params, S_IWUSR | S_IRUGO);
-
#define MAX_ATTEN_LEN 64 /* plenty for any real system */
/* for read back, default index is ~5m copper cable */
-static char cable_atten_list[MAX_ATTEN_LEN] = "10";
-static struct kparam_string kp_cable_atten = {
- .string = cable_atten_list,
+static char txselect_list[MAX_ATTEN_LEN] = "10";
+static struct kparam_string kp_txselect = {
+ .string = txselect_list,
.maxlen = MAX_ATTEN_LEN
};
-static int setup_cable_atten(const char *, struct kernel_param *);
-module_param_call(cable_atten, setup_cable_atten, param_get_string,
- &kp_cable_atten, S_IWUSR | S_IRUGO);
-MODULE_PARM_DESC(cable_atten, \
- "cable attenuation indices for cables with invalid EEPROM");
+static int setup_txselect(const char *, struct kernel_param *);
+module_param_call(txselect, setup_txselect, param_get_string,
+ &kp_txselect, S_IWUSR | S_IRUGO);
+MODULE_PARM_DESC(txselect, \
+ "Tx serdes indices (for no QSFP or invalid QSFP data)");
#define BOARD_QME7342 5
#define BOARD_QMH7342 6
@@ -574,11 +552,12 @@ struct vendor_txdds_ent {
static void write_tx_serdes_param(struct qib_pportdata *, struct txdds_ent *);
#define TXDDS_TABLE_SZ 16 /* number of entries per speed in onchip table */
+#define TXDDS_EXTRA_SZ 11 /* number of extra tx settings entries */
#define SERDES_CHANS 4 /* yes, it's obvious, but one less magic number */
#define H1_FORCE_VAL 8
-#define H1_FORCE_QME 1 /* may be overridden via setup_qme_params() */
-#define H1_FORCE_QMH 7 /* may be overridden via setup_qmh_params() */
+#define H1_FORCE_QME 1 /* may be overridden via setup_txselect() */
+#define H1_FORCE_QMH 7 /* may be overridden via setup_txselect() */
/* The static and dynamic registers are paired, and the pairs indexed by spd */
#define krp_static_adapt_dis(spd) (KREG_IBPORT_IDX(ADAPT_DISABLE_STATIC_SDR) \
@@ -590,15 +569,6 @@ static void write_tx_serdes_param(struct qib_pportdata *, struct txdds_ent *);
#define QDR_STATIC_ADAPT_INIT 0xffffffffffULL /* up, disable H0,H1-8, LE */
#define QDR_STATIC_ADAPT_INIT_R1 0xf0ffffffffULL /* r1 up, disable H0,H1-8 */
-static const struct txdds_ent qmh_sdr_txdds = { 11, 0, 5, 6 };
-static const struct txdds_ent qmh_ddr_txdds = { 7, 0, 2, 8 };
-static const struct txdds_ent qmh_qdr_txdds = { 0, 1, 3, 10 };
-
-/* this is used for unknown mez cards also */
-static const struct txdds_ent qme_sdr_txdds = { 11, 0, 4, 4 };
-static const struct txdds_ent qme_ddr_txdds = { 7, 0, 2, 7 };
-static const struct txdds_ent qme_qdr_txdds = { 0, 1, 12, 11 };
-
struct qib_chippport_specific {
u64 __iomem *kpregbase;
u64 __iomem *cpregbase;
@@ -637,12 +607,8 @@ struct qib_chippport_specific {
* Per-bay per-channel rcv QMH H1 values and Tx values for QDR.
* entry zero is unused, to simplify indexing
*/
- u16 h1_val;
- u8 amp[SERDES_CHANS];
- u8 pre[SERDES_CHANS];
- u8 mainv[SERDES_CHANS];
- u8 post[SERDES_CHANS];
- u8 no_eep; /* attenuation index to use if no qsfp info */
+ u8 h1_val;
+ u8 no_eep; /* txselect table index to use if no qsfp info */
u8 ipg_tries;
u8 ibmalfusesnap;
struct qib_qsfp_data qsfp_data;
@@ -5360,7 +5326,13 @@ static int qib_7322_ib_updown(struct qib_pportdata *ppd, int ibup, u64 ibcs)
QIBL_IB_AUTONEG_INPROG)))
set_7322_ibspeed_fast(ppd, ppd->link_speed_enabled);
if (!(ppd->lflags & QIBL_IB_AUTONEG_INPROG)) {
+ /* unlock the Tx settings, speed may change */
+ qib_write_kreg_port(ppd, krp_tx_deemph_override,
+ SYM_MASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ reset_tx_deemphasis_override));
qib_cancel_sends(ppd);
+ /* on link down, ensure sane pcs state */
+ qib_7322_mini_pcs_reset(ppd);
spin_lock_irqsave(&ppd->sdma_lock, flags);
if (__qib_sdma_running(ppd))
__qib_sdma_process_event(ppd,
@@ -5766,26 +5738,28 @@ static void qib_init_7322_qsfp(struct qib_pportdata *ppd)
}
/*
- * called at device initialization time, and also if the cable_atten
+ * called at device initialization time, and also if the txselect
* module parameter is changed. This is used for cables that don't
* have valid QSFP EEPROMs (not present, or attenuation is zero).
* We initialize to the default, then if there is a specific
- * unit,port match, we use that.
+ * unit,port match, we use that (and set it immediately, for the
+ * current speed, if the link is at INIT or better).
* String format is "default# unit#,port#=# ... u,p=#", separators must
- * be a SPACE character. A newline terminates.
+ * be a SPACE character. A newline terminates. The u,p=# tuples may
+ * optionally have "u,p=#,#", where the final # is the H1 value
* The last specific match is used (actually, all are used, but last
* one is the one that winds up set); if none at all, fall back on default.
*/
static void set_no_qsfp_atten(struct qib_devdata *dd, int change)
{
char *nxt, *str;
- int pidx, unit, port, deflt;
+ u32 pidx, unit, port, deflt, h1;
unsigned long val;
- int any = 0;
+ int any = 0, seth1;
- str = cable_atten_list;
+ str = txselect_list;
- /* default number is validated in setup_cable_atten() */
+ /* default number is validated in setup_txselect() */
deflt = simple_strtoul(str, &nxt, 0);
for (pidx = 0; pidx < dd->num_pports; ++pidx)
dd->pport[pidx].cpspec->no_eep = deflt;
@@ -5812,16 +5786,28 @@ static void set_no_qsfp_atten(struct qib_devdata *dd, int change)
;
continue;
}
- if (val >= TXDDS_TABLE_SZ)
+ if (val >= TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ)
continue;
+ seth1 = 0;
+ h1 = 0; /* gcc thinks it might be used uninitted */
+ if (*nxt == ',' && nxt[1]) {
+ str = ++nxt;
+ h1 = (u32)simple_strtoul(str, &nxt, 0);
+ if (nxt == str)
+ while (*nxt && *nxt++ != ' ') /* skip */
+ ;
+ else
+ seth1 = 1;
+ }
for (pidx = 0; dd->unit == unit && pidx < dd->num_pports;
++pidx) {
- if (dd->pport[pidx].port != port ||
- !dd->pport[pidx].link_speed_supported)
+ struct qib_pportdata *ppd = &dd->pport[pidx];
+
+ if (ppd->port != port || !ppd->link_speed_supported)
continue;
- dd->pport[pidx].cpspec->no_eep = val;
+ ppd->cpspec->no_eep = val;
/* now change the IBC and serdes, overriding generic */
- init_txdds_table(&dd->pport[pidx], 1);
+ init_txdds_table(ppd, 1);
any++;
}
if (*nxt == '\n')
@@ -5832,35 +5818,35 @@ static void set_no_qsfp_atten(struct qib_devdata *dd, int change)
* Change the IBC and serdes, but since it's
* general, don't override specific settings.
*/
- for (pidx = 0; pidx < dd->num_pports; ++pidx) {
- if (!dd->pport[pidx].link_speed_supported)
- continue;
- init_txdds_table(&dd->pport[pidx], 0);
- }
+ for (pidx = 0; pidx < dd->num_pports; ++pidx)
+ if (dd->pport[pidx].link_speed_supported)
+ init_txdds_table(&dd->pport[pidx], 0);
}
}
-/* handle the cable_atten parameter changing */
-static int setup_cable_atten(const char *str, struct kernel_param *kp)
+/* handle the txselect parameter changing */
+static int setup_txselect(const char *str, struct kernel_param *kp)
{
struct qib_devdata *dd;
unsigned long val;
char *n;
if (strlen(str) >= MAX_ATTEN_LEN) {
- printk(KERN_INFO QIB_DRV_NAME " cable_atten_values string "
+ printk(KERN_INFO QIB_DRV_NAME " txselect_values string "
"too long\n");
return -ENOSPC;
}
val = simple_strtoul(str, &n, 0);
- if (n == str || val >= TXDDS_TABLE_SZ) {
+ if (n == str || val >= (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ)) {
printk(KERN_INFO QIB_DRV_NAME
- "cable_atten_values must start with a number\n");
+ "txselect_values must start with a number < %d\n",
+ TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ);
return -EINVAL;
}
- strcpy(cable_atten_list, str);
+ strcpy(txselect_list, str);
list_for_each_entry(dd, &qib_dev_list, list)
- set_no_qsfp_atten(dd, 1);
+ if (dd->deviceid == PCI_DEVICE_ID_QLOGIC_IB_7322)
+ set_no_qsfp_atten(dd, 1);
return 0;
}
@@ -6261,28 +6247,17 @@ static int qib_init_7322_variables(struct qib_devdata *dd)
* in adapter-specific routines.
*/
if (!(ppd->dd->flags & QIB_HAS_QSFP)) {
- int i;
- const struct txdds_ent *txdds;
-
if (!IS_QMH(ppd->dd) && !IS_QME(ppd->dd))
qib_devinfo(ppd->dd->pcidev, "IB%u:%u: "
"Unknown mezzanine card type\n",
- ppd->dd->unit, ppd->port);
- txdds = IS_QMH(ppd->dd) ? &qmh_qdr_txdds :
- &qme_qdr_txdds;
-
+ dd->unit, ppd->port);
+ cp->h1_val = IS_QMH(dd) ? H1_FORCE_QMH : H1_FORCE_QME;
/*
- * set values in case link comes up
- * before table is written to driver.
+ * Choose center value as default tx serdes setting
+ * until changed through module parameter.
*/
- cp->h1_val = IS_QMH(ppd->dd) ? H1_FORCE_QMH :
- H1_FORCE_QME;
- for (i = 0; i < SERDES_CHANS; i++) {
- cp->amp[i] = txdds->amp;
- cp->pre[i] = txdds->pre;
- cp->mainv[i] = txdds->main;
- cp->post[i] = txdds->post;
- }
+ ppd->cpspec->no_eep = IS_QMH(dd) ?
+ TXDDS_TABLE_SZ + 2 : TXDDS_TABLE_SZ + 4;
} else
cp->h1_val = H1_FORCE_VAL;
@@ -6299,8 +6274,7 @@ static int qib_init_7322_variables(struct qib_devdata *dd)
dd->rcvhdrentsize = QIB_RCVHDR_ENTSIZE;
dd->rcvhdrsize = QIB_DFLT_RCVHDRSIZE;
- dd->rhf_offset =
- dd->rcvhdrentsize - sizeof(u64) / sizeof(u32);
+ dd->rhf_offset = dd->rcvhdrentsize - sizeof(u64) / sizeof(u32);
/* we always allocate at least 2048 bytes for eager buffers */
dd->rcvegrbufsize = max(mtu, 2048);
@@ -7111,8 +7085,8 @@ static const struct txdds_ent txdds_ddr[TXDDS_TABLE_SZ] = {
static const struct txdds_ent txdds_qdr[TXDDS_TABLE_SZ] = {
/* amp, pre, main, post */
{ 2, 2, 15, 6 }, /* Loopback */
- { 0, 1, 0, 7 }, /* 2 dB */
- { 0, 1, 0, 9 }, /* 3 dB */
+ { 0, 1, 0, 7 }, /* 2 dB (also QMH7342) */
+ { 0, 1, 0, 9 }, /* 3 dB (also QMH7342) */
{ 0, 1, 0, 11 }, /* 4 dB */
{ 0, 1, 0, 13 }, /* 5 dB */
{ 0, 1, 0, 15 }, /* 6 dB */
@@ -7128,6 +7102,57 @@ static const struct txdds_ent txdds_qdr[TXDDS_TABLE_SZ] = {
{ 0, 2, 9, 15 }, /* 16 dB */
};
+/*
+ * extra entries for use with txselect, for indices >= TXDDS_TABLE_SZ.
+ * These are mostly used for mez cards going through connectors
+ * and backplane traces, but can be used to add other "unusual"
+ * table values as well.
+ */
+static const struct txdds_ent txdds_extra_sdr[TXDDS_EXTRA_SZ] = {
+ /* amp, pre, main, post */
+ { 0, 0, 0, 1 }, /* QMH7342 backplane settings */
+ { 0, 0, 0, 1 }, /* QMH7342 backplane settings */
+ { 0, 0, 0, 2 }, /* QMH7342 backplane settings */
+ { 0, 0, 0, 2 }, /* QMH7342 backplane settings */
+ { 0, 0, 0, 11 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 11 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 11 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 11 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 11 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 11 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 11 }, /* QME7342 backplane settings */
+};
+
+static const struct txdds_ent txdds_extra_ddr[TXDDS_EXTRA_SZ] = {
+ /* amp, pre, main, post */
+ { 0, 0, 0, 7 }, /* QMH7342 backplane settings */
+ { 0, 0, 0, 7 }, /* QMH7342 backplane settings */
+ { 0, 0, 0, 8 }, /* QMH7342 backplane settings */
+ { 0, 0, 0, 8 }, /* QMH7342 backplane settings */
+ { 0, 0, 0, 13 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 13 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 13 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 13 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 13 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 13 }, /* QME7342 backplane settings */
+ { 0, 0, 0, 13 }, /* QME7342 backplane settings */
+};
+
+static const struct txdds_ent txdds_extra_qdr[TXDDS_EXTRA_SZ] = {
+ /* amp, pre, main, post */
+ { 0, 1, 0, 4 }, /* QMH7342 backplane settings */
+ { 0, 1, 0, 5 }, /* QMH7342 backplane settings */
+ { 0, 1, 0, 6 }, /* QMH7342 backplane settings */
+ { 0, 1, 0, 8 }, /* QMH7342 backplane settings */
+ { 0, 1, 12, 10 }, /* QME7342 backplane setting */
+ { 0, 1, 12, 11 }, /* QME7342 backplane setting */
+ { 0, 1, 12, 12 }, /* QME7342 backplane setting */
+ { 0, 1, 12, 14 }, /* QME7342 backplane setting */
+ { 0, 1, 12, 6 }, /* QME7342 backplane setting */
+ { 0, 1, 12, 7 }, /* QME7342 backplane setting */
+ { 0, 1, 12, 8 }, /* QME7342 backplane setting */
+};
+
static const struct txdds_ent *get_atten_table(const struct txdds_ent *txdds,
unsigned atten)
{
@@ -7145,7 +7170,7 @@ static const struct txdds_ent *get_atten_table(const struct txdds_ent *txdds,
}
/*
- * if override is set, the module parameter cable_atten has a value
+ * if override is set, the module parameter txselect has a value
* for this specific port, so use it, rather than our normal mechanism.
*/
static void find_best_ent(struct qib_pportdata *ppd,
@@ -7184,15 +7209,28 @@ static void find_best_ent(struct qib_pportdata *ppd,
*ddr_dds = get_atten_table(txdds_ddr, qd->atten[0]);
*qdr_dds = get_atten_table(txdds_qdr, qd->atten[1]);
return;
- } else {
+ } else if (ppd->cpspec->no_eep < TXDDS_TABLE_SZ) {
/*
* If we have no (or incomplete) data from the cable
- * EEPROM, or no QSFP, use the module parameter value
- * to index into the attentuation table.
+ * EEPROM, or no QSFP, or override is set, use the
+ * module parameter value to index into the attentuation
+ * table.
*/
- *sdr_dds = &txdds_sdr[ppd->cpspec->no_eep];
- *ddr_dds = &txdds_ddr[ppd->cpspec->no_eep];
- *qdr_dds = &txdds_qdr[ppd->cpspec->no_eep];
+ idx = ppd->cpspec->no_eep;
+ *sdr_dds = &txdds_sdr[idx];
+ *ddr_dds = &txdds_ddr[idx];
+ *qdr_dds = &txdds_qdr[idx];
+ } else if (ppd->cpspec->no_eep < (TXDDS_TABLE_SZ + TXDDS_EXTRA_SZ)) {
+ /* similar to above, but index into the "extra" table. */
+ idx = ppd->cpspec->no_eep - TXDDS_TABLE_SZ;
+ *sdr_dds = &txdds_extra_sdr[idx];
+ *ddr_dds = &txdds_extra_ddr[idx];
+ *qdr_dds = &txdds_extra_qdr[idx];
+ } else {
+ /* this shouldn't happen, it's range checked */
+ *sdr_dds = txdds_sdr + qib_long_atten;
+ *ddr_dds = txdds_ddr + qib_long_atten;
+ *qdr_dds = txdds_qdr + qib_long_atten;
}
}
@@ -7203,33 +7241,24 @@ static void init_txdds_table(struct qib_pportdata *ppd, int override)
int idx;
int single_ent = 0;
- if (IS_QMH(ppd->dd)) {
- /* normally will be overridden, via setup_qmh() */
- sdr_dds = &qmh_sdr_txdds;
- ddr_dds = &qmh_ddr_txdds;
- qdr_dds = &qmh_qdr_txdds;
- single_ent = 1;
- } else if (IS_QME(ppd->dd)) {
- sdr_dds = &qme_sdr_txdds;
- ddr_dds = &qme_ddr_txdds;
- qdr_dds = &qme_qdr_txdds;
+ find_best_ent(ppd, &sdr_dds, &ddr_dds, &qdr_dds, override);
+
+ /* for mez cards or override, use the selected value for all entries */
+ if (!(ppd->dd->flags & QIB_HAS_QSFP) || override)
single_ent = 1;
- } else
- find_best_ent(ppd, &sdr_dds, &ddr_dds, &qdr_dds, override);
/* Fill in the first entry with the best entry found. */
set_txdds(ppd, 0, sdr_dds);
set_txdds(ppd, TXDDS_TABLE_SZ, ddr_dds);
set_txdds(ppd, 2 * TXDDS_TABLE_SZ, qdr_dds);
-
- /*
- * for our current speed, also write that value into the
- * tx serdes registers.
- */
- dds = (struct txdds_ent *)(ppd->link_speed_active == QIB_IB_QDR ?
- qdr_dds : (ppd->link_speed_active ==
- QIB_IB_DDR ? ddr_dds : sdr_dds));
- write_tx_serdes_param(ppd, dds);
+ if (ppd->lflags & (QIBL_LINKINIT | QIBL_LINKARMED |
+ QIBL_LINKACTIVE)) {
+ dds = (struct txdds_ent *)(ppd->link_speed_active ==
+ QIB_IB_QDR ? qdr_dds :
+ (ppd->link_speed_active ==
+ QIB_IB_DDR ? ddr_dds : sdr_dds));
+ write_tx_serdes_param(ppd, dds);
+ }
/* Fill in the remaining entries with the default table values. */
for (idx = 1; idx < ARRAY_SIZE(txdds_sdr); ++idx) {
@@ -7352,6 +7381,11 @@ static int serdes_7322_init(struct qib_pportdata *ppd)
*/
init_txdds_table(ppd, 0);
+ /* ensure no tx overrides from earlier driver loads */
+ qib_write_kreg_port(ppd, krp_tx_deemph_override,
+ SYM_MASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ reset_tx_deemphasis_override));
+
/* Patch some SerDes defaults to "Better for IB" */
/* Timing Loop Bandwidth: cdr_timing[11:9] = 0 */
ibsd_wr_allchans(ppd, 2, 0, BMASK(11, 9));
@@ -7421,7 +7455,7 @@ static int serdes_7322_init(struct qib_pportdata *ppd)
QDR_STATIC_ADAPT_DOWN_R1 : QDR_STATIC_ADAPT_DOWN);
ppd->cpspec->qdr_dfe_on = 1;
- /* (FLoop LOS gate: PPM filter enabled */
+ /* FLoop LOS gate: PPM filter enabled */
ibsd_wr_allchans(ppd, 38, 0 << 10, 1 << 10);
/* rx offset center enabled */
@@ -7486,68 +7520,39 @@ static void write_tx_serdes_param(struct qib_pportdata *ppd,
SYM_MASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0, txc0_ena) |
SYM_MASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0, txcp1_ena) |
SYM_MASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0, txcn1_ena));
- deemph |= 1ULL << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
- tx_override_deemphasis_select);
- deemph |= txdds->amp << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
- txampcntl_d2a);
- deemph |= txdds->main << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
- txc0_ena);
- deemph |= txdds->post << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
- txcp1_ena);
- deemph |= txdds->pre << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+
+ deemph |= SYM_MASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ tx_override_deemphasis_select);
+ deemph |= (txdds->amp & SYM_RMASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ txampcntl_d2a)) << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ txampcntl_d2a);
+ deemph |= (txdds->main & SYM_RMASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ txc0_ena)) << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ txc0_ena);
+ deemph |= (txdds->post & SYM_RMASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ txcp1_ena)) << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ txcp1_ena);
+ deemph |= (txdds->pre & SYM_RMASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
+ txcn1_ena)) << SYM_LSB(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
txcn1_ena);
qib_write_kreg_port(ppd, krp_tx_deemph_override, deemph);
}
/*
- * set per-bay, per channel parameters. For now, we ignore
- * do_tx, and always set tx parameters, and set them with the same value
- * for all channels, using the channel 0 value. We may switch to
- * per-channel settings in the future, and that method only needs
- * to be done once.
- * Because this also writes the IBC txdds table with a single set
- * of values, it should be called only for cases where we want to completely
- * force a specific setting, typically only for mez cards.
+ * Set the parameters for mez cards on link bounce, so they are
+ * always exactly what was requested. Similar logic to init_txdds
+ * but does just the serdes.
*/
static void adj_tx_serdes(struct qib_pportdata *ppd)
{
- struct txdds_ent txdds;
- int i;
- u8 *amp, *pre, *mainv, *post;
-
- /*
- * Because we use TX_DEEMPHASIS_OVERRIDE, we need to
- * always do tx side, just like H1, since it is cleared
- * by link down
- */
- amp = ppd->cpspec->amp;
- pre = ppd->cpspec->pre;
- mainv = ppd->cpspec->mainv;
- post = ppd->cpspec->post;
-
- amp[0] &= SYM_RMASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
- txampcntl_d2a);
- mainv[0] &= SYM_RMASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
- txc0_ena);
- post[0] &= SYM_RMASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
- txcp1_ena);
- pre[0] &= SYM_RMASK(IBSD_TX_DEEMPHASIS_OVERRIDE_0,
- txcn1_ena);
-
- /*
- * Use the channel zero values, only, for now, for
- * all channels
- */
- txdds.amp = amp[0];
- txdds.pre = pre[0];
- txdds.main = mainv[0];
- txdds.post = post[0];
-
- /* write the QDR table for IBC use, as backup for link down */
- for (i = 0; i < ARRAY_SIZE(txdds_qdr); ++i)
- set_txdds(ppd, i + 32, &txdds);
+ const struct txdds_ent *sdr_dds, *ddr_dds, *qdr_dds;
+ struct txdds_ent *dds;
- write_tx_serdes_param(ppd, &txdds);
+ find_best_ent(ppd, &sdr_dds, &ddr_dds, &qdr_dds, 1);
+ dds = (struct txdds_ent *)(ppd->link_speed_active == QIB_IB_QDR ?
+ qdr_dds : (ppd->link_speed_active == QIB_IB_DDR ?
+ ddr_dds : sdr_dds));
+ write_tx_serdes_param(ppd, dds);
}
/* set QDR forced value for H1, if needed */
@@ -7567,235 +7572,6 @@ static void force_h1(struct qib_pportdata *ppd)
}
}
-/*
- * Parse the parameters for the QMH7342, to get rx and tx serdes
- * settings for that Bay, for both possible mez connectors (PCIe bus)
- * and IB link (one link on mez1, two possible on mez2).
- *
- * Data is comma or white space separated.
- *
- * A set of data has 7 groups, rx and tx groups have SERDES_CHANS values,
- * one per IB lane (serdes channel).
- * The groups are Bay, bus# H1 rcv, and amp, pre, post, main Tx values (QDR).
- * The Bay # is used only for debugging currently.
- * H1 values are set whenever the link goes down, or is at cfg_test or
- * cfg_wait_enh. Tx values are programmed once, when this routine is called
- * (and with default values at chip initialization). Values are any base, in
- * strtoul style, and values are seperated by comma, or any white space
- * (space, tab, newline).
- *
- * An example set might look like this (white space vs
- * comma used for human ease of reading)
- * The ordering is a set of Bay# Bus# H1, amp, pre, post, and main for mez1 IB1,
- * repeat for mez2 IB1, then mez2 IB2.
- *
- * B B H1:0 amp:0 pre:0 post: 0 main:0
- * a u H1: 1 amp: 1 pre: 1 post: 1 main: 1
- * y s H1: 2 amp: 2 pre: 2 post: 2 main: 2
- * H1: 4 amp: 3 pre: 3 post: 3 main: 3
- * 1 3 8,6,5,6 0,0,0,0 1,1,1,1 10,10,10,10 3,3,3,3
- * 1 6 7,6,6,7 0,0,0,0 1,1,1,1 10,10,10,10 3,3,3,3
- * 1 6 9,7,7,8 0,0,0,0 1,1,1,1 10,10,10,10 3,3,3,3
- */
-#define N_QMH_FIELDS 22
-static int setup_qmh_params(const char *str, struct kernel_param *kp)
-{
- char *abuf, *v, *nv, *nvp;
- struct qib_devdata *dd;
- struct qib_pportdata *ppd;
- u32 mez, vlen, nf, port, bay;
- int ret = 0, found = 0;
-
- vlen = strlen(str) + 1;
- abuf = kmalloc(vlen, GFP_KERNEL);
- if (!abuf) {
- printk(KERN_INFO QIB_DRV_NAME
- " Unable to allocate QMH param buffer; ignoring\n");
- return 0;
- }
- memcpy(abuf, str, vlen);
- v = abuf;
-
- /* these 3 are because gcc can't know they are set before used */
- port = 1;
- mez = 1; /* used only for debugging */
- bay = 0; /* used only for debugging */
- ppd = NULL;
- for (nf = 0; (nv = strsep(&v, ", \t\n\r")) &&
- nf < (N_QMH_FIELDS * 3);) {
- u32 val;
-
- if (!*nv)
- /* allow for multiple separators */
- continue;
-
- val = simple_strtoul(nv, &nvp, 0);
- if (nv == nvp) {
- printk(KERN_INFO QIB_DRV_NAME
- " Bay%u, mez%u IB%u non-numeric value (%s) "
- "field #%u, ignoring rest\n", bay, mez,
- port, nv, nf % (N_QMH_FIELDS * 3));
- ret = -EINVAL;
- goto bail;
- }
- if (!(nf % N_QMH_FIELDS)) {
- ppd = NULL;
- bay = val;
- if (!bay || bay > 16) {
- printk(KERN_INFO QIB_DRV_NAME
- " Invalid bay # %u, field %u, "
- "ignoring rest\n", bay, nf);
- ret = -EINVAL;
- goto bail;
- }
- } else if ((nf % N_QMH_FIELDS) == 1) {
- u32 bus = val;
- if (nf == 1) {
- mez = 1;
- port = 1;
- } else if (nf == (N_QMH_FIELDS + 1)) {
- mez = 2;
- port = 1;
- } else {
- mez = 2;
- port = 2;
- }
- list_for_each_entry(dd, &qib_dev_list, list) {
- if (dd->deviceid != PCI_DEVICE_ID_QLOGIC_IB_7322
- || !IS_QMH(dd))
- continue; /* only for QMH cards */
- if (dd->pcidev->bus->number == bus) {
- found++;
- ppd = &dd->pport[port - 1];
- }
- }
- } else if (ppd) {
- u32 parm = (nf % N_QMH_FIELDS) - 2;
- if (parm < SERDES_CHANS && !(parm % SERDES_CHANS))
- ppd->cpspec->h1_val = val;
- else if (parm < (2 * SERDES_CHANS))
- ppd->cpspec->amp[parm % SERDES_CHANS] = val;
- else if (parm < (3 * SERDES_CHANS))
- ppd->cpspec->pre[parm % SERDES_CHANS] = val;
- else if (parm < (4 * SERDES_CHANS))
- ppd->cpspec->post[parm % SERDES_CHANS] = val;
- else {
- ppd->cpspec->mainv[parm % SERDES_CHANS] = val;
- /* At the end of a port, set params */
- if (parm == ((5 * SERDES_CHANS) - 1))
- adj_tx_serdes(ppd);
- }
- }
- nf++;
- }
- if (!found) {
- printk(KERN_ERR QIB_DRV_NAME
- ": No match found for qmh_serdes_setup parameter\n");
- ret = -EINVAL;
- }
-bail:
- kfree(abuf);
- return ret;
-}
-
-/*
- * Similarly for QME7342, but the format is simpler, values are the
- * same for all mez card positions in a blade (2 or 4 per blade), but
- * are different for some blades vs others, and we don't need to
- * specify different parameters for different serdes channels or different
- * IB ports.
- * Format is: h1 amp,pre,post,main
- * Alternate format (so ports can be different): Pport# h1 amp,pre,post,main
- */
-#define N_QME_FIELDS 5
-static int setup_qme_params(const char *str, struct kernel_param *kp)
-{
- char *abuf, *v, *nv, *nvp;
- struct qib_devdata *dd;
- u32 vlen, nf, port = 0;
- u8 h1, tx[4]; /* amp, pre, post, main */
- int ret = -EINVAL;
- char *seplist;
-
- vlen = strlen(str) + 1;
- abuf = kmalloc(vlen, GFP_KERNEL);
- if (!abuf) {
- printk(KERN_INFO QIB_DRV_NAME
- " Unable to allocate QME param buffer; ignoring\n");
- return 0;
- }
- strncpy(abuf, str, vlen);
-
- v = abuf;
- seplist = " \t";
- h1 = H1_FORCE_QME; /* gcc can't figure out always set before used */
-
- for (nf = 0; (nv = strsep(&v, seplist)); ) {
- u32 val;
-
- if (!*nv)
- /* allow for multiple separators */
- continue;
-
- if (!nf && *nv == 'P') {
- /* alternate format with port */
- val = simple_strtoul(++nv, &nvp, 0);
- if (nv == nvp || port >= NUM_IB_PORTS) {
- printk(KERN_INFO QIB_DRV_NAME
- " %s: non-numeric port value (%s) "
- "ignoring rest\n", __func__, nv);
- goto done;
- }
- port = val;
- continue; /* without incrementing nf */
- }
- val = simple_strtoul(nv, &nvp, 0);
- if (nv == nvp) {
- printk(KERN_INFO QIB_DRV_NAME
- " %s: non-numeric value (%s) "
- "field #%u, ignoring rest\n", __func__,
- nv, nf);
- goto done;
- }
- if (!nf) {
- h1 = val;
- seplist = ",";
- } else
- tx[nf - 1] = val;
- if (++nf == N_QME_FIELDS) {
- list_for_each_entry(dd, &qib_dev_list, list) {
- int pidx, i;
- if (dd->deviceid != PCI_DEVICE_ID_QLOGIC_IB_7322
- || !IS_QME(dd))
- continue; /* only for QME cards */
- for (pidx = 0; pidx < dd->num_pports; ++pidx) {
- struct qib_pportdata *ppd;
- ppd = &dd->pport[pidx];
- if ((port && ppd->port != port) ||
- !ppd->link_speed_supported)
- continue;
- ppd->cpspec->h1_val = h1;
- for (i = 0; i < SERDES_CHANS; i++) {
- ppd->cpspec->amp[i] = tx[0];
- ppd->cpspec->pre[i] = tx[1];
- ppd->cpspec->post[i] = tx[2];
- ppd->cpspec->mainv[i] = tx[3];
- }
- adj_tx_serdes(ppd);
- }
- }
- ret = 0;
- goto done;
- }
- }
- printk(KERN_INFO QIB_DRV_NAME
- " %s: Only %u of %u fields provided, skipping\n",
- __func__, nf, N_QME_FIELDS);
-done:
- kfree(abuf);
- return ret;
-}
-
#define SJA_EN SYM_MASK(SPC_JTAG_ACCESS_REG, SPC_JTAG_ACCESS_EN)
#define BISTEN_LSB SYM_LSB(SPC_JTAG_ACCESS_REG, bist_en)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* Re: [PATCH] IB/qib: use a single txselect module parameter for serdes tuning
From: Roland Dreier @ 2010-05-26 23:38 UTC (permalink / raw)
To: Ralph Campbell; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20100526230844.16584.31444.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>
sorry about that... somehow I messed this up. Anyway, I applied this patch.
--
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] mlx4_en: use net_device dev_id to indicate port number
From: Eli Cohen @ 2010-05-27 5:56 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
rdreier-FYB4Gu1CFyUAvxtiuMwx3w, yevgenyp-VPRAkNaXOzVS1MOuV/RT9w,
shemminger-ZtmgI6mnKB3QT0dZR+AlfA
Today, there are no means to know which port of a hardware device a netdev
interface uses. struct net_device conatins a field, dev_id, that can be used
for that. Use this field to save the port number in ConnectX that is being used
by the net device; port numbers are zero based.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
drivers/net/mlx4/en_netdev.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 6c2b15b..ab1d480 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -978,6 +978,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
}
SET_NETDEV_DEV(dev, &mdev->dev->pdev->dev);
+ dev->dev_id = port - 1;
/*
* Initialize driver private data
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* are IB port counters functioning over --IB-- with the RDMAoE patch set?
From: Or Gerlitz @ 2010-05-27 9:04 UTC (permalink / raw)
To: Eli Cohen, Vladimir Sokolovsky; +Cc: Linux RDMA list, Moni Shoua, Shiri Franchi
Hi Eli, Vlad,
Using some lab node here, I noticed that the IB port counters were not functioning over --IB-- with the RDMAoE patches present in an OFED drop named OFED-RDMAoE-1.5-rc6, see below.
Was/is this a known issue? if yes, was it fixed? is/was there an ofa bz case open for this? I didn't find such... I was told that under ofed 1.5.1 this doesn't happen, but I wanted to 1st clarify with you.
Or.
> > [root@dodly4 ~]# rdma_bw dodly0
> > 15050: | port=18515 | ib_port=1 | size=65536 | tx_depth=100 | sl=0 | iters=1000 | duplex=0 | cma=0 |
> > 15050: Local address: LID 0x03, QPN 0x14004a, PSN 0x5fb3a8 RKey 0x2804260c VAddr 0x002acb54d6a000
> > 15050: Remote address: LID 0x04, QPN 0x250406, PSN 0xf6d97d, RKey 0x28043c04 VAddr 0x002b9026b6a000
> > 15050: Bandwidth peak (#0 to #989): 938.697 MB/sec
> > 15050: Bandwidth average: 938.695 MB/sec --> the link is SDR, so the result makes sense
> > 15050: Service Demand peak (#0 to #989): 3113 cycles/KB
> > 15050: Service Demand Avg : 3113 cycles/KB
>
> > [root@dodly4 ~]# perfquery
> > ibwarn: [15057] dump_perfcounters: PortXmitWait not indicated so ignore this counter
> > # Port counters: Lid 3 port 1
> > PortSelect:......................1
> > CounterSelect:...................0x0000
> > SymbolErrors:....................0
> > LinkRecovers:....................0
> > LinkDowned:......................0
> > RcvErrors:.......................0
> > RcvRemotePhysErrors:.............0
> > RcvSwRelayErrors:................0
> > XmtDiscards:.....................0
> > XmtConstraintErrors:.............0
> > RcvConstraintErrors:.............0
> > CounterSelect2:..................0x00
> > LinkIntegrityErrors:.............0
> > ExcBufOverrunErrors:.............0
> > VL15Dropped:.....................0
> > XmtData:.........................72
> > RcvData:.........................0
> > XmtPkts:.........................1
> > RcvPkts:.........................0
> > XmtWait:.........................0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] IB/core User RMPP patch
From: Hal Rosenstock @ 2010-05-27 13:06 UTC (permalink / raw)
To: Mike Heinz
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
In-Reply-To: <4C2744E8AD2982428C5BFE523DF8CDCB49A488D528-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
On Wed, May 26, 2010 at 4:14 PM, Mike Heinz <michael.heinz@qlogic.com> wrote:
> Currently, if a user application calls umad_register() or umad_register_oui() with an rmpp_version of zero, incoming rmpp messages are discarded.
Actually, it's the underlying ib_register_mad_agent call and this drop
behavior is intentional.
> This patch changes this behavior so that rmpp_version of zero causes incoming rmpp packets to be passed through without alteration, instead.
What's the motivation to make such a behavioral change ?
-- Hal
>
> Signed-off-by: Michael Heinz <michael.heinz@qlogic.com>
> ----
>
> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
> index 80282f1..b3457ae 100644
> --- a/drivers/infiniband/core/mad.c
> +++ b/drivers/infiniband/core/mad.c
> @@ -1830,25 +1830,39 @@ static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv,
> if (ib_response_mad(mad_recv_wc->recv_buf.mad)) {
> spin_lock_irqsave(&mad_agent_priv->lock, flags);
> mad_send_wr = ib_find_send_mad(mad_agent_priv, mad_recv_wc);
> - if (!mad_send_wr) {
> + if (mad_send_wr) {
> + ib_mark_mad_done(mad_send_wr);
> spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
> - ib_free_recv_mad(mad_recv_wc);
> - deref_mad_agent(mad_agent_priv);
> - return;
> - }
> - ib_mark_mad_done(mad_send_wr);
> - spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>
> - /* Defined behavior is to complete response before request */
> - mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
> - mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
> - mad_recv_wc);
> - atomic_dec(&mad_agent_priv->refcount);
> + /* Defined behavior is to complete response before request */
> + mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
> + mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
> + mad_recv_wc);
> + atomic_dec(&mad_agent_priv->refcount);
>
> - mad_send_wc.status = IB_WC_SUCCESS;
> - mad_send_wc.vendor_err = 0;
> - mad_send_wc.send_buf = &mad_send_wr->send_buf;
> - ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
> + mad_send_wc.status = IB_WC_SUCCESS;
> + mad_send_wc.vendor_err = 0;
> + mad_send_wc.send_buf = &mad_send_wr->send_buf;
> + ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
> + } else {
> + if ( !mad_agent_priv->agent.rmpp_version
> + && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class)
> + && (ib_get_rmpp_flags(&((struct ib_rmpp_mad *)mad_recv_wc->recv_buf.mad)->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
> + // user rmpp is in effect
> + spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
> +
> + mad_recv_wc->wc->wr_id = 0;
> + mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
> + mad_recv_wc);
> + atomic_dec(&mad_agent_priv->refcount);
> + } else {
> + // not user rmpp, revert to normal behavior and drop the mad
> + spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
> + ib_free_recv_mad(mad_recv_wc);
> + deref_mad_agent(mad_agent_priv);
> + return;
> + }
> + }
> } else {
> mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
> mad_recv_wc);
> diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
> index 36f815c..f9cacbc 100644
> --- a/drivers/infiniband/core/user_mad.c
> +++ b/drivers/infiniband/core/user_mad.c
> @@ -508,7 +508,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
>
> rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data;
> hdr_len = ib_get_mad_data_offset(rmpp_mad->mad_hdr.mgmt_class);
> - if (!ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
> + if (!agent->rmpp_version || !ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
> copy_offset = IB_MGMT_MAD_HDR;
> rmpp_active = 0;
> } else {
> @@ -560,14 +560,22 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
> rmpp_mad->mad_hdr.tid = *tid;
> }
>
> - spin_lock_irq(&file->send_lock);
> - ret = is_duplicate(file, packet);
> - if (!ret)
> + if ( !agent->rmpp_version
> + && ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)
> + && (ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
> + spin_lock_irq(&file->send_lock);
> list_add_tail(&packet->list, &file->send_list);
> - spin_unlock_irq(&file->send_lock);
> - if (ret) {
> - ret = -EINVAL;
> - goto err_msg;
> + spin_unlock_irq(&file->send_lock);
> + } else {
> + spin_lock_irq(&file->send_lock);
> + ret = is_duplicate(file, packet);
> + if (!ret)
> + list_add_tail(&packet->list, &file->send_list);
> + spin_unlock_irq(&file->send_lock);
> + if (ret) {
> + ret = -EINVAL;
> + goto err_msg;
> + }
> }
>
> ret = ib_post_send_mad(packet->msg, NULL);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* RE: [PATCH] IB/core User RMPP patch
From: Mike Heinz @ 2010-05-27 14:32 UTC (permalink / raw)
To: Hal Rosenstock
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
In-Reply-To: <AANLkTikpYJXj9MjCwGUlK1SisooL_etjbE3BdwHtQjTj-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
There are QLogic customers who have requested the ability to perform RMPP transaction handling in user space. This was an option in our old proprietary stack and there are a few customers still using it which need a way to forward migrate to OFED while containing the scope of their application changes. While we have developed appropriate "shim" libraries to allow their applications to migrate, we can't simulate/shim rmpp processing without some kernel support.
We also have some management applications which also need these capabilities. For those applications, the use of application RMPP control allows the application to perform some pacing of the RMPP transactions, permits some parts of the RMPP response to be built on the fly and also permits a degree of sharing of the response data between multiple requestors.
The use of OFED kernel based RMPP transaction handling was unable to meet all these requirements. So this simple option provides a minimal change to OFED while permitting the application to have the control it needs.
-----Original Message-----
From: Hal Rosenstock [mailto:hal.rosenstock@gmail.com]
Sent: Thursday, May 27, 2010 9:07 AM
To: Mike Heinz
Cc: linux-rdma@vger.kernel.org; Roland Dreier
Subject: Re: [PATCH] IB/core User RMPP patch
On Wed, May 26, 2010 at 4:14 PM, Mike Heinz <michael.heinz@qlogic.com> wrote:
> Currently, if a user application calls umad_register() or umad_register_oui() with an rmpp_version of zero, incoming rmpp messages are discarded.
Actually, it's the underlying ib_register_mad_agent call and this drop
behavior is intentional.
> This patch changes this behavior so that rmpp_version of zero causes incoming rmpp packets to be passed through without alteration, instead.
What's the motivation to make such a behavioral change ?
-- Hal
>
> Signed-off-by: Michael Heinz <michael.heinz@qlogic.com>
> ----
>
> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
> index 80282f1..b3457ae 100644
> --- a/drivers/infiniband/core/mad.c
> +++ b/drivers/infiniband/core/mad.c
> @@ -1830,25 +1830,39 @@ static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv,
> if (ib_response_mad(mad_recv_wc->recv_buf.mad)) {
> spin_lock_irqsave(&mad_agent_priv->lock, flags);
> mad_send_wr = ib_find_send_mad(mad_agent_priv, mad_recv_wc);
> - if (!mad_send_wr) {
> + if (mad_send_wr) {
> + ib_mark_mad_done(mad_send_wr);
> spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
> - ib_free_recv_mad(mad_recv_wc);
> - deref_mad_agent(mad_agent_priv);
> - return;
> - }
> - ib_mark_mad_done(mad_send_wr);
> - spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>
> - /* Defined behavior is to complete response before request */
> - mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
> - mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
> - mad_recv_wc);
> - atomic_dec(&mad_agent_priv->refcount);
> + /* Defined behavior is to complete response before request */
> + mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
> + mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
> + mad_recv_wc);
> + atomic_dec(&mad_agent_priv->refcount);
>
> - mad_send_wc.status = IB_WC_SUCCESS;
> - mad_send_wc.vendor_err = 0;
> - mad_send_wc.send_buf = &mad_send_wr->send_buf;
> - ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
> + mad_send_wc.status = IB_WC_SUCCESS;
> + mad_send_wc.vendor_err = 0;
> + mad_send_wc.send_buf = &mad_send_wr->send_buf;
> + ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
> + } else {
> + if ( !mad_agent_priv->agent.rmpp_version
> + && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class)
> + && (ib_get_rmpp_flags(&((struct ib_rmpp_mad *)mad_recv_wc->recv_buf.mad)->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
> + // user rmpp is in effect
> + spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
> +
> + mad_recv_wc->wc->wr_id = 0;
> + mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
> + mad_recv_wc);
> + atomic_dec(&mad_agent_priv->refcount);
> + } else {
> + // not user rmpp, revert to normal behavior and drop the mad
> + spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
> + ib_free_recv_mad(mad_recv_wc);
> + deref_mad_agent(mad_agent_priv);
> + return;
> + }
> + }
> } else {
> mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
> mad_recv_wc);
> diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
> index 36f815c..f9cacbc 100644
> --- a/drivers/infiniband/core/user_mad.c
> +++ b/drivers/infiniband/core/user_mad.c
> @@ -508,7 +508,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
>
> rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data;
> hdr_len = ib_get_mad_data_offset(rmpp_mad->mad_hdr.mgmt_class);
> - if (!ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
> + if (!agent->rmpp_version || !ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
> copy_offset = IB_MGMT_MAD_HDR;
> rmpp_active = 0;
> } else {
> @@ -560,14 +560,22 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
> rmpp_mad->mad_hdr.tid = *tid;
> }
>
> - spin_lock_irq(&file->send_lock);
> - ret = is_duplicate(file, packet);
> - if (!ret)
> + if ( !agent->rmpp_version
> + && ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)
> + && (ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
> + spin_lock_irq(&file->send_lock);
> list_add_tail(&packet->list, &file->send_list);
> - spin_unlock_irq(&file->send_lock);
> - if (ret) {
> - ret = -EINVAL;
> - goto err_msg;
> + spin_unlock_irq(&file->send_lock);
> + } else {
> + spin_lock_irq(&file->send_lock);
> + ret = is_duplicate(file, packet);
> + if (!ret)
> + list_add_tail(&packet->list, &file->send_list);
> + spin_unlock_irq(&file->send_lock);
> + if (ret) {
> + ret = -EINVAL;
> + goto err_msg;
> + }
> }
>
> ret = ib_post_send_mad(packet->msg, NULL);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH] IB/core User RMPP patch
From: Hal Rosenstock @ 2010-05-27 15:12 UTC (permalink / raw)
To: Mike Heinz
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
In-Reply-To: <4C2744E8AD2982428C5BFE523DF8CDCB49A488D5AF-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
On Thu, May 27, 2010 at 10:32 AM, Mike Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> wrote:
> There are QLogic customers who have requested the ability to perform RMPP transaction handling in user space. This was an option in our old proprietary stack and there are a few customers still using it which need a way to forward migrate to OFED while containing the scope of their application changes. While we have developed appropriate "shim" libraries to allow their applications to migrate, we can't simulate/shim rmpp processing without some kernel support.
>
> We also have some management applications which also need these capabilities. For those applications, the use of application RMPP control allows the application to perform some pacing of the RMPP transactions, permits some parts of the RMPP response to be built on the fly and also permits a degree of sharing of the response data between multiple requestors.
>
> The use of OFED kernel based RMPP transaction handling was unable to meet all these requirements. So this simple option provides a minimal change to OFED while permitting the application to have the control it needs.
The API would need to be extended for this mode (in some backward
compatible manner) rather than supplanting the rmpp_version 0
behavior. Changing that behavior breaks backward compatibility/some
existing apps.
>
> -----Original Message-----
> From: Hal Rosenstock [mailto:hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
> Sent: Thursday, May 27, 2010 9:07 AM
> To: Mike Heinz
> Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Roland Dreier
> Subject: Re: [PATCH] IB/core User RMPP patch
>
> On Wed, May 26, 2010 at 4:14 PM, Mike Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> wrote:
>> Currently, if a user application calls umad_register() or umad_register_oui() with an rmpp_version of zero, incoming rmpp messages are discarded.
>
> Actually, it's the underlying ib_register_mad_agent call and this drop
> behavior is intentional.
>
>> This patch changes this behavior so that rmpp_version of zero causes incoming rmpp packets to be passed through without alteration, instead.
>
> What's the motivation to make such a behavioral change ?
>
> -- Hal
>
>>
>> Signed-off-by: Michael Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
>> ----
>>
>> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
>> index 80282f1..b3457ae 100644
>> --- a/drivers/infiniband/core/mad.c
>> +++ b/drivers/infiniband/core/mad.c
>> @@ -1830,25 +1830,39 @@ static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv,
>> if (ib_response_mad(mad_recv_wc->recv_buf.mad)) {
>> spin_lock_irqsave(&mad_agent_priv->lock, flags);
>> mad_send_wr = ib_find_send_mad(mad_agent_priv, mad_recv_wc);
>> - if (!mad_send_wr) {
>> + if (mad_send_wr) {
>> + ib_mark_mad_done(mad_send_wr);
>> spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>> - ib_free_recv_mad(mad_recv_wc);
>> - deref_mad_agent(mad_agent_priv);
>> - return;
>> - }
>> - ib_mark_mad_done(mad_send_wr);
>> - spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>
>> - /* Defined behavior is to complete response before request */
>> - mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
>> - mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>> - mad_recv_wc);
>> - atomic_dec(&mad_agent_priv->refcount);
>> + /* Defined behavior is to complete response before request */
>> + mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
>> + mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>> + mad_recv_wc);
>> + atomic_dec(&mad_agent_priv->refcount);
>>
>> - mad_send_wc.status = IB_WC_SUCCESS;
>> - mad_send_wc.vendor_err = 0;
>> - mad_send_wc.send_buf = &mad_send_wr->send_buf;
>> - ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
>> + mad_send_wc.status = IB_WC_SUCCESS;
>> + mad_send_wc.vendor_err = 0;
>> + mad_send_wc.send_buf = &mad_send_wr->send_buf;
>> + ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
>> + } else {
>> + if ( !mad_agent_priv->agent.rmpp_version
>> + && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class)
>> + && (ib_get_rmpp_flags(&((struct ib_rmpp_mad *)mad_recv_wc->recv_buf.mad)->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
>> + // user rmpp is in effect
>> + spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>> +
>> + mad_recv_wc->wc->wr_id = 0;
>> + mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>> + mad_recv_wc);
>> + atomic_dec(&mad_agent_priv->refcount);
>> + } else {
>> + // not user rmpp, revert to normal behavior and drop the mad
>> + spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>> + ib_free_recv_mad(mad_recv_wc);
>> + deref_mad_agent(mad_agent_priv);
>> + return;
>> + }
>> + }
>> } else {
>> mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>> mad_recv_wc);
>> diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
>> index 36f815c..f9cacbc 100644
>> --- a/drivers/infiniband/core/user_mad.c
>> +++ b/drivers/infiniband/core/user_mad.c
>> @@ -508,7 +508,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
>>
>> rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data;
>> hdr_len = ib_get_mad_data_offset(rmpp_mad->mad_hdr.mgmt_class);
>> - if (!ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
>> + if (!agent->rmpp_version || !ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
>> copy_offset = IB_MGMT_MAD_HDR;
>> rmpp_active = 0;
>> } else {
>> @@ -560,14 +560,22 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
>> rmpp_mad->mad_hdr.tid = *tid;
>> }
>>
>> - spin_lock_irq(&file->send_lock);
>> - ret = is_duplicate(file, packet);
>> - if (!ret)
>> + if ( !agent->rmpp_version
>> + && ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)
>> + && (ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
>> + spin_lock_irq(&file->send_lock);
>> list_add_tail(&packet->list, &file->send_list);
>> - spin_unlock_irq(&file->send_lock);
>> - if (ret) {
>> - ret = -EINVAL;
>> - goto err_msg;
>> + spin_unlock_irq(&file->send_lock);
>> + } else {
>> + spin_lock_irq(&file->send_lock);
>> + ret = is_duplicate(file, packet);
>> + if (!ret)
>> + list_add_tail(&packet->list, &file->send_list);
>> + spin_unlock_irq(&file->send_lock);
>> + if (ret) {
>> + ret = -EINVAL;
>> + goto err_msg;
>> + }
>> }
>>
>> ret = ib_post_send_mad(packet->msg, NULL);
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] IB/util madeye.c
From: Mike Heinz @ 2010-05-27 15:43 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Madeye is a debugging/monitoring tool for infiniband fabrics. When loaded, by default it will log copies of all MAD traffic to the system log. In addition, it can be configured to log only those MADs which have a particular class or a particular attribute id.
It has been part of the EWG version of the OFED stack for several years, but it is useful enough that I think it should be included in the standard RDMA stack.
Signed-Off-By: Michael Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
----
diff --git a/drivers/infiniband/util/madeye.c b/drivers/infiniband/util/madeye.c
new file mode 100644
index 0000000..2c650a3
--- /dev/null
+++ b/drivers/infiniband/util/madeye.c
@@ -0,0 +1,593 @@
+/*
+ * Copyright (c) 2004, 2005 Intel Corporation. All rights reserved.
+ * Copyright (c) 2005, 2006 Voltaire Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directorY of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/err.h>
+
+#include <rdma/ib_mad.h>
+#include <rdma/ib_smi.h>
+#include <rdma/ib_sa.h>
+
+MODULE_AUTHOR("Sean Hefty");
+MODULE_DESCRIPTION("InfiniBand MAD viewer");
+MODULE_LICENSE("Dual BSD/GPL");
+
+static void madeye_remove_one(struct ib_device *device);
+static void madeye_add_one(struct ib_device *device);
+
+static struct ib_client madeye_client = {
+ .name = "madeye",
+ .add = madeye_add_one,
+ .remove = madeye_remove_one
+};
+
+struct madeye_port {
+ struct ib_mad_agent *smi_agent;
+ struct ib_mad_agent *gsi_agent;
+};
+
+static int smp = 1;
+static int gmp = 1;
+static int mgmt_class = 0;
+static int attr_id = 0;
+static int data = 0;
+
+module_param(smp, int, 0444);
+module_param(gmp, int, 0444);
+module_param(mgmt_class, int, 0444);
+module_param(attr_id, int, 0444);
+module_param(data, int, 0444);
+
+MODULE_PARM_DESC(smp, "Display all SMPs (default=1)");
+MODULE_PARM_DESC(gmp, "Display all GMPs (default=1)");
+MODULE_PARM_DESC(mgmt_class, "Display all MADs of specified class (default=0)");
+MODULE_PARM_DESC(attr_id, "Display add MADs of specified attribute ID (default=0)");
+MODULE_PARM_DESC(data, "Display data area of MADs (default=0)");
+
+static char * get_class_name(u8 mgmt_class)
+{
+ switch(mgmt_class) {
+ case IB_MGMT_CLASS_SUBN_LID_ROUTED:
+ return "LID routed SMP";
+ case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE:
+ return "Directed route SMP";
+ case IB_MGMT_CLASS_SUBN_ADM:
+ return "Subnet admin.";
+ case IB_MGMT_CLASS_PERF_MGMT:
+ return "Perf. mgmt.";
+ case IB_MGMT_CLASS_BM:
+ return "Baseboard mgmt.";
+ case IB_MGMT_CLASS_DEVICE_MGMT:
+ return "Device mgmt.";
+ case IB_MGMT_CLASS_CM:
+ return "Comm. mgmt.";
+ case IB_MGMT_CLASS_SNMP:
+ return "SNMP";
+ default:
+ return "Unknown vendor/application";
+ }
+}
+
+static char * get_method_name(u8 mgmt_class, u8 method)
+{
+ switch(method) {
+ case IB_MGMT_METHOD_GET:
+ return "Get";
+ case IB_MGMT_METHOD_SET:
+ return "Set";
+ case IB_MGMT_METHOD_GET_RESP:
+ return "Get response";
+ case IB_MGMT_METHOD_SEND:
+ return "Send";
+ case IB_MGMT_METHOD_SEND | IB_MGMT_METHOD_RESP:
+ return "Send response";
+ case IB_MGMT_METHOD_TRAP:
+ return "Trap";
+ case IB_MGMT_METHOD_REPORT:
+ return "Report";
+ case IB_MGMT_METHOD_REPORT_RESP:
+ return "Report response";
+ case IB_MGMT_METHOD_TRAP_REPRESS:
+ return "Trap repress";
+ default:
+ break;
+ }
+
+ switch (mgmt_class) {
+ case IB_MGMT_CLASS_SUBN_ADM:
+ switch (method) {
+ case IB_SA_METHOD_GET_TABLE:
+ return "Get table";
+ case IB_SA_METHOD_GET_TABLE_RESP:
+ return "Get table response";
+ case IB_SA_METHOD_DELETE:
+ return "Delete";
+ case IB_SA_METHOD_DELETE_RESP:
+ return "Delete response";
+ case IB_SA_METHOD_GET_MULTI:
+ return "Get Multi";
+ case IB_SA_METHOD_GET_MULTI_RESP:
+ return "Get Multi response";
+ case IB_SA_METHOD_GET_TRACE_TBL:
+ return "Get Trace Table response";
+ default:
+ break;
+ }
+ default:
+ break;
+ }
+
+ return "Unknown";
+}
+
+static void print_status_details(u16 status)
+{
+ if (status & 0x0001)
+ printk(" busy\n");
+ if (status & 0x0002)
+ printk(" redirection required\n");
+ switch((status & 0x001C) >> 2) {
+ case 1:
+ printk(" bad version\n");
+ break;
+ case 2:
+ printk(" method not supported\n");
+ break;
+ case 3:
+ printk(" method/attribute combo not supported\n");
+ break;
+ case 7:
+ printk(" invalid attribute/modifier value\n");
+ break;
+ }
+}
+
+static char * get_sa_attr(__be16 attr)
+{
+ switch(attr) {
+ case IB_SA_ATTR_CLASS_PORTINFO:
+ return "Class Port Info";
+ case IB_SA_ATTR_NOTICE:
+ return "Notice";
+ case IB_SA_ATTR_INFORM_INFO:
+ return "Inform Info";
+ case IB_SA_ATTR_NODE_REC:
+ return "Node Record";
+ case IB_SA_ATTR_PORT_INFO_REC:
+ return "PortInfo Record";
+ case IB_SA_ATTR_SL2VL_REC:
+ return "SL to VL Record";
+ case IB_SA_ATTR_SWITCH_REC:
+ return "Switch Record";
+ case IB_SA_ATTR_LINEAR_FDB_REC:
+ return "Linear FDB Record";
+ case IB_SA_ATTR_RANDOM_FDB_REC:
+ return "Random FDB Record";
+ case IB_SA_ATTR_MCAST_FDB_REC:
+ return "Multicast FDB Record";
+ case IB_SA_ATTR_SM_INFO_REC:
+ return "SM Info Record";
+ case IB_SA_ATTR_LINK_REC:
+ return "Link Record";
+ case IB_SA_ATTR_GUID_INFO_REC:
+ return "Guid Info Record";
+ case IB_SA_ATTR_SERVICE_REC:
+ return "Service Record";
+ case IB_SA_ATTR_PARTITION_REC:
+ return "Partition Record";
+ case IB_SA_ATTR_PATH_REC:
+ return "Path Record";
+ case IB_SA_ATTR_VL_ARB_REC:
+ return "VL Arb Record";
+ case IB_SA_ATTR_MC_MEMBER_REC:
+ return "MC Member Record";
+ case IB_SA_ATTR_TRACE_REC:
+ return "Trace Record";
+ case IB_SA_ATTR_MULTI_PATH_REC:
+ return "Multi Path Record";
+ case IB_SA_ATTR_SERVICE_ASSOC_REC:
+ return "Service Assoc Record";
+ case IB_SA_ATTR_INFORM_INFO_REC:
+ return "Inform Info Record";
+ default:
+ return "";
+ }
+}
+
+static void print_mad_hdr(struct ib_mad_hdr *mad_hdr)
+{
+ printk("MAD version....0x%01x\n", mad_hdr->base_version);
+ printk("Class..........0x%01x (%s)\n", mad_hdr->mgmt_class,
+ get_class_name(mad_hdr->mgmt_class));
+ printk("Class version..0x%01x\n", mad_hdr->class_version);
+ printk("Method.........0x%01x (%s)\n", mad_hdr->method,
+ get_method_name(mad_hdr->mgmt_class, mad_hdr->method));
+ printk("Status.........0x%02x\n", be16_to_cpu(mad_hdr->status));
+ if (mad_hdr->status)
+ print_status_details(be16_to_cpu(mad_hdr->status));
+ printk("Class specific.0x%02x\n", be16_to_cpu(mad_hdr->class_specific));
+ printk("Trans ID.......0x%llx\n",
+ (unsigned long long)be64_to_cpu(mad_hdr->tid));
+ if (mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_ADM)
+ printk("Attr ID........0x%02x (%s)\n",
+ be16_to_cpu(mad_hdr->attr_id),
+ get_sa_attr(be16_to_cpu(mad_hdr->attr_id)));
+ else
+ printk("Attr ID........0x%02x\n",
+ be16_to_cpu(mad_hdr->attr_id));
+ printk("Attr modifier..0x%04x\n", be32_to_cpu(mad_hdr->attr_mod));
+}
+
+static char * get_rmpp_type(u8 rmpp_type)
+{
+ switch (rmpp_type) {
+ case IB_MGMT_RMPP_TYPE_DATA:
+ return "Data";
+ case IB_MGMT_RMPP_TYPE_ACK:
+ return "Ack";
+ case IB_MGMT_RMPP_TYPE_STOP:
+ return "Stop";
+ case IB_MGMT_RMPP_TYPE_ABORT:
+ return "Abort";
+ default:
+ return "Unknown";
+ }
+}
+
+static char * get_rmpp_flags(u8 rmpp_flags)
+{
+ if (rmpp_flags & IB_MGMT_RMPP_FLAG_ACTIVE)
+ if (rmpp_flags & IB_MGMT_RMPP_FLAG_FIRST)
+ if (rmpp_flags & IB_MGMT_RMPP_FLAG_LAST)
+ return "Active - First & Last";
+ else
+ return "Active - First";
+ else
+ if (rmpp_flags & IB_MGMT_RMPP_FLAG_LAST)
+ return "Active - Last";
+ else
+ return "Active";
+ else
+ return "Inactive";
+}
+
+static void print_rmpp_hdr(struct ib_rmpp_hdr *rmpp_hdr)
+{
+ printk("RMPP version...0x%01x\n", rmpp_hdr->rmpp_version);
+ printk("RMPP type......0x%01x (%s)\n", rmpp_hdr->rmpp_type,
+ get_rmpp_type(rmpp_hdr->rmpp_type));
+ printk("RMPP RRespTime.0x%01x\n", ib_get_rmpp_resptime(rmpp_hdr));
+ printk("RMPP flags.....0x%01x (%s)\n", ib_get_rmpp_flags(rmpp_hdr),
+ get_rmpp_flags(ib_get_rmpp_flags(rmpp_hdr)));
+ printk("RMPP status....0x%01x\n", rmpp_hdr->rmpp_status);
+ printk("Seg number.....0x%04x\n", be32_to_cpu(rmpp_hdr->seg_num));
+ switch (rmpp_hdr->rmpp_type) {
+ case IB_MGMT_RMPP_TYPE_DATA:
+ printk("Payload len....0x%04x\n",
+ be32_to_cpu(rmpp_hdr->paylen_newwin));
+ break;
+ case IB_MGMT_RMPP_TYPE_ACK:
+ printk("New window.....0x%04x\n",
+ be32_to_cpu(rmpp_hdr->paylen_newwin));
+ break;
+ default:
+ printk("Data 2.........0x%04x\n",
+ be32_to_cpu(rmpp_hdr->paylen_newwin));
+ break;
+ }
+}
+
+static char * get_smp_attr(__be16 attr)
+{
+ switch (attr) {
+ case IB_SMP_ATTR_NOTICE:
+ return "notice";
+ case IB_SMP_ATTR_NODE_DESC:
+ return "node description";
+ case IB_SMP_ATTR_NODE_INFO:
+ return "node info";
+ case IB_SMP_ATTR_SWITCH_INFO:
+ return "switch info";
+ case IB_SMP_ATTR_GUID_INFO:
+ return "GUID info";
+ case IB_SMP_ATTR_PORT_INFO:
+ return "port info";
+ case IB_SMP_ATTR_PKEY_TABLE:
+ return "pkey table";
+ case IB_SMP_ATTR_SL_TO_VL_TABLE:
+ return "SL to VL table";
+ case IB_SMP_ATTR_VL_ARB_TABLE:
+ return "VL arbitration table";
+ case IB_SMP_ATTR_LINEAR_FORWARD_TABLE:
+ return "linear forwarding table";
+ case IB_SMP_ATTR_RANDOM_FORWARD_TABLE:
+ return "random forward table";
+ case IB_SMP_ATTR_MCAST_FORWARD_TABLE:
+ return "multicast forward table";
+ case IB_SMP_ATTR_SM_INFO:
+ return "SM info";
+ case IB_SMP_ATTR_VENDOR_DIAG:
+ return "vendor diags";
+ case IB_SMP_ATTR_LED_INFO:
+ return "LED info";
+ default:
+ return "";
+ }
+}
+
+static void print_smp(struct ib_smp *smp)
+{
+ int i;
+
+ printk("MAD version....0x%01x\n", smp->base_version);
+ printk("Class..........0x%01x (%s)\n", smp->mgmt_class,
+ get_class_name(smp->mgmt_class));
+ printk("Class version..0x%01x\n", smp->class_version);
+ printk("Method.........0x%01x (%s)\n", smp->method,
+ get_method_name(smp->mgmt_class, smp->method));
+ printk("Status.........0x%02x\n", be16_to_cpu(smp->status));
+ if (smp->status)
+ print_status_details(be16_to_cpu(smp->status));
+ printk("Hop pointer....0x%01x\n", smp->hop_ptr);
+ printk("Hop counter....0x%01x\n", smp->hop_cnt);
+ printk("Trans ID.......0x%llx\n",
+ (unsigned long long)be64_to_cpu(smp->tid));
+ printk("Attr ID........0x%02x (%s)\n", be16_to_cpu(smp->attr_id),
+ get_smp_attr(smp->attr_id));
+ printk("Attr modifier..0x%04x\n", be32_to_cpu(smp->attr_mod));
+
+ printk("Mkey...........0x%llx\n",
+ (unsigned long long)be64_to_cpu(smp->mkey));
+ printk("DR SLID........0x%02x\n", be16_to_cpu(smp->dr_slid));
+ printk("DR DLID........0x%02x", be16_to_cpu(smp->dr_dlid));
+
+ if (data) {
+ for (i = 0; i < IB_SMP_DATA_SIZE; i++) {
+ if (i % 16 == 0)
+ printk("\nSMP Data.......");
+ printk("%01x ", smp->data[i]);
+ }
+ for (i = 0; i < IB_SMP_MAX_PATH_HOPS; i++) {
+ if (i % 16 == 0)
+ printk("\nInitial path...");
+ printk("%01x ", smp->initial_path[i]);
+ }
+ for (i = 0; i < IB_SMP_MAX_PATH_HOPS; i++) {
+ if (i % 16 == 0)
+ printk("\nReturn path....");
+ printk("%01x ", smp->return_path[i]);
+ }
+ }
+ printk("\n");
+}
+
+static void snoop_smi_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_send_buf *send_buf,
+ struct ib_mad_send_wc *mad_send_wc)
+{
+ struct ib_mad_hdr *hdr = send_buf->mad;
+
+ if (!smp && hdr->mgmt_class != mgmt_class)
+ return;
+ if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
+ return;
+
+ printk("Madeye:sent SMP\n");
+ print_smp(send_buf->mad);
+}
+
+static void recv_smi_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_recv_wc *mad_recv_wc)
+{
+ if (!smp && mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class != mgmt_class)
+ return;
+ if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id)
+ return;
+
+ printk("Madeye:recv SMP\n");
+ print_smp((struct ib_smp *)&mad_recv_wc->recv_buf.mad->mad_hdr);
+}
+
+static int is_rmpp_mad(struct ib_mad_hdr *mad_hdr)
+{
+ if (mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_ADM) {
+ switch (mad_hdr->method) {
+ case IB_SA_METHOD_GET_TABLE:
+ case IB_SA_METHOD_GET_TABLE_RESP:
+ case IB_SA_METHOD_GET_MULTI_RESP:
+ return 1;
+ default:
+ break;
+ }
+ } else if ((mad_hdr->mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) &&
+ (mad_hdr->mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))
+ return 1;
+
+ return 0;
+}
+
+static void snoop_gsi_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_send_buf *send_buf,
+ struct ib_mad_send_wc *mad_send_wc)
+{
+ struct ib_mad_hdr *hdr = send_buf->mad;
+
+ if (!gmp && hdr->mgmt_class != mgmt_class)
+ return;
+ if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
+ return;
+
+ printk("Madeye:sent GMP\n");
+ print_mad_hdr(hdr);
+
+ if (is_rmpp_mad(hdr))
+ print_rmpp_hdr(&((struct ib_rmpp_mad *) hdr)->rmpp_hdr);
+}
+
+static void recv_gsi_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_recv_wc *mad_recv_wc)
+{
+ struct ib_mad_hdr *hdr = &mad_recv_wc->recv_buf.mad->mad_hdr;
+ struct ib_rmpp_mad *mad = NULL;
+ struct ib_sa_mad *sa_mad;
+ struct ib_vendor_mad *vendor_mad;
+ u8 *mad_data;
+ int i, j;
+
+ if (!gmp && hdr->mgmt_class != mgmt_class)
+ return;
+ if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id)
+ return;
+
+ printk("Madeye:recv GMP\n");
+ print_mad_hdr(hdr);
+
+ if (is_rmpp_mad(hdr)) {
+ mad = (struct ib_rmpp_mad *) hdr;
+ print_rmpp_hdr(&mad->rmpp_hdr);
+ }
+
+ if (data) {
+ if (hdr->mgmt_class == IB_MGMT_CLASS_SUBN_ADM) {
+ j = IB_MGMT_SA_DATA;
+ /* Display SA header */
+ if (is_rmpp_mad(hdr) &&
+ mad->rmpp_hdr.rmpp_type != IB_MGMT_RMPP_TYPE_DATA)
+ return;
+ sa_mad = (struct ib_sa_mad *)
+ &mad_recv_wc->recv_buf.mad;
+ mad_data = sa_mad->data;
+ } else {
+ if (is_rmpp_mad(hdr)) {
+ j = IB_MGMT_VENDOR_DATA;
+ /* Display OUI */
+ vendor_mad = (struct ib_vendor_mad *)
+ &mad_recv_wc->recv_buf.mad;
+ printk("Vendor OUI......%01x %01x %01x\n",
+ vendor_mad->oui[0],
+ vendor_mad->oui[1],
+ vendor_mad->oui[2]);
+ mad_data = vendor_mad->data;
+ } else {
+ j = IB_MGMT_MAD_DATA;
+ mad_data = mad_recv_wc->recv_buf.mad->data;
+ }
+ }
+ for (i = 0; i < j; i++) {
+ if (i % 16 == 0)
+ printk("\nData...........");
+ printk("%01x ", mad_data[i]);
+ }
+ printk("\n");
+ }
+}
+
+static void madeye_add_one(struct ib_device *device)
+{
+ struct madeye_port *port;
+ int reg_flags;
+ u8 i, s, e;
+
+ if (device->node_type == RDMA_NODE_IB_SWITCH) {
+ s = 0;
+ e = 0;
+ } else {
+ s = 1;
+ e = device->phys_port_cnt;
+ }
+
+ port = kmalloc(sizeof *port * (e - s + 1), GFP_KERNEL);
+ if (!port)
+ goto out;
+
+ reg_flags = IB_MAD_SNOOP_SEND_COMPLETIONS | IB_MAD_SNOOP_RECVS;
+ for (i = 0; i <= e - s; i++) {
+ port[i].smi_agent = ib_register_mad_snoop(device, i + s,
+ IB_QPT_SMI,
+ reg_flags,
+ snoop_smi_handler,
+ recv_smi_handler,
+ &port[i]);
+ port[i].gsi_agent = ib_register_mad_snoop(device, i + s,
+ IB_QPT_GSI,
+ reg_flags,
+ snoop_gsi_handler,
+ recv_gsi_handler,
+ &port[i]);
+ }
+
+out:
+ ib_set_client_data(device, &madeye_client, port);
+}
+
+static void madeye_remove_one(struct ib_device *device)
+{
+ struct madeye_port *port;
+ int i, s, e;
+
+ port = (struct madeye_port *)
+ ib_get_client_data(device, &madeye_client);
+ if (!port)
+ return;
+
+ if (device->node_type == RDMA_NODE_IB_SWITCH) {
+ s = 0;
+ e = 0;
+ } else {
+ s = 1;
+ e = device->phys_port_cnt;
+ }
+
+ for (i = 0; i <= e - s; i++) {
+ if (!IS_ERR(port[i].smi_agent))
+ ib_unregister_mad_agent(port[i].smi_agent);
+ if (!IS_ERR(port[i].gsi_agent))
+ ib_unregister_mad_agent(port[i].gsi_agent);
+ }
+ kfree(port);
+}
+
+static int __init ib_madeye_init(void)
+{
+ return ib_register_client(&madeye_client);
+}
+
+static void __exit ib_madeye_cleanup(void)
+{
+ ib_unregister_client(&madeye_client);
+}
+
+module_init(ib_madeye_init);
+module_exit(ib_madeye_cleanup);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH v2] IB/util madeye.c
From: Mike Heinz @ 2010-05-27 15:51 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Previous patchfile was missing the Kconfig and makefile changes. Sorry.
---
Madeye is a debugging/monitoring tool for infiniband fabrics. When loaded, by default it will log copies of all MAD traffic to the system log. In addition, it can be configured to log only those MADs which have a particular class or a particular attribute id.
It has been part of the EWG version of the OFED stack for several years, but it is useful enough that I think it should be included in the standard RDMA stack. This patch includes a bug fix that has also been submitted to EWG.
Signed-Off-By: Michael Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
----
diff --git a/drivers/infiniband/Makefile b/drivers/infiniband/Makefile
index 9cc7a47..d4afe6c 100644
--- a/drivers/infiniband/Makefile
+++ b/drivers/infiniband/Makefile
@@ -11,3 +11,4 @@ obj-$(CONFIG_INFINIBAND_NES) += hw/nes/
obj-$(CONFIG_INFINIBAND_IPOIB) += ulp/ipoib/
obj-$(CONFIG_INFINIBAND_SRP) += ulp/srp/
obj-$(CONFIG_INFINIBAND_ISER) += ulp/iser/
+obj-$(CONFIG_INFINIBAND_MADEYE) += util/
diff --git a/drivers/infiniband/util/Kconfig b/drivers/infiniband/util/Kconfig
new file mode 100644
index 0000000..5e98eaa
--- /dev/null
+++ b/drivers/infiniband/util/Kconfig
@@ -0,0 +1,6 @@
+config INFINIBAND_MADEYE
+ tristate "MAD debug viewer for InfiniBand"
+ depends on INFINIBAND
+ ---help---
+ Prints sent and received MADs on QP 0/1 for debugging.
+
diff --git a/drivers/infiniband/util/Makefile b/drivers/infiniband/util/Makefile
new file mode 100644
index 0000000..caf9471
--- /dev/null
+++ b/drivers/infiniband/util/Makefile
@@ -0,0 +1,3 @@
+obj-$(CONFIG_INFINIBAND_MADEYE) += ib_madeye.o
+
+ib_madeye-y := madeye.o
diff --git a/drivers/infiniband/util/madeye.c b/drivers/infiniband/util/madeye.c
new file mode 100644
index 0000000..2c650a3
--- /dev/null
+++ b/drivers/infiniband/util/madeye.c
@@ -0,0 +1,593 @@
+/*
+ * Copyright (c) 2004, 2005 Intel Corporation. All rights reserved.
+ * Copyright (c) 2005, 2006 Voltaire Inc. All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses. You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directorY of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/err.h>
+
+#include <rdma/ib_mad.h>
+#include <rdma/ib_smi.h>
+#include <rdma/ib_sa.h>
+
+MODULE_AUTHOR("Sean Hefty");
+MODULE_DESCRIPTION("InfiniBand MAD viewer");
+MODULE_LICENSE("Dual BSD/GPL");
+
+static void madeye_remove_one(struct ib_device *device);
+static void madeye_add_one(struct ib_device *device);
+
+static struct ib_client madeye_client = {
+ .name = "madeye",
+ .add = madeye_add_one,
+ .remove = madeye_remove_one
+};
+
+struct madeye_port {
+ struct ib_mad_agent *smi_agent;
+ struct ib_mad_agent *gsi_agent;
+};
+
+static int smp = 1;
+static int gmp = 1;
+static int mgmt_class = 0;
+static int attr_id = 0;
+static int data = 0;
+
+module_param(smp, int, 0444);
+module_param(gmp, int, 0444);
+module_param(mgmt_class, int, 0444);
+module_param(attr_id, int, 0444);
+module_param(data, int, 0444);
+
+MODULE_PARM_DESC(smp, "Display all SMPs (default=1)");
+MODULE_PARM_DESC(gmp, "Display all GMPs (default=1)");
+MODULE_PARM_DESC(mgmt_class, "Display all MADs of specified class (default=0)");
+MODULE_PARM_DESC(attr_id, "Display add MADs of specified attribute ID (default=0)");
+MODULE_PARM_DESC(data, "Display data area of MADs (default=0)");
+
+static char * get_class_name(u8 mgmt_class)
+{
+ switch(mgmt_class) {
+ case IB_MGMT_CLASS_SUBN_LID_ROUTED:
+ return "LID routed SMP";
+ case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE:
+ return "Directed route SMP";
+ case IB_MGMT_CLASS_SUBN_ADM:
+ return "Subnet admin.";
+ case IB_MGMT_CLASS_PERF_MGMT:
+ return "Perf. mgmt.";
+ case IB_MGMT_CLASS_BM:
+ return "Baseboard mgmt.";
+ case IB_MGMT_CLASS_DEVICE_MGMT:
+ return "Device mgmt.";
+ case IB_MGMT_CLASS_CM:
+ return "Comm. mgmt.";
+ case IB_MGMT_CLASS_SNMP:
+ return "SNMP";
+ default:
+ return "Unknown vendor/application";
+ }
+}
+
+static char * get_method_name(u8 mgmt_class, u8 method)
+{
+ switch(method) {
+ case IB_MGMT_METHOD_GET:
+ return "Get";
+ case IB_MGMT_METHOD_SET:
+ return "Set";
+ case IB_MGMT_METHOD_GET_RESP:
+ return "Get response";
+ case IB_MGMT_METHOD_SEND:
+ return "Send";
+ case IB_MGMT_METHOD_SEND | IB_MGMT_METHOD_RESP:
+ return "Send response";
+ case IB_MGMT_METHOD_TRAP:
+ return "Trap";
+ case IB_MGMT_METHOD_REPORT:
+ return "Report";
+ case IB_MGMT_METHOD_REPORT_RESP:
+ return "Report response";
+ case IB_MGMT_METHOD_TRAP_REPRESS:
+ return "Trap repress";
+ default:
+ break;
+ }
+
+ switch (mgmt_class) {
+ case IB_MGMT_CLASS_SUBN_ADM:
+ switch (method) {
+ case IB_SA_METHOD_GET_TABLE:
+ return "Get table";
+ case IB_SA_METHOD_GET_TABLE_RESP:
+ return "Get table response";
+ case IB_SA_METHOD_DELETE:
+ return "Delete";
+ case IB_SA_METHOD_DELETE_RESP:
+ return "Delete response";
+ case IB_SA_METHOD_GET_MULTI:
+ return "Get Multi";
+ case IB_SA_METHOD_GET_MULTI_RESP:
+ return "Get Multi response";
+ case IB_SA_METHOD_GET_TRACE_TBL:
+ return "Get Trace Table response";
+ default:
+ break;
+ }
+ default:
+ break;
+ }
+
+ return "Unknown";
+}
+
+static void print_status_details(u16 status)
+{
+ if (status & 0x0001)
+ printk(" busy\n");
+ if (status & 0x0002)
+ printk(" redirection required\n");
+ switch((status & 0x001C) >> 2) {
+ case 1:
+ printk(" bad version\n");
+ break;
+ case 2:
+ printk(" method not supported\n");
+ break;
+ case 3:
+ printk(" method/attribute combo not supported\n");
+ break;
+ case 7:
+ printk(" invalid attribute/modifier value\n");
+ break;
+ }
+}
+
+static char * get_sa_attr(__be16 attr)
+{
+ switch(attr) {
+ case IB_SA_ATTR_CLASS_PORTINFO:
+ return "Class Port Info";
+ case IB_SA_ATTR_NOTICE:
+ return "Notice";
+ case IB_SA_ATTR_INFORM_INFO:
+ return "Inform Info";
+ case IB_SA_ATTR_NODE_REC:
+ return "Node Record";
+ case IB_SA_ATTR_PORT_INFO_REC:
+ return "PortInfo Record";
+ case IB_SA_ATTR_SL2VL_REC:
+ return "SL to VL Record";
+ case IB_SA_ATTR_SWITCH_REC:
+ return "Switch Record";
+ case IB_SA_ATTR_LINEAR_FDB_REC:
+ return "Linear FDB Record";
+ case IB_SA_ATTR_RANDOM_FDB_REC:
+ return "Random FDB Record";
+ case IB_SA_ATTR_MCAST_FDB_REC:
+ return "Multicast FDB Record";
+ case IB_SA_ATTR_SM_INFO_REC:
+ return "SM Info Record";
+ case IB_SA_ATTR_LINK_REC:
+ return "Link Record";
+ case IB_SA_ATTR_GUID_INFO_REC:
+ return "Guid Info Record";
+ case IB_SA_ATTR_SERVICE_REC:
+ return "Service Record";
+ case IB_SA_ATTR_PARTITION_REC:
+ return "Partition Record";
+ case IB_SA_ATTR_PATH_REC:
+ return "Path Record";
+ case IB_SA_ATTR_VL_ARB_REC:
+ return "VL Arb Record";
+ case IB_SA_ATTR_MC_MEMBER_REC:
+ return "MC Member Record";
+ case IB_SA_ATTR_TRACE_REC:
+ return "Trace Record";
+ case IB_SA_ATTR_MULTI_PATH_REC:
+ return "Multi Path Record";
+ case IB_SA_ATTR_SERVICE_ASSOC_REC:
+ return "Service Assoc Record";
+ case IB_SA_ATTR_INFORM_INFO_REC:
+ return "Inform Info Record";
+ default:
+ return "";
+ }
+}
+
+static void print_mad_hdr(struct ib_mad_hdr *mad_hdr)
+{
+ printk("MAD version....0x%01x\n", mad_hdr->base_version);
+ printk("Class..........0x%01x (%s)\n", mad_hdr->mgmt_class,
+ get_class_name(mad_hdr->mgmt_class));
+ printk("Class version..0x%01x\n", mad_hdr->class_version);
+ printk("Method.........0x%01x (%s)\n", mad_hdr->method,
+ get_method_name(mad_hdr->mgmt_class, mad_hdr->method));
+ printk("Status.........0x%02x\n", be16_to_cpu(mad_hdr->status));
+ if (mad_hdr->status)
+ print_status_details(be16_to_cpu(mad_hdr->status));
+ printk("Class specific.0x%02x\n", be16_to_cpu(mad_hdr->class_specific));
+ printk("Trans ID.......0x%llx\n",
+ (unsigned long long)be64_to_cpu(mad_hdr->tid));
+ if (mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_ADM)
+ printk("Attr ID........0x%02x (%s)\n",
+ be16_to_cpu(mad_hdr->attr_id),
+ get_sa_attr(be16_to_cpu(mad_hdr->attr_id)));
+ else
+ printk("Attr ID........0x%02x\n",
+ be16_to_cpu(mad_hdr->attr_id));
+ printk("Attr modifier..0x%04x\n", be32_to_cpu(mad_hdr->attr_mod));
+}
+
+static char * get_rmpp_type(u8 rmpp_type)
+{
+ switch (rmpp_type) {
+ case IB_MGMT_RMPP_TYPE_DATA:
+ return "Data";
+ case IB_MGMT_RMPP_TYPE_ACK:
+ return "Ack";
+ case IB_MGMT_RMPP_TYPE_STOP:
+ return "Stop";
+ case IB_MGMT_RMPP_TYPE_ABORT:
+ return "Abort";
+ default:
+ return "Unknown";
+ }
+}
+
+static char * get_rmpp_flags(u8 rmpp_flags)
+{
+ if (rmpp_flags & IB_MGMT_RMPP_FLAG_ACTIVE)
+ if (rmpp_flags & IB_MGMT_RMPP_FLAG_FIRST)
+ if (rmpp_flags & IB_MGMT_RMPP_FLAG_LAST)
+ return "Active - First & Last";
+ else
+ return "Active - First";
+ else
+ if (rmpp_flags & IB_MGMT_RMPP_FLAG_LAST)
+ return "Active - Last";
+ else
+ return "Active";
+ else
+ return "Inactive";
+}
+
+static void print_rmpp_hdr(struct ib_rmpp_hdr *rmpp_hdr)
+{
+ printk("RMPP version...0x%01x\n", rmpp_hdr->rmpp_version);
+ printk("RMPP type......0x%01x (%s)\n", rmpp_hdr->rmpp_type,
+ get_rmpp_type(rmpp_hdr->rmpp_type));
+ printk("RMPP RRespTime.0x%01x\n", ib_get_rmpp_resptime(rmpp_hdr));
+ printk("RMPP flags.....0x%01x (%s)\n", ib_get_rmpp_flags(rmpp_hdr),
+ get_rmpp_flags(ib_get_rmpp_flags(rmpp_hdr)));
+ printk("RMPP status....0x%01x\n", rmpp_hdr->rmpp_status);
+ printk("Seg number.....0x%04x\n", be32_to_cpu(rmpp_hdr->seg_num));
+ switch (rmpp_hdr->rmpp_type) {
+ case IB_MGMT_RMPP_TYPE_DATA:
+ printk("Payload len....0x%04x\n",
+ be32_to_cpu(rmpp_hdr->paylen_newwin));
+ break;
+ case IB_MGMT_RMPP_TYPE_ACK:
+ printk("New window.....0x%04x\n",
+ be32_to_cpu(rmpp_hdr->paylen_newwin));
+ break;
+ default:
+ printk("Data 2.........0x%04x\n",
+ be32_to_cpu(rmpp_hdr->paylen_newwin));
+ break;
+ }
+}
+
+static char * get_smp_attr(__be16 attr)
+{
+ switch (attr) {
+ case IB_SMP_ATTR_NOTICE:
+ return "notice";
+ case IB_SMP_ATTR_NODE_DESC:
+ return "node description";
+ case IB_SMP_ATTR_NODE_INFO:
+ return "node info";
+ case IB_SMP_ATTR_SWITCH_INFO:
+ return "switch info";
+ case IB_SMP_ATTR_GUID_INFO:
+ return "GUID info";
+ case IB_SMP_ATTR_PORT_INFO:
+ return "port info";
+ case IB_SMP_ATTR_PKEY_TABLE:
+ return "pkey table";
+ case IB_SMP_ATTR_SL_TO_VL_TABLE:
+ return "SL to VL table";
+ case IB_SMP_ATTR_VL_ARB_TABLE:
+ return "VL arbitration table";
+ case IB_SMP_ATTR_LINEAR_FORWARD_TABLE:
+ return "linear forwarding table";
+ case IB_SMP_ATTR_RANDOM_FORWARD_TABLE:
+ return "random forward table";
+ case IB_SMP_ATTR_MCAST_FORWARD_TABLE:
+ return "multicast forward table";
+ case IB_SMP_ATTR_SM_INFO:
+ return "SM info";
+ case IB_SMP_ATTR_VENDOR_DIAG:
+ return "vendor diags";
+ case IB_SMP_ATTR_LED_INFO:
+ return "LED info";
+ default:
+ return "";
+ }
+}
+
+static void print_smp(struct ib_smp *smp)
+{
+ int i;
+
+ printk("MAD version....0x%01x\n", smp->base_version);
+ printk("Class..........0x%01x (%s)\n", smp->mgmt_class,
+ get_class_name(smp->mgmt_class));
+ printk("Class version..0x%01x\n", smp->class_version);
+ printk("Method.........0x%01x (%s)\n", smp->method,
+ get_method_name(smp->mgmt_class, smp->method));
+ printk("Status.........0x%02x\n", be16_to_cpu(smp->status));
+ if (smp->status)
+ print_status_details(be16_to_cpu(smp->status));
+ printk("Hop pointer....0x%01x\n", smp->hop_ptr);
+ printk("Hop counter....0x%01x\n", smp->hop_cnt);
+ printk("Trans ID.......0x%llx\n",
+ (unsigned long long)be64_to_cpu(smp->tid));
+ printk("Attr ID........0x%02x (%s)\n", be16_to_cpu(smp->attr_id),
+ get_smp_attr(smp->attr_id));
+ printk("Attr modifier..0x%04x\n", be32_to_cpu(smp->attr_mod));
+
+ printk("Mkey...........0x%llx\n",
+ (unsigned long long)be64_to_cpu(smp->mkey));
+ printk("DR SLID........0x%02x\n", be16_to_cpu(smp->dr_slid));
+ printk("DR DLID........0x%02x", be16_to_cpu(smp->dr_dlid));
+
+ if (data) {
+ for (i = 0; i < IB_SMP_DATA_SIZE; i++) {
+ if (i % 16 == 0)
+ printk("\nSMP Data.......");
+ printk("%01x ", smp->data[i]);
+ }
+ for (i = 0; i < IB_SMP_MAX_PATH_HOPS; i++) {
+ if (i % 16 == 0)
+ printk("\nInitial path...");
+ printk("%01x ", smp->initial_path[i]);
+ }
+ for (i = 0; i < IB_SMP_MAX_PATH_HOPS; i++) {
+ if (i % 16 == 0)
+ printk("\nReturn path....");
+ printk("%01x ", smp->return_path[i]);
+ }
+ }
+ printk("\n");
+}
+
+static void snoop_smi_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_send_buf *send_buf,
+ struct ib_mad_send_wc *mad_send_wc)
+{
+ struct ib_mad_hdr *hdr = send_buf->mad;
+
+ if (!smp && hdr->mgmt_class != mgmt_class)
+ return;
+ if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
+ return;
+
+ printk("Madeye:sent SMP\n");
+ print_smp(send_buf->mad);
+}
+
+static void recv_smi_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_recv_wc *mad_recv_wc)
+{
+ if (!smp && mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class != mgmt_class)
+ return;
+ if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id)
+ return;
+
+ printk("Madeye:recv SMP\n");
+ print_smp((struct ib_smp *)&mad_recv_wc->recv_buf.mad->mad_hdr);
+}
+
+static int is_rmpp_mad(struct ib_mad_hdr *mad_hdr)
+{
+ if (mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_ADM) {
+ switch (mad_hdr->method) {
+ case IB_SA_METHOD_GET_TABLE:
+ case IB_SA_METHOD_GET_TABLE_RESP:
+ case IB_SA_METHOD_GET_MULTI_RESP:
+ return 1;
+ default:
+ break;
+ }
+ } else if ((mad_hdr->mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) &&
+ (mad_hdr->mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))
+ return 1;
+
+ return 0;
+}
+
+static void snoop_gsi_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_send_buf *send_buf,
+ struct ib_mad_send_wc *mad_send_wc)
+{
+ struct ib_mad_hdr *hdr = send_buf->mad;
+
+ if (!gmp && hdr->mgmt_class != mgmt_class)
+ return;
+ if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
+ return;
+
+ printk("Madeye:sent GMP\n");
+ print_mad_hdr(hdr);
+
+ if (is_rmpp_mad(hdr))
+ print_rmpp_hdr(&((struct ib_rmpp_mad *) hdr)->rmpp_hdr);
+}
+
+static void recv_gsi_handler(struct ib_mad_agent *mad_agent,
+ struct ib_mad_recv_wc *mad_recv_wc)
+{
+ struct ib_mad_hdr *hdr = &mad_recv_wc->recv_buf.mad->mad_hdr;
+ struct ib_rmpp_mad *mad = NULL;
+ struct ib_sa_mad *sa_mad;
+ struct ib_vendor_mad *vendor_mad;
+ u8 *mad_data;
+ int i, j;
+
+ if (!gmp && hdr->mgmt_class != mgmt_class)
+ return;
+ if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id)
+ return;
+
+ printk("Madeye:recv GMP\n");
+ print_mad_hdr(hdr);
+
+ if (is_rmpp_mad(hdr)) {
+ mad = (struct ib_rmpp_mad *) hdr;
+ print_rmpp_hdr(&mad->rmpp_hdr);
+ }
+
+ if (data) {
+ if (hdr->mgmt_class == IB_MGMT_CLASS_SUBN_ADM) {
+ j = IB_MGMT_SA_DATA;
+ /* Display SA header */
+ if (is_rmpp_mad(hdr) &&
+ mad->rmpp_hdr.rmpp_type != IB_MGMT_RMPP_TYPE_DATA)
+ return;
+ sa_mad = (struct ib_sa_mad *)
+ &mad_recv_wc->recv_buf.mad;
+ mad_data = sa_mad->data;
+ } else {
+ if (is_rmpp_mad(hdr)) {
+ j = IB_MGMT_VENDOR_DATA;
+ /* Display OUI */
+ vendor_mad = (struct ib_vendor_mad *)
+ &mad_recv_wc->recv_buf.mad;
+ printk("Vendor OUI......%01x %01x %01x\n",
+ vendor_mad->oui[0],
+ vendor_mad->oui[1],
+ vendor_mad->oui[2]);
+ mad_data = vendor_mad->data;
+ } else {
+ j = IB_MGMT_MAD_DATA;
+ mad_data = mad_recv_wc->recv_buf.mad->data;
+ }
+ }
+ for (i = 0; i < j; i++) {
+ if (i % 16 == 0)
+ printk("\nData...........");
+ printk("%01x ", mad_data[i]);
+ }
+ printk("\n");
+ }
+}
+
+static void madeye_add_one(struct ib_device *device)
+{
+ struct madeye_port *port;
+ int reg_flags;
+ u8 i, s, e;
+
+ if (device->node_type == RDMA_NODE_IB_SWITCH) {
+ s = 0;
+ e = 0;
+ } else {
+ s = 1;
+ e = device->phys_port_cnt;
+ }
+
+ port = kmalloc(sizeof *port * (e - s + 1), GFP_KERNEL);
+ if (!port)
+ goto out;
+
+ reg_flags = IB_MAD_SNOOP_SEND_COMPLETIONS | IB_MAD_SNOOP_RECVS;
+ for (i = 0; i <= e - s; i++) {
+ port[i].smi_agent = ib_register_mad_snoop(device, i + s,
+ IB_QPT_SMI,
+ reg_flags,
+ snoop_smi_handler,
+ recv_smi_handler,
+ &port[i]);
+ port[i].gsi_agent = ib_register_mad_snoop(device, i + s,
+ IB_QPT_GSI,
+ reg_flags,
+ snoop_gsi_handler,
+ recv_gsi_handler,
+ &port[i]);
+ }
+
+out:
+ ib_set_client_data(device, &madeye_client, port);
+}
+
+static void madeye_remove_one(struct ib_device *device)
+{
+ struct madeye_port *port;
+ int i, s, e;
+
+ port = (struct madeye_port *)
+ ib_get_client_data(device, &madeye_client);
+ if (!port)
+ return;
+
+ if (device->node_type == RDMA_NODE_IB_SWITCH) {
+ s = 0;
+ e = 0;
+ } else {
+ s = 1;
+ e = device->phys_port_cnt;
+ }
+
+ for (i = 0; i <= e - s; i++) {
+ if (!IS_ERR(port[i].smi_agent))
+ ib_unregister_mad_agent(port[i].smi_agent);
+ if (!IS_ERR(port[i].gsi_agent))
+ ib_unregister_mad_agent(port[i].gsi_agent);
+ }
+ kfree(port);
+}
+
+static int __init ib_madeye_init(void)
+{
+ return ib_register_client(&madeye_client);
+}
+
+static void __exit ib_madeye_cleanup(void)
+{
+ ib_unregister_client(&madeye_client);
+}
+
+module_init(ib_madeye_init);
+module_exit(ib_madeye_cleanup);
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* RE: [PATCH] IB/core User RMPP patch
From: Hefty, Sean @ 2010-05-27 16:02 UTC (permalink / raw)
To: Mike Heinz, Hal Rosenstock
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
In-Reply-To: <4C2744E8AD2982428C5BFE523DF8CDCB49A488D5AF-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
> There are QLogic customers who have requested the ability to perform RMPP
> transaction handling in user space. This was an option in our old
> proprietary stack and there are a few customers still using it which need a
> way to forward migrate to OFED while containing the scope of their
> application changes. While we have developed appropriate "shim" libraries
> to allow their applications to migrate, we can't simulate/shim rmpp
> processing without some kernel support.
Have you looked at using a QP other than QP1 for this?
I believe that the current kernel code assumes that all non-data RMPP packets are initiated by the kernel and discarded upon completion. I would expect that more work would be needed than this patch to expose non-data RMPP MADs to the user, including their completions, plus require the user to perform the segmentation, reassembly, and transaction matching. (This is just a guess.)
- Sean
^ permalink raw reply
* RE: [PATCH] IB/core User RMPP patch
From: Mike Heinz @ 2010-05-27 16:04 UTC (permalink / raw)
To: Hefty, Sean, Hal Rosenstock
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
In-Reply-To: <CF9C39F99A89134C9CF9C4CCB68B8DDF255F32E2EF-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1666 bytes --]
Actually, we've been using this patch in house for quite a while and it's been working for us. We were just hoping to migrate it into the kernel so that there would be no risk of future incompatibilities arising.
We're currently discussing in-house how to address Hal's request that we do this without breaking the existing functionality.
-----Original Message-----
From: Hefty, Sean [mailto:sean.hefty@intel.com]
Sent: Thursday, May 27, 2010 12:03 PM
To: Mike Heinz; Hal Rosenstock
Cc: linux-rdma@vger.kernel.org; Roland Dreier
Subject: RE: [PATCH] IB/core User RMPP patch
> There are QLogic customers who have requested the ability to perform RMPP
> transaction handling in user space. This was an option in our old
> proprietary stack and there are a few customers still using it which need a
> way to forward migrate to OFED while containing the scope of their
> application changes. While we have developed appropriate "shim" libraries
> to allow their applications to migrate, we can't simulate/shim rmpp
> processing without some kernel support.
Have you looked at using a QP other than QP1 for this?
I believe that the current kernel code assumes that all non-data RMPP packets are initiated by the kernel and discarded upon completion. I would expect that more work would be needed than this patch to expose non-data RMPP MADs to the user, including their completions, plus require the user to perform the segmentation, reassembly, and transaction matching. (This is just a guess.)
- Sean
N§²æìr¸yúèØb²X¬¶Ç§vØ^)Þº{.nÇ+·¥{±Ù{ayº\x1dÊÚë,j\a¢f£¢·h»öì\x17/oSc¾Ú³9uÀ¦æåÈ&jw¨®\x03(éÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þàþf£¢·h§~m
^ permalink raw reply
* Re: linux-next: Tree for May 27 (infiniband: qib)
From: Randy Dunlap @ 2010-05-27 16:05 UTC (permalink / raw)
To: Stephen Rothwell, Ralph Campbell; +Cc: linux-next, LKML, linux-rdma
In-Reply-To: <20100527152628.b23a14c6.sfr@canb.auug.org.au>
On Thu, 27 May 2010 15:26:28 +1000 Stephen Rothwell wrote:
> Hi all,
>
> We are in the merge window again. I remind you all not to add stuff for
> 2.6.36 to your linux-next trees until after 2.6.35-rc1.
>
> Changes since 20100526:
when CONFIG_INFINIBAND_QIB=y and CONFIG_DCA=m:
drivers/built-in.o: In function `qib_update_sdma_dca':
qib_iba7322.c:(.text+0x409219): undefined reference to `dca3_get_tag'
drivers/built-in.o: In function `qib_update_rhdrq_dca':
qib_iba7322.c:(.text+0x40a1f9): undefined reference to `dca3_get_tag'
drivers/built-in.o: In function `qib_setup_7322_cleanup':
qib_iba7322.c:(.text+0x40f91f): undefined reference to `dca_remove_requester'
drivers/built-in.o: In function `qib_init_iba7322_funcs':
(.text+0x419b6f): undefined reference to `dca_add_requester'
However, it looks like qib needs to handle DCA config in a way that
is similar to how it is handled in drivers/net/{myri10ge,igb,ixgbe}/
instead of assuming that DCA is enabled.
And please fix the linux-next 2010-may-25 reported qib problem:
http://lkml.org/lkml/2010/5/25/321
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* RE: [PATCH] IB/core User RMPP patch
From: Hefty, Sean @ 2010-05-27 16:07 UTC (permalink / raw)
To: Mike Heinz, Hal Rosenstock
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
In-Reply-To: <4C2744E8AD2982428C5BFE523DF8CDCB49A488D5DA-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
> Actually, we've been using this patch in house for quite a while and it's
> been working for us. We were just hoping to migrate it into the kernel so
> that there would be no risk of future incompatibilities arising.
Does this report completions for non-data RMPP MADs to the user?
- Sean
^ permalink raw reply
* RE: [PATCH v2] IB/util madeye.c
From: Hefty, Sean @ 2010-05-27 16:31 UTC (permalink / raw)
To: Mike Heinz, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <4C2744E8AD2982428C5BFE523DF8CDCB49A488D5D7-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
> Madeye is a debugging/monitoring tool for infiniband fabrics. When loaded,
> by default it will log copies of all MAD traffic to the system log. In
> addition, it can be configured to log only those MADs which have a
> particular class or a particular attribute id.
While I've found madeye to be very useful myself, it seems preferable for umad to support MAD snooping, so that a user space application could implement more complex filtering, monitoring, and reporting mechanisms. Madeye could then be ported to user space.
- Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v2] IB/util madeye.c
From: Ira Weiny @ 2010-05-27 16:46 UTC (permalink / raw)
To: Hefty, Sean
Cc: Mike Heinz, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
In-Reply-To: <CF9C39F99A89134C9CF9C4CCB68B8DDF255F32E369-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
On Thu, 27 May 2010 09:31:46 -0700
"Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> > Madeye is a debugging/monitoring tool for infiniband fabrics. When loaded,
> > by default it will log copies of all MAD traffic to the system log. In
> > addition, it can be configured to log only those MADs which have a
> > particular class or a particular attribute id.
>
> While I've found madeye to be very useful myself, it seems preferable for
> umad to support MAD snooping, so that a user space application could
> implement more complex filtering, monitoring, and reporting mechanisms.
Ok, I could see this.
> Madeye could then be ported to user space.
Do you mean the controls? not the snooping?
Ira
>
> - Sean
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://*vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] IB/core User RMPP patch
From: Hal Rosenstock @ 2010-05-27 16:57 UTC (permalink / raw)
To: Mike Heinz
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
In-Reply-To: <AANLkTin1hUVSEkbAFMhmhH4Iy--PdMyS1FrVWcZU_ndS-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, May 27, 2010 at 11:12 AM, Hal Rosenstock
<hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Thu, May 27, 2010 at 10:32 AM, Mike Heinz <michael.heinz-h88ZbnxC6KBhl2p70BpVqQ@public.gmane.orgm> wrote:
>> There are QLogic customers who have requested the ability to perform RMPP transaction handling in user space. This was an option in our old proprietary stack and there are a few customers still using it which need a way to forward migrate to OFED while containing the scope of their application changes. While we have developed appropriate "shim" libraries to allow their applications to migrate, we can't simulate/shim rmpp processing without some kernel support.
>>
>> We also have some management applications which also need these capabilities. For those applications, the use of application RMPP control allows the application to perform some pacing of the RMPP transactions, permits some parts of the RMPP response to be built on the fly and also permits a degree of sharing of the response data between multiple requestors.
>>
>> The use of OFED kernel based RMPP transaction handling was unable to meet all these requirements. So this simple option provides a minimal change to OFED while permitting the application to have the control it needs.
>
> The API would need to be extended for this mode (in some backward
> compatible manner) rather than supplanting the rmpp_version 0
> behavior. Changing that behavior breaks backward compatibility/some
> existing apps.
I think the simplest change is to use rmpp_version 255 for this mode
(and update doc/headers accordingly) and preserve existing
rmpp_version behavior.
>
>>
>> -----Original Message-----
>> From: Hal Rosenstock [mailto:hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
>> Sent: Thursday, May 27, 2010 9:07 AM
>> To: Mike Heinz
>> Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; Roland Dreier
>> Subject: Re: [PATCH] IB/core User RMPP patch
>>
>> On Wed, May 26, 2010 at 4:14 PM, Mike Heinz <michael.heinz-h88ZbnxC6KBhl2p70BpVqQ@public.gmane.orgm> wrote:
>>> Currently, if a user application calls umad_register() or umad_register_oui() with an rmpp_version of zero, incoming rmpp messages are discarded.
>>
>> Actually, it's the underlying ib_register_mad_agent call and this drop
>> behavior is intentional.
>>
>>> This patch changes this behavior so that rmpp_version of zero causes incoming rmpp packets to be passed through without alteration, instead.
>>
>> What's the motivation to make such a behavioral change ?
>>
>> -- Hal
>>
>>>
>>> Signed-off-by: Michael Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
>>> ----
>>>
>>> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
>>> index 80282f1..b3457ae 100644
>>> --- a/drivers/infiniband/core/mad.c
>>> +++ b/drivers/infiniband/core/mad.c
>>> @@ -1830,25 +1830,39 @@ static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv,
>>> if (ib_response_mad(mad_recv_wc->recv_buf.mad)) {
>>> spin_lock_irqsave(&mad_agent_priv->lock, flags);
>>> mad_send_wr = ib_find_send_mad(mad_agent_priv, mad_recv_wc);
>>> - if (!mad_send_wr) {
>>> + if (mad_send_wr) {
>>> + ib_mark_mad_done(mad_send_wr);
>>> spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>> - ib_free_recv_mad(mad_recv_wc);
>>> - deref_mad_agent(mad_agent_priv);
>>> - return;
>>> - }
>>> - ib_mark_mad_done(mad_send_wr);
>>> - spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>>
>>> - /* Defined behavior is to complete response before request */
>>> - mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
>>> - mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>>> - mad_recv_wc);
>>> - atomic_dec(&mad_agent_priv->refcount);
>>> + /* Defined behavior is to complete response before request */
>>> + mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
>>> + mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>>> + mad_recv_wc);
>>> + atomic_dec(&mad_agent_priv->refcount);
>>>
>>> - mad_send_wc.status = IB_WC_SUCCESS;
>>> - mad_send_wc.vendor_err = 0;
>>> - mad_send_wc.send_buf = &mad_send_wr->send_buf;
>>> - ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
>>> + mad_send_wc.status = IB_WC_SUCCESS;
>>> + mad_send_wc.vendor_err = 0;
>>> + mad_send_wc.send_buf = &mad_send_wr->send_buf;
>>> + ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
>>> + } else {
>>> + if ( !mad_agent_priv->agent.rmpp_version
>>> + && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class)
>>> + && (ib_get_rmpp_flags(&((struct ib_rmpp_mad *)mad_recv_wc->recv_buf.mad)->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
>>> + // user rmpp is in effect
>>> + spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>> +
>>> + mad_recv_wc->wc->wr_id = 0;
>>> + mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>>> + mad_recv_wc);
>>> + atomic_dec(&mad_agent_priv->refcount);
>>> + } else {
>>> + // not user rmpp, revert to normal behavior and drop the mad
>>> + spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>> + ib_free_recv_mad(mad_recv_wc);
>>> + deref_mad_agent(mad_agent_priv);
>>> + return;
>>> + }
>>> + }
>>> } else {
>>> mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>>> mad_recv_wc);
>>> diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
>>> index 36f815c..f9cacbc 100644
>>> --- a/drivers/infiniband/core/user_mad.c
>>> +++ b/drivers/infiniband/core/user_mad.c
>>> @@ -508,7 +508,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
>>>
>>> rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data;
>>> hdr_len = ib_get_mad_data_offset(rmpp_mad->mad_hdr.mgmt_class);
>>> - if (!ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
>>> + if (!agent->rmpp_version || !ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
>>> copy_offset = IB_MGMT_MAD_HDR;
>>> rmpp_active = 0;
>>> } else {
>>> @@ -560,14 +560,22 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
>>> rmpp_mad->mad_hdr.tid = *tid;
>>> }
>>>
>>> - spin_lock_irq(&file->send_lock);
>>> - ret = is_duplicate(file, packet);
>>> - if (!ret)
>>> + if ( !agent->rmpp_version
>>> + && ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)
>>> + && (ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
>>> + spin_lock_irq(&file->send_lock);
>>> list_add_tail(&packet->list, &file->send_list);
>>> - spin_unlock_irq(&file->send_lock);
>>> - if (ret) {
>>> - ret = -EINVAL;
>>> - goto err_msg;
>>> + spin_unlock_irq(&file->send_lock);
>>> + } else {
>>> + spin_lock_irq(&file->send_lock);
>>> + ret = is_duplicate(file, packet);
>>> + if (!ret)
>>> + list_add_tail(&packet->list, &file->send_list);
>>> + spin_unlock_irq(&file->send_lock);
>>> + if (ret) {
>>> + ret = -EINVAL;
>>> + goto err_msg;
>>> + }
>>> }
>>>
>>> ret = ib_post_send_mad(packet->msg, NULL);
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* RE: [PATCH] IB/core User RMPP patch
From: Mike Heinz @ 2010-05-27 17:25 UTC (permalink / raw)
To: Hal Rosenstock
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier,
Todd Rimmer
In-Reply-To: <AANLkTikRFL183MG_92Qo1hIwSbyVgB8-oS2G8eDxZfgm-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 10219 bytes --]
Hal, I had been considering using version 2, but 255 might make more sense. I'll try to work up a patch and test it out.
-----Original Message-----
From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-owner@vger.kernel.org] On Behalf Of Hal Rosenstock
Sent: Thursday, May 27, 2010 12:58 PM
To: Mike Heinz
Cc: linux-rdma@vger.kernel.org; Roland Dreier
Subject: Re: [PATCH] IB/core User RMPP patch
On Thu, May 27, 2010 at 11:12 AM, Hal Rosenstock
<hal.rosenstock@gmail.com> wrote:
> On Thu, May 27, 2010 at 10:32 AM, Mike Heinz <michael.heinz@qlogic.com> wrote:
>> There are QLogic customers who have requested the ability to perform RMPP transaction handling in user space. Â This was an option in our old proprietary stack and there are a few customers still using it which need a way to forward migrate to OFED while containing the scope of their application changes. Â While we have developed appropriate "shim" libraries to allow their applications to migrate, we can't simulate/shim rmpp processing without some kernel support.
>>
>> We also have some management applications which also need these capabilities. Â For those applications, the use of application RMPP control allows the application to perform some pacing of the RMPP transactions, permits some parts of the RMPP response to be built on the fly and also permits a degree of sharing of the response data between multiple requestors.
>>
>> The use of OFED kernel based RMPP transaction handling was unable to meet all these requirements. Â So this simple option provides a minimal change to OFED while permitting the application to have the control it needs.
>
> The API would need to be extended for this mode (in some backward
> compatible manner) rather than supplanting the rmpp_version 0
> behavior. Changing that behavior breaks backward compatibility/some
> existing apps.
I think the simplest change is to use rmpp_version 255 for this mode
(and update doc/headers accordingly) and preserve existing
rmpp_version behavior.
>
>>
>> -----Original Message-----
>> From: Hal Rosenstock [mailto:hal.rosenstock@gmail.com]
>> Sent: Thursday, May 27, 2010 9:07 AM
>> To: Mike Heinz
>> Cc: linux-rdma@vger.kernel.org; Roland Dreier
>> Subject: Re: [PATCH] IB/core User RMPP patch
>>
>> On Wed, May 26, 2010 at 4:14 PM, Mike Heinz <michael.heinz@qlogic.com> wrote:
>>> Currently, if a user application calls umad_register() or umad_register_oui() with an rmpp_version of zero, incoming rmpp messages are discarded.
>>
>> Actually, it's the underlying ib_register_mad_agent call and this drop
>> behavior is intentional.
>>
>>> This patch changes this behavior so that rmpp_version of zero causes incoming rmpp packets to be passed through without alteration, instead.
>>
>> What's the motivation to make such a behavioral change ?
>>
>> -- Hal
>>
>>>
>>> Signed-off-by: Michael Heinz <michael.heinz@qlogic.com>
>>> ----
>>>
>>> diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
>>> index 80282f1..b3457ae 100644
>>> --- a/drivers/infiniband/core/mad.c
>>> +++ b/drivers/infiniband/core/mad.c
>>> @@ -1830,25 +1830,39 @@ static void ib_mad_complete_recv(struct ib_mad_agent_private *mad_agent_priv,
>>> Â Â Â Â if (ib_response_mad(mad_recv_wc->recv_buf.mad)) {
>>> Â Â Â Â Â Â Â Â spin_lock_irqsave(&mad_agent_priv->lock, flags);
>>> Â Â Â Â Â Â Â Â mad_send_wr = ib_find_send_mad(mad_agent_priv, mad_recv_wc);
>>> - Â Â Â Â Â Â Â if (!mad_send_wr) {
>>> + Â Â Â Â Â Â Â if (mad_send_wr) {
>>> + Â Â Â Â Â Â Â Â Â Â Â ib_mark_mad_done(mad_send_wr);
>>> Â Â Â Â Â Â Â Â Â Â Â Â spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>> - Â Â Â Â Â Â Â Â Â Â Â ib_free_recv_mad(mad_recv_wc);
>>> - Â Â Â Â Â Â Â Â Â Â Â deref_mad_agent(mad_agent_priv);
>>> - Â Â Â Â Â Â Â Â Â Â Â return;
>>> - Â Â Â Â Â Â Â }
>>> - Â Â Â Â Â Â Â ib_mark_mad_done(mad_send_wr);
>>> - Â Â Â Â Â Â Â spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>>
>>> - Â Â Â Â Â Â Â /* Defined behavior is to complete response before request */
>>> - Â Â Â Â Â Â Â mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
>>> - Â Â Â Â Â Â Â mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mad_recv_wc);
>>> - Â Â Â Â Â Â Â atomic_dec(&mad_agent_priv->refcount);
>>> + Â Â Â Â Â Â Â Â Â Â Â /* Defined behavior is to complete response before request */
>>> + Â Â Â Â Â Â Â Â Â Â Â mad_recv_wc->wc->wr_id = (unsigned long) &mad_send_wr->send_buf;
>>> + Â Â Â Â Â Â Â Â Â Â Â mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mad_recv_wc);
>>> + Â Â Â Â Â Â Â Â Â Â Â atomic_dec(&mad_agent_priv->refcount);
>>>
>>> - Â Â Â Â Â Â Â mad_send_wc.status = IB_WC_SUCCESS;
>>> - Â Â Â Â Â Â Â mad_send_wc.vendor_err = 0;
>>> - Â Â Â Â Â Â Â mad_send_wc.send_buf = &mad_send_wr->send_buf;
>>> - Â Â Â Â Â Â Â ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
>>> + Â Â Â Â Â Â Â Â Â Â Â mad_send_wc.status = IB_WC_SUCCESS;
>>> + Â Â Â Â Â Â Â Â Â Â Â mad_send_wc.vendor_err = 0;
>>> + Â Â Â Â Â Â Â Â Â Â Â mad_send_wc.send_buf = &mad_send_wr->send_buf;
>>> + Â Â Â Â Â Â Â Â Â Â Â ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
>>> + Â Â Â Â Â Â Â } else {
>>> + Â Â Â Â Â Â Â Â Â Â Â if ( Â !mad_agent_priv->agent.rmpp_version
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class)
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â && (ib_get_rmpp_flags(&((struct ib_rmpp_mad *)mad_recv_wc->recv_buf.mad)->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // user rmpp is in effect
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>> +
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mad_recv_wc->wc->wr_id = 0;
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mad_recv_wc);
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â atomic_dec(&mad_agent_priv->refcount);
>>> + Â Â Â Â Â Â Â Â Â Â Â } else {
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â // not user rmpp, revert to normal behavior and drop the mad
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â spin_unlock_irqrestore(&mad_agent_priv->lock, flags);
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ib_free_recv_mad(mad_recv_wc);
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â deref_mad_agent(mad_agent_priv);
>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â return;
>>> + Â Â Â Â Â Â Â Â Â Â Â }
>>> + Â Â Â Â Â Â Â }
>>> Â Â Â Â } else {
>>> Â Â Â Â Â Â Â Â mad_agent_priv->agent.recv_handler(&mad_agent_priv->agent,
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â mad_recv_wc);
>>> diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
>>> index 36f815c..f9cacbc 100644
>>> --- a/drivers/infiniband/core/user_mad.c
>>> +++ b/drivers/infiniband/core/user_mad.c
>>> @@ -508,7 +508,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
>>>
>>> Â Â Â Â rmpp_mad = (struct ib_rmpp_mad *) packet->mad.data;
>>> Â Â Â Â hdr_len = ib_get_mad_data_offset(rmpp_mad->mad_hdr.mgmt_class);
>>> - Â Â Â if (!ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
>>> + Â Â Â if (!agent->rmpp_version || !ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)) {
>>> Â Â Â Â Â Â Â Â copy_offset = IB_MGMT_MAD_HDR;
>>> Â Â Â Â Â Â Â Â rmpp_active = 0;
>>> Â Â Â Â } else {
>>> @@ -560,14 +560,22 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
>>> Â Â Â Â Â Â Â Â rmpp_mad->mad_hdr.tid = *tid;
>>> Â Â Â Â }
>>>
>>> - Â Â Â spin_lock_irq(&file->send_lock);
>>> - Â Â Â ret = is_duplicate(file, packet);
>>> - Â Â Â if (!ret)
>>> + Â Â Â if ( Â !agent->rmpp_version
>>> + Â Â Â Â Â && ib_is_mad_class_rmpp(rmpp_mad->mad_hdr.mgmt_class)
>>> + Â Â Â Â Â && (ib_get_rmpp_flags(&rmpp_mad->rmpp_hdr) & IB_MGMT_RMPP_FLAG_ACTIVE)) {
>>> + Â Â Â Â Â Â Â spin_lock_irq(&file->send_lock);
>>> Â Â Â Â Â Â Â Â list_add_tail(&packet->list, &file->send_list);
>>> - Â Â Â spin_unlock_irq(&file->send_lock);
>>> - Â Â Â if (ret) {
>>> - Â Â Â Â Â Â Â ret = -EINVAL;
>>> - Â Â Â Â Â Â Â goto err_msg;
>>> + Â Â Â Â Â Â Â spin_unlock_irq(&file->send_lock);
>>> + Â Â Â } else {
>>> + Â Â Â Â Â Â Â spin_lock_irq(&file->send_lock);
>>> + Â Â Â Â Â Â Â ret = is_duplicate(file, packet);
>>> + Â Â Â Â Â Â Â if (!ret)
>>> + Â Â Â Â Â Â Â Â Â Â Â list_add_tail(&packet->list, &file->send_list);
>>> + Â Â Â Â Â Â Â spin_unlock_irq(&file->send_lock);
>>> + Â Â Â Â Â Â Â if (ret) {
>>> + Â Â Â Â Â Â Â Â Â Â Â ret = -EINVAL;
>>> + Â Â Â Â Â Â Â Â Â Â Â goto err_msg;
>>> + Â Â Â Â Â Â Â }
>>> Â Â Â Â }
>>>
>>> Â Â Â Â ret = ib_post_send_mad(packet->msg, NULL);
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
N§²æìr¸yúèØb²X¬¶Ç§vØ^)Þº{.nÇ+·¥{±Ù{ayº\x1dÊÚë,j\a¢f£¢·h»öì\x17/oSc¾Ú³9uÀ¦æåÈ&jw¨®\x03(éÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þàþf£¢·h§~m
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox