* [PATCH] IB/core: Don't warn on no SA support in event handler
@ 2015-06-10 9:13 Moni Shoua
[not found] ` <1433927612-20517-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Moni Shoua @ 2015-06-10 9:13 UTC (permalink / raw)
To: Sean Hefty, Doug Ledford, Ira Weiny, Michael Wang
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua
Registering an event handler is done for a device. This device may have
one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
Therefore, warning from the event handler about a specific port that
doesn't have SA cap is correct but pollutes the kernel log without a
need.
Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/core/multicast.c | 2 +-
drivers/infiniband/core/sa_query.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c
index 605f20a..1244f02 100644
--- a/drivers/infiniband/core/multicast.c
+++ b/drivers/infiniband/core/multicast.c
@@ -780,7 +780,7 @@ static void mcast_event_handler(struct ib_event_handler *handler,
int index;
dev = container_of(handler, struct mcast_device, event_handler);
- if (WARN_ON(!rdma_cap_ib_mcast(dev->device, event->element.port_num)))
+ if (!rdma_cap_ib_mcast(dev->device, event->element.port_num))
return;
index = event->element.port_num - dev->start_port;
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index 7f7c8c9..3d0b7b2 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -450,7 +450,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event
struct ib_sa_port *port =
&sa_dev->port[event->element.port_num - sa_dev->start_port];
- if (WARN_ON(!rdma_cap_ib_sa(handler->device, port->port_num)))
+ if (!rdma_cap_ib_sa(handler->device, port->port_num))
return;
spin_lock_irqsave(&port->ah_lock, flags);
--
2.1.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 related [flat|nested] 6+ messages in thread
* Re: [PATCH] IB/core: Don't warn on no SA support in event handler
[not found] ` <1433927612-20517-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2015-06-10 10:12 ` Michael Wang
[not found] ` <55780D8C.1070600-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2015-06-11 5:03 ` Doug Ledford
1 sibling, 1 reply; 6+ messages in thread
From: Michael Wang @ 2015-06-10 10:12 UTC (permalink / raw)
To: Moni Shoua, Sean Hefty, Doug Ledford, Ira Weiny
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
Hi, Moni
On 06/10/2015 11:13 AM, Moni Shoua wrote:
> Registering an event handler is done for a device. This device may have
> one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
> Therefore, warning from the event handler about a specific port that
> doesn't have SA cap is correct but pollutes the kernel log without a
> need.
Maybe we should think about register event handler per port :-P
Regards,
Michael Wang
>
> Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> drivers/infiniband/core/multicast.c | 2 +-
> drivers/infiniband/core/sa_query.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c
> index 605f20a..1244f02 100644
> --- a/drivers/infiniband/core/multicast.c
> +++ b/drivers/infiniband/core/multicast.c
> @@ -780,7 +780,7 @@ static void mcast_event_handler(struct ib_event_handler *handler,
> int index;
>
> dev = container_of(handler, struct mcast_device, event_handler);
> - if (WARN_ON(!rdma_cap_ib_mcast(dev->device, event->element.port_num)))
> + if (!rdma_cap_ib_mcast(dev->device, event->element.port_num))
> return;
>
> index = event->element.port_num - dev->start_port;
> diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
> index 7f7c8c9..3d0b7b2 100644
> --- a/drivers/infiniband/core/sa_query.c
> +++ b/drivers/infiniband/core/sa_query.c
> @@ -450,7 +450,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event
> struct ib_sa_port *port =
> &sa_dev->port[event->element.port_num - sa_dev->start_port];
>
> - if (WARN_ON(!rdma_cap_ib_sa(handler->device, port->port_num)))
> + if (!rdma_cap_ib_sa(handler->device, port->port_num))
> return;
>
> spin_lock_irqsave(&port->ah_lock, flags);
>
--
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 [flat|nested] 6+ messages in thread
* RE: [PATCH] IB/core: Don't warn on no SA support in event handler
[not found] ` <55780D8C.1070600-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
@ 2015-06-10 15:28 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A8FE66CA-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Hefty, Sean @ 2015-06-10 15:28 UTC (permalink / raw)
To: Michael Wang, Moni Shoua, Doug Ledford, Weiny, Ira
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
> > Registering an event handler is done for a device. This device may have
> > one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
> > Therefore, warning from the event handler about a specific port that
> > doesn't have SA cap is correct but pollutes the kernel log without a
> > need.
>
> Maybe we should think about register event handler per port :-P
I agree, though I think that can be added separately from this change.
--
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 [flat|nested] 6+ messages in thread
* RE: [PATCH] IB/core: Don't warn on no SA support in event handler
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A8FE66CA-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2015-06-10 16:15 ` Weiny, Ira
[not found] ` <2807E5FD2F6FDA4886F6618EAC48510E11099957-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Weiny, Ira @ 2015-06-10 16:15 UTC (permalink / raw)
To: Hefty, Sean, Michael Wang, Moni Shoua, Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
> > > Registering an event handler is done for a device. This device may
> > > have one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
> > > Therefore, warning from the event handler about a specific port that
> > > doesn't have SA cap is correct but pollutes the kernel log without a
> > > need.
> >
> > Maybe we should think about register event handler per port :-P
>
> I agree, though I think that can be added separately from this change.
Also agreed. We identified many places where we should split support to be per port while we did this work. We need to start working up to that. For the time being we should not break existing users (or in this case annoy them... ;-)
Ira
--
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 [flat|nested] 6+ messages in thread
* Re: [PATCH] IB/core: Don't warn on no SA support in event handler
[not found] ` <1433927612-20517-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-10 10:12 ` Michael Wang
@ 2015-06-11 5:03 ` Doug Ledford
1 sibling, 0 replies; 6+ messages in thread
From: Doug Ledford @ 2015-06-11 5:03 UTC (permalink / raw)
To: Moni Shoua
Cc: Sean Hefty, Ira Weiny, Michael Wang, linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 1947 bytes --]
On Wed, 2015-06-10 at 12:13 +0300, Moni Shoua wrote:
> Registering an event handler is done for a device. This device may have
> one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
> Therefore, warning from the event handler about a specific port that
> doesn't have SA cap is correct but pollutes the kernel log without a
> need.
>
> Signed-off-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Thanks, applied.
> ---
> drivers/infiniband/core/multicast.c | 2 +-
> drivers/infiniband/core/sa_query.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c
> index 605f20a..1244f02 100644
> --- a/drivers/infiniband/core/multicast.c
> +++ b/drivers/infiniband/core/multicast.c
> @@ -780,7 +780,7 @@ static void mcast_event_handler(struct ib_event_handler *handler,
> int index;
>
> dev = container_of(handler, struct mcast_device, event_handler);
> - if (WARN_ON(!rdma_cap_ib_mcast(dev->device, event->element.port_num)))
> + if (!rdma_cap_ib_mcast(dev->device, event->element.port_num))
> return;
>
> index = event->element.port_num - dev->start_port;
> diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
> index 7f7c8c9..3d0b7b2 100644
> --- a/drivers/infiniband/core/sa_query.c
> +++ b/drivers/infiniband/core/sa_query.c
> @@ -450,7 +450,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event
> struct ib_sa_port *port =
> &sa_dev->port[event->element.port_num - sa_dev->start_port];
>
> - if (WARN_ON(!rdma_cap_ib_sa(handler->device, port->port_num)))
> + if (!rdma_cap_ib_sa(handler->device, port->port_num))
> return;
>
> spin_lock_irqsave(&port->ah_lock, flags);
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: 0E572FDD
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] IB/core: Don't warn on no SA support in event handler
[not found] ` <2807E5FD2F6FDA4886F6618EAC48510E11099957-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2015-06-11 7:48 ` Michael Wang
0 siblings, 0 replies; 6+ messages in thread
From: Michael Wang @ 2015-06-11 7:48 UTC (permalink / raw)
To: Weiny, Ira, Hefty, Sean, Moni Shoua, Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 06/10/2015 06:15 PM, Weiny, Ira wrote:
>>>> Registering an event handler is done for a device. This device may
>>>> have one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
>>>> Therefore, warning from the event handler about a specific port that
>>>> doesn't have SA cap is correct but pollutes the kernel log without a
>>>> need.
>>>
>>> Maybe we should think about register event handler per port :-P
>>
>> I agree, though I think that can be added separately from this change.
>
> Also agreed. We identified many places where we should split support to be per port while we did this work. We need to start working up to that. For the time being we should not break existing users (or in this case annoy them... ;-)
IMHO we can do some reform inside ib_dispatch_event(), where we already have
the port number related to the event, if we could have an event_handler_list
per port and classified the callback inside ib_register_event_handler(), then
we can call the handler on the right port meanwhile won't annoy the user ;-)
Regards,
Michael Wang
>
> Ira
>
--
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 [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-11 7:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-10 9:13 [PATCH] IB/core: Don't warn on no SA support in event handler Moni Shoua
[not found] ` <1433927612-20517-1-git-send-email-monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-06-10 10:12 ` Michael Wang
[not found] ` <55780D8C.1070600-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2015-06-10 15:28 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A8FE66CA-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-10 16:15 ` Weiny, Ira
[not found] ` <2807E5FD2F6FDA4886F6618EAC48510E11099957-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-11 7:48 ` Michael Wang
2015-06-11 5:03 ` Doug Ledford
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.