diff mbox series

[rdma-next,2/2] RDMA/ipoib: Fix return code check from rdma_set_cq_moderation

Message ID 20180731060237.5045-3-kamalheib1@gmail.com (mailing list archive)
State Accepted
Headers show
Series RDMA: Fix modify_cq return value | expand

Commit Message

Kamal Heib July 31, 2018, 6:02 a.m. UTC
Make sure to check for "-EOPNOTSUPP" instead of "-ENOSYS" which is the
return code from rdma_set_cq_moderation() in case that it not supported.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky July 31, 2018, 1:25 p.m. UTC | #1
On Tue, Jul 31, 2018 at 09:02:37AM +0300, Kamal Heib wrote:
> Make sure to check for "-EOPNOTSUPP" instead of "-ENOSYS" which is the
> return code from rdma_set_cq_moderation() in case that it not supported.
>
> Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

This patch should be squashed into first patch, otherwise you are
breaking git bisect.

Thanks
Kamal Heib July 31, 2018, 9:37 p.m. UTC | #2
On Tue, Jul 31, 2018 at 04:25:08PM +0300, Leon Romanovsky wrote:
> On Tue, Jul 31, 2018 at 09:02:37AM +0300, Kamal Heib wrote:
> > Make sure to check for "-EOPNOTSUPP" instead of "-ENOSYS" which is the
> > return code from rdma_set_cq_moderation() in case that it not supported.
> >
> > Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
> > ---
> >  drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> 
> This patch should be squashed into first patch, otherwise you are
> breaking git bisect.
> 
> Thanks

I don't think so, unless you are seeing this from mlx5_ib point of view
only ...

Thanks,
Kamal

--
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
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
index 2706bf26cbac..83429925dfc6 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
@@ -102,7 +102,7 @@  static int ipoib_set_coalesce(struct net_device *dev,
 	ret = rdma_set_cq_moderation(priv->recv_cq,
 				     coal->rx_max_coalesced_frames,
 				     coal->rx_coalesce_usecs);
-	if (ret && ret != -ENOSYS) {
+	if (ret && ret != -EOPNOTSUPP) {
 		ipoib_warn(priv, "failed modifying CQ (%d)\n", ret);
 		return ret;
 	}