From patchwork Tue Jul 31 06:02:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10549989 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0074514E0 for ; Tue, 31 Jul 2018 06:03:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3DC229244 for ; Tue, 31 Jul 2018 06:02:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8272293CB; Tue, 31 Jul 2018 06:02:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E64629244 for ; Tue, 31 Jul 2018 06:02:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727212AbeGaHlb (ORCPT ); Tue, 31 Jul 2018 03:41:31 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:39410 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729725AbeGaHlb (ORCPT ); Tue, 31 Jul 2018 03:41:31 -0400 Received: by mail-wr1-f68.google.com with SMTP id h10-v6so15233809wre.6 for ; Mon, 30 Jul 2018 23:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=n3eZvdFUFO4ITf4Wj/X875bxK9mtU9mIQZe0UXVKBwc=; b=Bcr0Lx6nognhBNzLdKW8RTivA1ucNjvhNsCCTcQaWrZcx4ItLB6UFykVCHjyyoCbxx YpFJ+8akqamo5TxxGpQA+zHdi/GKkA59CuFTa8sA9xRm6QWaGY225rgncw09GgJQkLAR nHeU6QkAfAcL6Hy15fMI8Jn1JZuQxCR6kSwOhxB7o5/q5PlGdWed4sizK5crZKyPjrPS qcuwOYEapZXD4CzPVPUGK9//7XRJ6xNLS6l5r5O9g6dpeCVwt/wfoi4QF2M4s/7Qx292 pkQdNwEK4VOuMyJc5VTsmq1L/6PK79PVmOalEebscExwx4XLzupoO8jKe11PdM+GPKl2 oycA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=n3eZvdFUFO4ITf4Wj/X875bxK9mtU9mIQZe0UXVKBwc=; b=T0HQoeacUmMcxAyK/XMPZKjDaPlKZCZYkrWcaZvXz7oBf7TvQ7IfrkejtXJEDaW0vO 1ZUT5CjgnebaytECg/yNKePhJrU3MzG8jeyUx/8k6U2AlFREd3HfFCD6CfK5vOTc5R/I n3kuox58zbvNI4u+rRU8QiF/f+/WoenLCdBWakEPbUSSixkNRXN13dJ86Gb+7144+RNh VBHyb8je4j2iuWNz2PeBx7qTLQ2PbT5mh39eXtJJv+TcspcZnw63GI1eJSyLwFxVJepA Z1AqUPx13Nr6I6LmB72MkNGHLEzeQXNqX9cBnbcCV2Egiox/JiBsk8HnpmM3Ij3JqfeE edtQ== X-Gm-Message-State: AOUpUlF8IycrxKuikNq68iu6rSclGIu9Sj0g3QNT8Rv+9mj6nnZ35V6i Nyf3tHYCnVHnS4rfh36LV2c= X-Google-Smtp-Source: AAOMgpdZcxpbJyVSPBdPZqSTvidDgLEtiDcrepisnY4B715BBShMILgOnWQGNliQ4ea109mhJLhqcA== X-Received: by 2002:a5d:6841:: with SMTP id o1-v6mr19960897wrw.159.1533016974964; Mon, 30 Jul 2018 23:02:54 -0700 (PDT) Received: from localhost.localdomain ([2.53.43.221]) by smtp.gmail.com with ESMTPSA id y102-v6sm1324028wmh.9.2018.07.30.23.02.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 23:02:54 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe , Leon Romanovsky Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next 1/2] RDMA/mlx5: Fix return value from mlx5_ib_modify_cq() Date: Tue, 31 Jul 2018 09:02:36 +0300 Message-Id: <20180731060237.5045-2-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180731060237.5045-1-kamalheib1@gmail.com> References: <20180731060237.5045-1-kamalheib1@gmail.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The proper return code is "-EOPNOTSUPP" when the modify_cq() callback is not supported. Signed-off-by: Kamal Heib Acked-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/cq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/cq.c b/drivers/infiniband/hw/mlx5/cq.c index ad39d64b8108..088205d7f1a1 100644 --- a/drivers/infiniband/hw/mlx5/cq.c +++ b/drivers/infiniband/hw/mlx5/cq.c @@ -1184,7 +1184,7 @@ int mlx5_ib_modify_cq(struct ib_cq *cq, u16 cq_count, u16 cq_period) int err; if (!MLX5_CAP_GEN(dev->mdev, cq_moderation)) - return -ENOSYS; + return -EOPNOTSUPP; if (cq_period > MLX5_MAX_CQ_PERIOD) return -EINVAL; From patchwork Tue Jul 31 06:02:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10549991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 92ED21708 for ; Tue, 31 Jul 2018 06:03:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81DE129244 for ; Tue, 31 Jul 2018 06:03:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 764AE293CB; Tue, 31 Jul 2018 06:03:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B8FA2939B for ; Tue, 31 Jul 2018 06:03:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729674AbeGaHld (ORCPT ); Tue, 31 Jul 2018 03:41:33 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45804 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729725AbeGaHlc (ORCPT ); Tue, 31 Jul 2018 03:41:32 -0400 Received: by mail-wr1-f68.google.com with SMTP id f12-v6so5339564wrv.12 for ; Mon, 30 Jul 2018 23:02:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uQE6c7v+OR2RujcKAjVYZKyGkF1v0KBrF3jg/jlslTA=; b=J5DRW7vNnmxZn2AOnCjv2GKNeydI0mwOTkqh51vziK4nONCDZQI8vR9kQgyLWg6yir IPgxlVg7zjnCx2SdYUhGFe8EdP46kNibXUZcUy2j1jXMmt8Hug7P5POqeb0KYrKCTLMq 1KRjsHKxZ5VqgBTqvN6U584c1wbT0mqR6PyMUz1wrrRdDUAeFQP+5LIqa+4mYrMIcHEd I4CCctWuPd3PkSdl39EVhE41Y1buXxA5FVnPy3WM1x2mt89WLdTrHfJq/LN1a8sDd30A FR5qPGI+v6u2wxScld9xnLY33PThx/mIdVNUcJavISwnK+y6O9WHGRsai0bHyL5oP35O uJ4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uQE6c7v+OR2RujcKAjVYZKyGkF1v0KBrF3jg/jlslTA=; b=McQvUmfyQZWDo+bzBTIAAQ7ClOGF81wx/4gdO4Fo9ptWSq1ahklnDqtDZkDkCHcCVg +Az29ZsZqsv0KbruP25ArzCY/T/rheX/Bl0gFJmQ/KWM4GjOB6Vlzwnxq/Dn171//eUk cSNOjJ0iR/gqljFtBctTmN81V9tTCIwsiUtbe4+10p+knmD4w836Mjw/JyxB/qdYHMPB 3q55eAFFegfpj3qfhQ2VQElfxLuPzhfxuI+WoHFHeT+BVS6+GBM3bBo9cjJ7f9VPyfh7 AY6Vt/vpUd0vpmbLemoTFiX6mNOYA4myUa5+YB6HeiUXoF5RRj2Z2EQuWZOlbRzGiXfh NJNA== X-Gm-Message-State: AOUpUlF9i/9tQH30L+RjxFcbyB16HxRfIIJaopmSIL0b0Q0TCkhQ2qfO Os+XSnDT8W947x2ImFZzd+k= X-Google-Smtp-Source: AAOMgpdy27vt5wzcGquIj6uy5WdaYznoitywft8qgg4naTv266tB6NhMn7Xhwtw2NcEM1FyVXyBCVw== X-Received: by 2002:adf:e14a:: with SMTP id f10-v6mr19117751wri.42.1533016976555; Mon, 30 Jul 2018 23:02:56 -0700 (PDT) Received: from localhost.localdomain ([2.53.43.221]) by smtp.gmail.com with ESMTPSA id y102-v6sm1324028wmh.9.2018.07.30.23.02.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 23:02:56 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe , Leon Romanovsky Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next 2/2] RDMA/ipoib: Fix return code check from rdma_set_cq_moderation Date: Tue, 31 Jul 2018 09:02:37 +0300 Message-Id: <20180731060237.5045-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180731060237.5045-1-kamalheib1@gmail.com> References: <20180731060237.5045-1-kamalheib1@gmail.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }