* 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] ofa_kernel/util madeye.c
From: Hal Rosenstock @ 2010-05-26 14:46 UTC (permalink / raw)
To: Mike Heinz
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Roland Dreier
In-Reply-To: <4C2744E8AD2982428C5BFE523DF8CDCB49A488D454-amwN6d8PyQWXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
On Wed, May 26, 2010 at 8:42 AM, Mike Heinz <michael.heinz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org> wrote:
> I'm resending this - I sent it yesterday, but it doesn't seem to have appeared in the list.
>
> ----------
>
> This is a simple fix. Several of the attribute filters in ./drivers/infiniband/util/madeye.c don't switch the attribute id to host byte order before checking it.
AFAIR there was discussion on this but the work to push madeye
upstream was never done so it is just an EWG patch right now. If there
are no objections (there weren't when the discussion last occurred),
it could also be pushed upstream.
-- Hal
>
> 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
> index 0cda06c..2c650a3 100644
> --- a/drivers/infiniband/util/madeye.c
> +++ b/drivers/infiniband/util/madeye.c
> @@ -401,7 +401,7 @@ static void snoop_smi_handler(struct ib_mad_agent *mad_agent,
>
> if (!smp && hdr->mgmt_class != mgmt_class)
> return;
> - if (attr_id && hdr->attr_id != attr_id)
> + if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
> return;
>
> printk("Madeye:sent SMP\n");
> @@ -413,7 +413,7 @@ static void recv_smi_handler(struct ib_mad_agent *mad_agent, {
> if (!smp && mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class != mgmt_class)
> return;
> - if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id)
> + if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id)
> +!= attr_id)
> return;
>
> printk("Madeye:recv SMP\n");
> @@ -446,7 +446,7 @@ static void snoop_gsi_handler(struct ib_mad_agent *mad_agent,
>
> if (!gmp && hdr->mgmt_class != mgmt_class)
> return;
> - if (attr_id && hdr->attr_id != attr_id)
> + if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
> return;
>
> printk("Madeye:sent GMP\n");
> @@ -468,7 +468,7 @@ static void recv_gsi_handler(struct ib_mad_agent *mad_agent,
>
> if (!gmp && hdr->mgmt_class != mgmt_class)
> return;
> - if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id)
> + if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id)
> +!= attr_id)
> return;
>
> printk("Madeye:recv GMP\n");
>
> --
> 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] ofa_kernel/util madeye.c
From: Mike Heinz @ 2010-05-26 12:42 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; +Cc: Roland Dreier
I'm resending this - I sent it yesterday, but it doesn't seem to have appeared in the list.
----------
This is a simple fix. Several of the attribute filters in ./drivers/infiniband/util/madeye.c don't switch the attribute id to host byte order before checking it.
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
index 0cda06c..2c650a3 100644
--- a/drivers/infiniband/util/madeye.c
+++ b/drivers/infiniband/util/madeye.c
@@ -401,7 +401,7 @@ static void snoop_smi_handler(struct ib_mad_agent *mad_agent,
if (!smp && hdr->mgmt_class != mgmt_class)
return;
- if (attr_id && hdr->attr_id != attr_id)
+ if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
return;
printk("Madeye:sent SMP\n");
@@ -413,7 +413,7 @@ static void recv_smi_handler(struct ib_mad_agent *mad_agent, {
if (!smp && mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class != mgmt_class)
return;
- if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id)
+ if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id)
+!= attr_id)
return;
printk("Madeye:recv SMP\n");
@@ -446,7 +446,7 @@ static void snoop_gsi_handler(struct ib_mad_agent *mad_agent,
if (!gmp && hdr->mgmt_class != mgmt_class)
return;
- if (attr_id && hdr->attr_id != attr_id)
+ if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
return;
printk("Madeye:sent GMP\n");
@@ -468,7 +468,7 @@ static void recv_gsi_handler(struct ib_mad_agent *mad_agent,
if (!gmp && hdr->mgmt_class != mgmt_class)
return;
- if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id)
+ if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id)
+!= attr_id)
return;
printk("Madeye:recv GMP\n");
--
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] mlx4_en: show device's port used
From: Tziporet Koren @ 2010-05-26 11:35 UTC (permalink / raw)
To: Roland Dreier
Cc: Eli Cohen, Eli Cohen,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux RDMA list,
Yevgeny Petrilin
In-Reply-To: <adask5fy8et.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
On 5/26/2010 12:32 AM, Roland Dreier wrote:
> > I don't think there are many devices out there which have more than
> > one port.
>
> ??
>
> http://developer.intel.com/network/connectivity/solutions/gigabit.htm
> http://www.broadcom.com/products/Ethernet-Controllers/Enterprise-Server/BCM5704C
>
> etc
>
>
But they have different PCI function for each port and we have 2 ports
on same PCI device
Tziporet
--
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] net/core: use net_device dev_id to indicate port number
From: Eli Cohen @ 2010-05-26 9:52 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-rdma, rdreier, yevgenyp
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.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
---
drivers/net/mlx4/en_netdev.c | 1 +
include/linux/netdevice.h | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 6c2b15b..612df1e 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);
+ SET_NETDEV_DEV_ID(dev, port - 1);
/*
* Initialize driver private data
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3857517..8d5f2c7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1080,6 +1080,11 @@ static inline void *netdev_priv(const struct net_device *dev)
*/
#define SET_NETDEV_DEVTYPE(net, devtype) ((net)->dev.type = (devtype))
+/*
+ * Set the port number of the physical device that this port net device uses
+ */
+#define SET_NETDEV_DEV_ID(net, devid) ((net)->dev_id = (devid))
+
/**
* netif_napi_add - initialize a napi context
* @dev: network device
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] net/core: Save the port number a netdevice uses
From: Eli Cohen @ 2010-05-26 9:19 UTC (permalink / raw)
To: David Miller
Cc: eli-VPRAkNaXOzVS1MOuV/RT9w, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, rdreier-FYB4Gu1CFyUAvxtiuMwx3w,
yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
In-Reply-To: <20100526.021635.179940939.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Wed, May 26, 2010 at 02:16:35AM -0700, David Miller wrote:
>
> I actually mean that the value "0" should mean the first port,
> the value "1" should mean the second port, etc.
OK, thanks for clarifying. I'll send a new patch soon.
--
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: Save the port number a netdevice uses
From: David Miller @ 2010-05-26 9:16 UTC (permalink / raw)
To: eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb
Cc: eli-VPRAkNaXOzVS1MOuV/RT9w, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, rdreier-FYB4Gu1CFyUAvxtiuMwx3w,
yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
In-Reply-To: <20100526090850.GB28748-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Date: Wed, 26 May 2010 12:08:52 +0300
> So if I understand you correctly, you think that I should not bother
> to set a default value of 1. Each driver that cares about the value
> of this field, will set it however they want.
I actually mean that the value "0" should mean the first port,
the value "1" should mean the second port, etc.
--
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: Save the port number a netdevice uses
From: Eli Cohen @ 2010-05-26 9:08 UTC (permalink / raw)
To: David Miller; +Cc: eli, netdev, linux-rdma, rdreier, yevgenyp
In-Reply-To: <20100526.015526.102555441.davem@davemloft.net>
On Wed, May 26, 2010 at 01:55:26AM -0700, David Miller wrote:
> From: Eli Cohen <eli@dev.mellanox.co.il>
> Date: Wed, 26 May 2010 11:45:23 +0300
>
>
> What's wrong with using the existing dev_id sysfs file name and saying
> that it means the port number of the card?
>
> Nobody, and I really mean nobody, uses this thing any more.
>
> It used to be a way for devices like the qeth driver to get it's
> IPV6 EUI48 value set properly for local IPV6 addresses assigned
> to the device, but that got fixed in a different way.
>
> So we can use this value however we wish now, and it defaults to zero
> for every single device now, and is propagated across VLAN devices,
> which is perfect.
OK. So if I understand you correctly, you think that I should not
bother to set a default value of 1. Each driver that cares about the
value of this field, will set it however they want.
^ permalink raw reply
* Re: [PATCH] net/core: Save the port number a netdevice uses
From: David Miller @ 2010-05-26 8:55 UTC (permalink / raw)
To: eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb
Cc: eli-VPRAkNaXOzVS1MOuV/RT9w, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, rdreier-FYB4Gu1CFyUAvxtiuMwx3w,
yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
In-Reply-To: <20100526084523.GA28748-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Date: Wed, 26 May 2010 11:45:23 +0300
> Do you think we should use dev_id also for the sysfs file name so
> every driver can choose to interpret this field as it chooses to, or
> should I keep the sysfs file name as "port_number"?
What's wrong with using the existing dev_id sysfs file name and saying
that it means the port number of the card?
Nobody, and I really mean nobody, uses this thing any more.
It used to be a way for devices like the qeth driver to get it's
IPV6 EUI48 value set properly for local IPV6 addresses assigned
to the device, but that got fixed in a different way.
So we can use this value however we wish now, and it defaults to zero
for every single device now, and is propagated across VLAN devices,
which is perfect.
--
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: Save the port number a netdevice uses
From: Eli Cohen @ 2010-05-26 8:45 UTC (permalink / raw)
To: David Miller
Cc: eli-VPRAkNaXOzVS1MOuV/RT9w, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, rdreier-FYB4Gu1CFyUAvxtiuMwx3w,
yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
In-Reply-To: <20100526.013926.28807066.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Wed, May 26, 2010 at 01:39:26AM -0700, David Miller wrote:
> From: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
> Date: Wed, 26 May 2010 11:17:02 +0300
>
> > Today, there are no means to know which port of a hardware device a netdev
> > interface uses. This patch adds a new field to struct net_device that is used
> > to store this value. The network driver should use the SET_NETDEV_PORT_NUM()
> > macro to set the port number for the device it manages. For drivers that do not
> > set a value, a default value of 1 is set at alloc_netdev_mq().
> > This patch also makes use of this feature in the mlx4_en driver.
> >
> > Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
>
> We have an existing dev_id, use it.
Do you think we should use dev_id also for the sysfs file name so
every driver can choose to interpret this field as it chooses to, or
should I keep the sysfs file name as "port_number"?
--
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: Save the port number a netdevice uses
From: David Miller @ 2010-05-26 8:39 UTC (permalink / raw)
To: eli; +Cc: netdev, linux-rdma, rdreier, yevgenyp
In-Reply-To: <20100526081702.GA17160@mtldesk030.lab.mtl.com>
From: Eli Cohen <eli@mellanox.co.il>
Date: Wed, 26 May 2010 11:17:02 +0300
> Today, there are no means to know which port of a hardware device a netdev
> interface uses. This patch adds a new field to struct net_device that is used
> to store this value. The network driver should use the SET_NETDEV_PORT_NUM()
> macro to set the port number for the device it manages. For drivers that do not
> set a value, a default value of 1 is set at alloc_netdev_mq().
> This patch also makes use of this feature in the mlx4_en driver.
>
> Signed-off-by: Eli Cohen <eli@mellanox.co.il>
We have an existing dev_id, use it.
^ permalink raw reply
* [PATCH] net/core: Save the port number a netdevice uses
From: Eli Cohen @ 2010-05-26 8:17 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-rdma, rdreier, yevgenyp
Today, there are no means to know which port of a hardware device a netdev
interface uses. This patch adds a new field to struct net_device that is used
to store this value. The network driver should use the SET_NETDEV_PORT_NUM()
macro to set the port number for the device it manages. For drivers that do not
set a value, a default value of 1 is set at alloc_netdev_mq().
This patch also makes use of this feature in the mlx4_en driver.
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
---
drivers/net/mlx4/en_netdev.c | 1 +
include/linux/netdevice.h | 6 ++++++
net/core/dev.c | 1 +
net/core/net-sysfs.c | 2 ++
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 6c2b15b..d3df609 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);
+ SET_NETDEV_PORT_NUM(dev, port);
/*
* Initialize driver private data
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3857517..2a52a6a 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -843,6 +843,7 @@ struct net_device {
unsigned char perm_addr[MAX_ADDR_LEN]; /* permanent hw address */
unsigned char addr_len; /* hardware address length */
unsigned short dev_id; /* for shared network cards */
+ unsigned short port_num; /* for multiport devices */
struct netdev_hw_addr_list uc; /* Secondary unicast
mac addresses */
@@ -1080,6 +1081,11 @@ static inline void *netdev_priv(const struct net_device *dev)
*/
#define SET_NETDEV_DEVTYPE(net, devtype) ((net)->dev.type = (devtype))
+/*
+ * Set the port number of the physical device that this port net device uses
+ */
+#define SET_NETDEV_PORT_NUM(net, portnum) ((net)->port_num = (portnum))
+
/**
* netif_napi_add - initialize a napi context
* @dev: network device
diff --git a/net/core/dev.c b/net/core/dev.c
index 264137f..8e2f5df 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5471,6 +5471,7 @@ struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name,
dev->_tx = tx;
dev->num_tx_queues = queue_count;
dev->real_num_tx_queues = queue_count;
+ dev->port_num = 1;
dev->gso_max_size = GSO_MAX_SIZE;
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 59cfc7d..c3d9b39 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -97,6 +97,7 @@ NETDEVICE_SHOW(ifindex, fmt_dec);
NETDEVICE_SHOW(features, fmt_long_hex);
NETDEVICE_SHOW(type, fmt_dec);
NETDEVICE_SHOW(link_mode, fmt_dec);
+NETDEVICE_SHOW(port_num, fmt_dec);
/* use same locking rules as GIFHWADDR ioctl's */
static ssize_t show_address(struct device *dev, struct device_attribute *attr,
@@ -299,6 +300,7 @@ static struct device_attribute net_class_attributes[] = {
__ATTR(features, S_IRUGO, show_features, NULL),
__ATTR(type, S_IRUGO, show_type, NULL),
__ATTR(link_mode, S_IRUGO, show_link_mode, NULL),
+ __ATTR(port_num, S_IRUGO, show_port_num, NULL),
__ATTR(address, S_IRUGO, show_address, NULL),
__ATTR(broadcast, S_IRUGO, show_broadcast, NULL),
__ATTR(carrier, S_IRUGO, show_carrier, NULL),
--
1.7.1
^ permalink raw reply related
* linux-next: build warning after merge of the final tree
From: Stephen Rothwell @ 2010-05-26 5:15 UTC (permalink / raw)
To: Roland Dreier, linux-rdma-u79uwXL29TY76Z2rM5mHXA
Cc: linux-next-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Linus, Ralph Campbell
[-- Attachment #1: Type: text/plain, Size: 1221 bytes --]
Hi Roland,
After merging the final tree, today's linux-next build (powerpc
allyesconfig) produced this warning:
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
drivers/infiniband/hw/qib/qib_fs.c: In function 'portcntrs_1_read':
drivers/infiniband/hw/qib/qib_fs.c:192: warning: 'counters' is used uninitialized in this function
drivers/infiniband/hw/qib/qib_fs.c: In function 'portnames_read':
drivers/infiniband/hw/qib/qib_fs.c:181: warning: 'names' is used uninitialized in this function
drivers/infiniband/hw/qib/qib_fs.c: In function 'dev_names_read':
drivers/infiniband/hw/qib/qib_fs.c:160: warning: 'names' is used uninitialized in this function
drivers/infiniband/hw/qib/qib_fs.c: In function 'dev_counters_read':
drivers/infiniband/hw/qib/qib_fs.c:149: warning: 'counters' is used uninitialized in this function
Introduced by commit f931551bafe1f10ded7f5282e2aa162c267a2e5d ("IB/qib:
Add new qib driver for QLogic PCIe InfiniBand adapters").
--
Cheers,
Stephen Rothwell sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: [PATCH 10/27] drivers/infiniband/core: Use memdup_user
From: Roland Dreier @ 2010-05-26 4:11 UTC (permalink / raw)
To: Julia Lawall
Cc: Roland Dreier, Sean Hefty, Hal Rosenstock, linux-rdma,
linux-kernel, kernel-janitors
In-Reply-To: <Pine.LNX.4.64.1005221021030.13021@ask.diku.dk>
thanks, applied.
--
Roland Dreier <rolandd@cisco.com> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
^ permalink raw reply
* Re: [PATCH] IB/qib: fix undefined symbol error when CONFIG_PCI_MSI undefined
From: Roland Dreier @ 2010-05-26 4:09 UTC (permalink / raw)
To: Ralph Campbell; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20100525192233.18292.56653.stgit-/vjeY7uYZjrPXfVEPVhPGq6RkeBMCJyt@public.gmane.org>
thanks, applied.
--
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
* Re: [PATCH] mlx4_en: show device's port used
From: Roland Dreier @ 2010-05-25 21:32 UTC (permalink / raw)
To: Eli Cohen
Cc: Eli Cohen, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
netdev-u79uwXL29TY76Z2rM5mHXA, Linux RDMA list,
yevgenyp-VPRAkNaXOzVS1MOuV/RT9w
In-Reply-To: <20100525174214.GA14745-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
> I don't think there are many devices out there which have more than
> one port.
??
http://developer.intel.com/network/connectivity/solutions/gigabit.htm
http://www.broadcom.com/products/Ethernet-Controllers/Enterprise-Server/BCM5704C
etc
> So this will require changing all the drivers to put some value there
> or we would need to use a default value of 1 for drivers that don't
> explicitly set a value.
Yes, just set a default value.
> > and export it to userspace in generic code (so everyone
> > does it the same way).
> Something like ethtool? But we still need an entry under
> /sys/class/net/ethx/, right?
It could be ethtool or a sysfs attr.
- R.
--
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] libibnetdisc: move ibmad_port out of smp_engine
From: Ira Weiny @ 2010-05-25 20:36 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
From: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
Date: Tue, 25 May 2010 13:32:18 -0700
Subject: [PATCH] libibnetdisc: move ibmad_port out of smp_engine
Signed-off-by: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
---
infiniband-diags/libibnetdisc/src/ibnetdisc.c | 15 ++++++++++++++-
infiniband-diags/libibnetdisc/src/internal.h | 2 +-
infiniband-diags/libibnetdisc/src/query_smp.c | 15 ---------------
3 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
index 3c374c7..945e02c 100644
--- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c
+++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
@@ -100,7 +100,7 @@ static int extend_dpath(smp_engine_t * engine, ib_portid_t * portid,
/* If we were LID routed we need to set up the drslid */
if (!scan->selfportid.lid)
if (ib_resolve_self_via(&scan->selfportid, NULL, NULL,
- engine->ibmad_port) < 0) {
+ scan->ibmad_port) < 0) {
IBND_ERROR("Failed to resolve self\n");
return -1;
}
@@ -474,6 +474,8 @@ ibnd_fabric_t *ibnd_discover_fabric(char * ca_name, int ca_port,
ib_portid_t my_portid = { 0 };
smp_engine_t engine;
ibnd_scan_t scan;
+ int nc = 2;
+ int mc[2] = { IB_SMI_CLASS, IB_SMI_DIRECT_CLASS };
if (set_config(&config, cfg)) {
IBND_ERROR("Invalid ibnd_config\n");
@@ -501,6 +503,15 @@ ibnd_fabric_t *ibnd_discover_fabric(char * ca_name, int ca_port,
return (NULL);
}
+ scan.ibmad_port = mad_rpc_open_port(ca_name, ca_port, mc, nc);
+ if (!scan.ibmad_port) {
+ IBND_ERROR("can't open MAD port (%s:%d)\n", ca_name, ca_port);
+ smp_engine_destroy(&engine);
+ return (NULL);
+ }
+ mad_rpc_set_timeout(scan.ibmad_port, cfg->timeout_ms);
+ mad_rpc_set_retries(scan.ibmad_port, cfg->retries);
+
IBND_DEBUG("from %s\n", portid2str(from));
if (!query_node_info(&engine, from, NULL))
@@ -513,9 +524,11 @@ ibnd_fabric_t *ibnd_discover_fabric(char * ca_name, int ca_port,
goto error;
smp_engine_destroy(&engine);
+ mad_rpc_close_port(scan.ibmad_port);
return fabric;
error:
smp_engine_destroy(&engine);
+ mad_rpc_close_port(scan.ibmad_port);
ibnd_destroy_fabric(fabric);
return NULL;
}
diff --git a/infiniband-diags/libibnetdisc/src/internal.h b/infiniband-diags/libibnetdisc/src/internal.h
index d037a60..3c599ec 100644
--- a/infiniband-diags/libibnetdisc/src/internal.h
+++ b/infiniband-diags/libibnetdisc/src/internal.h
@@ -61,6 +61,7 @@ typedef struct ibnd_scan {
ib_portid_t selfportid;
ibnd_fabric_t *fabric;
struct ibnd_config *cfg;
+ struct ibmad_port *ibmad_port;
} ibnd_scan_t;
typedef struct ibnd_smp ibnd_smp_t;
@@ -77,7 +78,6 @@ struct ibnd_smp {
};
struct smp_engine {
- struct ibmad_port *ibmad_port;
int umad_fd;
int smi_agent;
int smi_dir_agent;
diff --git a/infiniband-diags/libibnetdisc/src/query_smp.c b/infiniband-diags/libibnetdisc/src/query_smp.c
index 4dbfa0d..b68e08a 100644
--- a/infiniband-diags/libibnetdisc/src/query_smp.c
+++ b/infiniband-diags/libibnetdisc/src/query_smp.c
@@ -201,29 +201,16 @@ error:
int smp_engine_init(smp_engine_t * engine, char * ca_name, int ca_port,
void *user_data, ibnd_config_t *cfg)
{
- int nc = 2;
- int mc[2] = { IB_SMI_CLASS, IB_SMI_DIRECT_CLASS };
-
memset(engine, 0, sizeof(*engine));
- engine->ibmad_port = mad_rpc_open_port(ca_name, ca_port, mc, nc);
- if (!engine->ibmad_port) {
- IBND_ERROR("can't open MAD port (%s:%d)\n", ca_name, ca_port);
- return -EIO;
- }
- mad_rpc_set_timeout(engine->ibmad_port, cfg->timeout_ms);
- mad_rpc_set_retries(engine->ibmad_port, cfg->retries);
-
if (umad_init() < 0) {
IBND_ERROR("umad_init failed\n");
- mad_rpc_close_port(engine->ibmad_port);
return -EIO;
}
engine->umad_fd = umad_open_port(ca_name, ca_port);
if (engine->umad_fd < 0) {
IBND_ERROR("can't open UMAD port (%s:%d)\n", ca_name, ca_port);
- mad_rpc_close_port(engine->ibmad_port);
return -EIO;
}
@@ -247,7 +234,6 @@ int smp_engine_init(smp_engine_t * engine, char * ca_name, int ca_port,
return (0);
eio_close:
- mad_rpc_close_port(engine->ibmad_port);
umad_close_port(engine->umad_fd);
return (-EIO);
}
@@ -275,7 +261,6 @@ void smp_engine_destroy(smp_engine_t * engine)
}
umad_close_port(engine->umad_fd);
- mad_rpc_close_port(engine->ibmad_port);
}
int process_mads(smp_engine_t * engine)
--
1.5.4.5
--
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] ofa_kernel madeye.c
From: Mike Heinz @ 2010-05-25 19:51 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
This is a simple fix. Several of the snoop filters in ./drivers/infiniband/util/madeye.c don't switch the attribute id to host byte order before checking it.
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
index 0cda06c..2c650a3 100644
--- a/drivers/infiniband/util/madeye.c
+++ b/drivers/infiniband/util/madeye.c
@@ -401,7 +401,7 @@ static void snoop_smi_handler(struct ib_mad_agent *mad_agent,
if (!smp && hdr->mgmt_class != mgmt_class)
return;
- if (attr_id && hdr->attr_id != attr_id)
+ if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
return;
printk("Madeye:sent SMP\n");
@@ -413,7 +413,7 @@ static void recv_smi_handler(struct ib_mad_agent *mad_agent,
{
if (!smp && mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class != mgmt_class)
return;
- if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id)
+ if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id)
return;
printk("Madeye:recv SMP\n");
@@ -446,7 +446,7 @@ static void snoop_gsi_handler(struct ib_mad_agent *mad_agent,
if (!gmp && hdr->mgmt_class != mgmt_class)
return;
- if (attr_id && hdr->attr_id != attr_id)
+ if (attr_id && be16_to_cpu(hdr->attr_id) != attr_id)
return;
printk("Madeye:sent GMP\n");
@@ -468,7 +468,7 @@ static void recv_gsi_handler(struct ib_mad_agent *mad_agent,
if (!gmp && hdr->mgmt_class != mgmt_class)
return;
- if (attr_id && mad_recv_wc->recv_buf.mad->mad_hdr.attr_id != attr_id)
+ if (attr_id && be16_to_cpu(mad_recv_wc->recv_buf.mad->mad_hdr.attr_id) != attr_id)
return;
printk("Madeye:recv GMP\n");
--
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] opensm - cleanup
From: Sasha Khapyorsky @ 2010-05-25 19:44 UTC (permalink / raw)
To: Stan C. Smith; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <59F66ECB77704137A5F122AE78B5D554-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
On 20:58 Mon 24 May , Stan C. Smith wrote:
>
> Cleanup __WIN__ clauses by using predefined macros.
>
> signed-off-by: stan smith <stan.smith-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Applied. Thanks.
Sasha
--
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] opensm/libvendor Reduce stack consumption
From: Sasha Khapyorsky @ 2010-05-25 19:39 UTC (permalink / raw)
To: Stan C. Smith; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <DA353DDF71874573B7C6AFAAF4AA4296-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
On 08:32 Tue 25 May , Stan C. Smith wrote:
>
> Resend, as I realized the mangled email problem; sorry about the extra work.
This patch still be whitespace mangled... :(
Finally fixed this using:
sed -e 's/^\([ +-]\) /\1\t/' -e 's/ /\t/g'
>
> stan.
>
> Reduce stack consumption by using a union of structs instead of individual struct allocations.
> Code borrowed from osm_vendor_ibumad_sa.c
>
> signed-off-by: stan smith <stan.smith-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Applied. Thanks.
Sasha
>
> diff --git a/opensm/libvendor/osm_vendor_mlx_sa.c b/opensm/libvendor/osm_vendor_mlx_sa.c
> index 91f82fa..0cc3f19 100644
> --- a/opensm/libvendor/osm_vendor_mlx_sa.c
> +++ b/opensm/libvendor/osm_vendor_mlx_sa.c
> @@ -576,14 +576,19 @@ ib_api_status_t
> osmv_query_sa(IN osm_bind_handle_t h_bind,
> IN const osmv_query_req_t * const p_query_req)
> {
> - osmv_sa_bind_info_t *p_bind = (osmv_sa_bind_info_t *) h_bind;
> + union {
> + ib_service_record_t svc_rec;
> + ib_node_record_t node_rec;
> + ib_portinfo_record_t port_info;
> + ib_path_rec_t path_rec;
> +#ifdef DUAL_SIDED_RMPP
> + ib_multipath_rec_t multipath_rec;
> +#endif
> + ib_class_port_info_t class_port_info;
> + } u;
> osmv_sa_mad_data_t sa_mad_data;
> + osmv_sa_bind_info_t *p_bind = (osmv_sa_bind_info_t *) h_bind;
> osmv_user_query_t *p_user_query;
> - ib_service_record_t svc_rec;
> - ib_node_record_t node_rec;
> - ib_portinfo_record_t port_info;
> - ib_path_rec_t path_rec;
> - ib_class_port_info_t class_port_info;
> osm_log_t *p_log = p_bind->p_log;
> ib_api_status_t status;
>
> @@ -617,7 +622,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_service_record_t));
> sa_mad_data.comp_mask = 0;
> - sa_mad_data.p_attr = &svc_rec;
> + sa_mad_data.p_attr = &u.svc_rec;
> break;
>
> case OSMV_QUERY_SVC_REC_BY_NAME:
> @@ -628,8 +633,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> sa_mad_data.comp_mask = IB_SR_COMPMASK_SNAME;
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_service_record_t));
> - sa_mad_data.p_attr = &svc_rec;
> - memcpy(svc_rec.service_name, p_query_req->p_query_input,
> + sa_mad_data.p_attr = &u.svc_rec;
> + memcpy(u.svc_rec.service_name, p_query_req->p_query_input,
> sizeof(ib_svc_name_t));
> break;
>
> @@ -640,8 +645,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> sa_mad_data.comp_mask = IB_SR_COMPMASK_SID;
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_service_record_t));
> - sa_mad_data.p_attr = &svc_rec;
> - svc_rec.service_id =
> + sa_mad_data.p_attr = &u.svc_rec;
> + u.svc_rec.service_id =
> *(ib_net64_t *) (p_query_req->p_query_input);
> break;
>
> @@ -653,7 +658,7 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_class_port_info_t));
> sa_mad_data.comp_mask = 0;
> - sa_mad_data.p_attr = &class_port_info;
> + sa_mad_data.p_attr = &u.class_port_info;
>
> break;
>
> @@ -665,8 +670,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_node_record_t));
> sa_mad_data.comp_mask = IB_NR_COMPMASK_NODEGUID;
> - sa_mad_data.p_attr = &node_rec;
> - node_rec.node_info.node_guid =
> + sa_mad_data.p_attr = &u.node_rec;
> + u.node_rec.node_info.node_guid =
> *(ib_net64_t *) (p_query_req->p_query_input);
>
> break;
> @@ -678,8 +683,8 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_portinfo_record_t));
> sa_mad_data.comp_mask = IB_PIR_COMPMASK_LID;
> - sa_mad_data.p_attr = &port_info;
> - port_info.lid = *(ib_net16_t *) (p_query_req->p_query_input);
> + sa_mad_data.p_attr = &u.port_info;
> + u.port_info.lid = *(ib_net16_t *) (p_query_req->p_query_input);
> break;
>
> case OSMV_QUERY_PORT_REC_BY_LID_AND_NUM:
> @@ -729,19 +734,19 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> case OSMV_QUERY_PATH_REC_BY_PORT_GUIDS:
> osm_log(p_log, OSM_LOG_DEBUG,
> "osmv_query_sa DBG:001 %s", "PATH_REC_BY_PORT_GUIDS\n");
> - memset(&path_rec, 0, sizeof(ib_path_rec_t));
> + memset(&u.path_rec, 0, sizeof(ib_path_rec_t));
> sa_mad_data.attr_id = IB_MAD_ATTR_PATH_RECORD;
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_path_rec_t));
> sa_mad_data.comp_mask =
> (IB_PR_COMPMASK_DGID | IB_PR_COMPMASK_SGID | IB_PR_COMPMASK_NUMBPATH);
> - path_rec.num_path = 0x7f;
> - sa_mad_data.p_attr = &path_rec;
> - ib_gid_set_default(&path_rec.dgid,
> + u.path_rec.num_path = 0x7f;
> + sa_mad_data.p_attr = &u.path_rec;
> + ib_gid_set_default(&u.path_rec.dgid,
> ((osmv_guid_pair_t *) (p_query_req->
> p_query_input))->
> dest_guid);
> - ib_gid_set_default(&path_rec.sgid,
> + ib_gid_set_default(&u.path_rec.sgid,
> ((osmv_guid_pair_t *) (p_query_req->
> p_query_input))->
> src_guid);
> @@ -750,18 +755,18 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> case OSMV_QUERY_PATH_REC_BY_GIDS:
> osm_log(p_log, OSM_LOG_DEBUG,
> "osmv_query_sa DBG:001 %s", "PATH_REC_BY_GIDS\n");
> - memset(&path_rec, 0, sizeof(ib_path_rec_t));
> + memset(&u.path_rec, 0, sizeof(ib_path_rec_t));
> sa_mad_data.attr_id = IB_MAD_ATTR_PATH_RECORD;
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_path_rec_t));
> sa_mad_data.comp_mask =
> - (IB_PR_COMPMASK_DGID | IB_PR_COMPMASK_SGID | IB_PR_COMPMASK_NUMBPATH);
> - path_rec.num_path = 0x7f;
> - sa_mad_data.p_attr = &path_rec;
> - memcpy(&path_rec.dgid,
> + (IB_PR_COMPMASK_DGID | IB_PR_COMPMASK_SGID | IB_PR_COMPMASK_NUMBPATH);
> + u.path_rec.num_path = 0x7f;
> + sa_mad_data.p_attr = &u.path_rec;
> + memcpy(&u.path_rec.dgid,
> &((osmv_gid_pair_t *) (p_query_req->p_query_input))->
> dest_gid, sizeof(ib_gid_t));
> - memcpy(&path_rec.sgid,
> + memcpy(&u.path_rec.sgid,
> &((osmv_gid_pair_t *) (p_query_req->p_query_input))->
> src_gid, sizeof(ib_gid_t));
> break;
> @@ -769,18 +774,18 @@ osmv_query_sa(IN osm_bind_handle_t h_bind,
> case OSMV_QUERY_PATH_REC_BY_LIDS:
> osm_log(p_log, OSM_LOG_DEBUG,
> "osmv_query_sa DBG:001 %s", "PATH_REC_BY_LIDS\n");
> - memset(&path_rec, 0, sizeof(ib_path_rec_t));
> + memset(&u.path_rec, 0, sizeof(ib_path_rec_t));
> sa_mad_data.method = IB_MAD_METHOD_GET;
> sa_mad_data.attr_id = IB_MAD_ATTR_PATH_RECORD;
> sa_mad_data.attr_offset =
> ib_get_attr_offset(sizeof(ib_path_rec_t));
> sa_mad_data.comp_mask =
> (IB_PR_COMPMASK_DLID | IB_PR_COMPMASK_SLID);
> - sa_mad_data.p_attr = &path_rec;
> - path_rec.dlid =
> + sa_mad_data.p_attr = &u.path_rec;
> + u.path_rec.dlid =
> ((osmv_lid_pair_t *) (p_query_req->p_query_input))->
> dest_lid;
> - path_rec.slid =
> + u.path_rec.slid =
> ((osmv_lid_pair_t *) (p_query_req->p_query_input))->src_lid;
> break;
>
--
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 undefined symbol error when CONFIG_PCI_MSI undefined
From: Ralph Campbell @ 2010-05-25 19:22 UTC (permalink / raw)
To: Roland Dreier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
This patch fixes a compile error saying qib_init_iba6120_funcs() is
undefined when CONFIG_PCI_MSI is not defined.
Thanks to Randy Dunlap <randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> for finding this and
suggesting the fix.
Signed-off-by: Ralph Campbell <ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/qib/qib_iba6120.c | 12 ------------
drivers/infiniband/hw/qib/qib_init.c | 6 ++++++
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c
index 7b6549f..1eadadc 100644
--- a/drivers/infiniband/hw/qib/qib_iba6120.c
+++ b/drivers/infiniband/hw/qib/qib_iba6120.c
@@ -3475,14 +3475,6 @@ struct qib_devdata *qib_init_iba6120_funcs(struct pci_dev *pdev,
struct qib_devdata *dd;
int ret;
-#ifndef CONFIG_PCI_MSI
- qib_early_err(&pdev->dev, "QLogic PCIE device 0x%x cannot "
- "work if CONFIG_PCI_MSI is not enabled\n",
- ent->device);
- dd = ERR_PTR(-ENODEV);
- goto bail;
-#endif
-
dd = qib_alloc_devdata(pdev, sizeof(struct qib_pportdata) +
sizeof(struct qib_chip_specific));
if (IS_ERR(dd))
@@ -3554,10 +3546,6 @@ struct qib_devdata *qib_init_iba6120_funcs(struct pci_dev *pdev,
if (qib_mini_init)
goto bail;
-#ifndef CONFIG_PCI_MSI
- qib_dev_err(dd, "PCI_MSI not configured, NO interrupts\n");
-#endif
-
if (qib_pcie_params(dd, 8, NULL, NULL))
qib_dev_err(dd, "Failed to setup PCIe or interrupts; "
"continuing anyway\n");
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c
index c0139c0..9b40f34 100644
--- a/drivers/infiniband/hw/qib/qib_init.c
+++ b/drivers/infiniband/hw/qib/qib_init.c
@@ -1237,7 +1237,13 @@ static int __devinit qib_init_one(struct pci_dev *pdev,
*/
switch (ent->device) {
case PCI_DEVICE_ID_QLOGIC_IB_6120:
+#ifdef CONFIG_PCI_MSI
dd = qib_init_iba6120_funcs(pdev, ent);
+#else
+ qib_early_err(&pdev->dev, "QLogic PCIE device 0x%x cannot "
+ "work if CONFIG_PCI_MSI is not enabled\n",
+ ent->device);
+#endif
break;
case PCI_DEVICE_ID_QLOGIC_IB_7220:
--
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-25 18:59 UTC (permalink / raw)
To: Or Gerlitz
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
'Vladimir Sokolovsky'
In-Reply-To: <4BFB7BB1.8070004-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
> Hi Sean, below is a tiny patch which will help direct users to the
> correct mailing list
Thanks - I'll get this applied, so it will be there for the next release.
- 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] opensm - address windows env issues
From: Sasha Khapyorsky @ 2010-05-25 18:58 UTC (permalink / raw)
To: Stan C. Smith; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4A4BD5F425D5495387BA92964E2873C8-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
On 09:03 Tue 25 May , Stan C. Smith wrote:
>
> Add a Windows version of truncate_log_file().
> Use the Windows flavor of vsprintf().
>
> Would you prefer items of this nature as two separate patches?
That is fine so.
> thanks,
>
> stan.
>
> Signed-off-by: stan smith <stan.smith-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Applied. Thanks.
>
> --- a/opensm/osm_log.c 2010-05-22 05:49:24.000000000 -0700
> +++ b/opensm/osm_log.c 2010-05-24 11:40:07.823895800 -0700
Please next time generate patches at top level of management tree,
eg a/opensm/opensm/osm_log.c ... (It took couple of minutes for me to
figure out why it doesn't apply this time :))
Sasha
--
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] infiniband-diags/libibnetdisc/ibnetdisc.c: Fix compile warns on 32 bit archs
From: Sasha Khapyorsky @ 2010-05-25 18:45 UTC (permalink / raw)
To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20100524194508.GC26919-Wuw85uim5zDR7s880joybQ@public.gmane.org>
On 15:45 Mon 24 May , Hal Rosenstock wrote:
>
> src/ibnetdisc.c: In function `query_port_info':
> src/ibnetdisc.c:216: warning: long unsigned int format, different type arg (arg 5)
> src/ibnetdisc.c: In function `recv_node_info':
> src/ibnetdisc.c:311: warning: long unsigned int format, different type arg (arg 5)
> src/ibnetdisc.c:335: warning: long unsigned int format, different type arg (arg 6)
>
> Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Applied with minor fixes (see below). Thanks.
> ---
> infiniband-diags/libibnetdisc/src/ibnetdisc.c | 12 +++++++-----
> 1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc.c b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> index 98801de..157b866 100644
> --- a/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> +++ b/infiniband-diags/libibnetdisc/src/ibnetdisc.c
> @@ -211,8 +211,8 @@ static int recv_port_info(smp_engine_t * engine, ibnd_smp_t * smp,
> static int query_port_info(smp_engine_t * engine, ib_portid_t * portid,
> ibnd_node_t * node, int portnum)
> {
> - IBND_DEBUG("Query Port Info; %s (%lx):%d\n", portid2str(portid),
> - node->guid, portnum);
> + IBND_DEBUG("Query Port Info; %s (0x%" PRIx64 "):%d\n",
> + portid2str(portid), node->guid, portnum);
> return issue_smp(engine, portid, IB_ATTR_PORT_INFO, portnum,
> recv_port_info, node);
> }
> @@ -307,8 +307,9 @@ static int recv_node_info(smp_engine_t * engine, ibnd_smp_t * smp,
> return -1;
> node_is_new = 1;
> }
> - IBND_DEBUG("Found %s node GUID %lx (%s)\n", node_is_new ? "new" : "old",
> - node->guid, portid2str(&smp->path));
> + IBND_DEBUG("Found %s node GUID 0x%" PRIx64 "(%s)\n",
The space is missed after GUID value printing and before '(', so adding
this back.
> + node_is_new ? "new" : "old", node->guid,
> + portid2str(&smp->path));
>
> port = node->ports[port_num];
> if (!port) {
> @@ -331,7 +332,8 @@ static int recv_node_info(smp_engine_t * engine, ibnd_smp_t * smp,
>
> if (!rem_node->ports[rem_port_num]) {
> IBND_ERROR("Internal Error; "
> - "Node(%p) %lx Port %d no port created!?!?!?\n\n",
> + "Node(%p) 0x%" PRIx64
> + "Port %d no port created!?!?!?\n\n",
The space is missed between GUID value and 'Port' word. Adding back.
Sasha
> rem_node, rem_node->guid, rem_port_num);
> return -1;
> }
> --
> 1.5.6.4
>
--
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] opensm/osm_sa_multipath_record.c: livelock in mpr_rcv_get_path_parms
From: Sasha Khapyorsky @ 2010-05-25 18:39 UTC (permalink / raw)
To: Hal Rosenstock; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20100524194353.GB26919-Wuw85uim5zDR7s880joybQ@public.gmane.org>
On 15:43 Mon 24 May , Hal Rosenstock wrote:
>
> Similar to commit 1010c9c5014d5a6af2db33e27ae7156f239e7254 for
> opensm/osm_sa_path_record.c:pr_rcv_get_path_parms
>
> Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Applied. Thanks.
Sasha
--
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
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