From patchwork Wed Jan 31 23:38:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sindhu Devale X-Patchwork-Id: 13540489 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A58A3CF43 for ; Wed, 31 Jan 2024 23:43:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706744585; cv=none; b=Y9noTjky8cWy57KkCTZC4s23dpCXw/CGG7uJis8ZZBmGb/GGL1tGzNvU2z7+iFW8XeGrsArnLw6FQc2FzfdocK6OF04oPOu8ZcHqWFS6Jg3D3WmB6N7MEwmrejOgrSngLN6OMLf9nR1r2ogcBACg0y67Xw3oV9C366zUoOzEC00= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706744585; c=relaxed/simple; bh=3+KUkc5rCNvg5bEXqAAcAnceiheOCLVdL6vE8ILXUPE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kITdz0AuNtNK9tdo5vP/00Io8ami+39SbXOSu1fd7BeS9cQPU4gB4WWS+dW6kgXM/vOUaa/jvD5wACTPSO6B5OHFzb/LEYEvDncpKUZWJ9RaIqtbn425CHEMmEPL3kqfVWS6MltUUY4Ppj1lLNRF0C4s4t9CdEGNM8yN8zKJwkY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TaBIjnBK; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TaBIjnBK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706744583; x=1738280583; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3+KUkc5rCNvg5bEXqAAcAnceiheOCLVdL6vE8ILXUPE=; b=TaBIjnBKZDneTtmGHhKgvSNpckqvw8I4mf6NvwumAcu8ltpZsfpyZ4BA 4aJ9i7nnQB4JX+u+XneSrA/lnBwnlXaM8Snla6X5LX421r7zSjMg5tgaV jVxp5M6EfpZoSxnXTRp5ZfaY/SB0BPbEz7UySPlRnb+WBdmUf/6XP4YiF sv26gYGZ4phzrK3Du6zQqtluehNh/Y8fH0mn4DagnKgsBFKI7bEY50Rff yVA4E161yC9fQFUNWDgyKY8b1qMnVbiJhjYYPJEt8zkDOcEnnRsRVLv2J 9kdtwWoonQhMa3z42I//7tk+Vq3SViHiPgbS6zxUg14OifQJTrVL2B0M6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="22260032" X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="22260032" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 15:43:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="4338980" Received: from unknown (HELO SD8036..) ([10.232.218.36]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 15:43:02 -0800 From: Sindhu Devale To: jgg@nvidia.com, leon@kernel.org Cc: linux-rdma@vger.kernel.org, sindhu.devale@intel.com, Mike Marciniszyn Subject: [PATCH rdma-rc 1/4] RDMA/irdma: Fix KASAN issue with tasklet Date: Wed, 31 Jan 2024 17:38:46 -0600 Message-ID: <20240131233849.400285-2-sindhu.devale@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240131233849.400285-1-sindhu.devale@intel.com> References: <20240131233849.400285-1-sindhu.devale@intel.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mike Marciniszyn KASAN testing revealed the following issue assocated with freeing an IRQ. [50006.466686] Call Trace: [50006.466691] [50006.489538] dump_stack+0x5c/0x80 [50006.493475] print_address_description.constprop.6+0x1a/0x150 [50006.499872] ? irdma_sc_process_ceq+0x483/0x790 [irdma] [50006.505742] ? irdma_sc_process_ceq+0x483/0x790 [irdma] [50006.511644] kasan_report.cold.11+0x7f/0x118 [50006.516572] ? irdma_sc_process_ceq+0x483/0x790 [irdma] [50006.522473] irdma_sc_process_ceq+0x483/0x790 [irdma] [50006.528232] irdma_process_ceq+0xb2/0x400 [irdma] [50006.533601] ? irdma_hw_flush_wqes_callback+0x370/0x370 [irdma] [50006.540298] irdma_ceq_dpc+0x44/0x100 [irdma] [50006.545306] tasklet_action_common.isra.14+0x148/0x2c0 [50006.551096] __do_softirq+0x1d0/0xaf8 [50006.555396] irq_exit_rcu+0x219/0x260 [50006.559670] irq_exit+0xa/0x20 [50006.563320] smp_apic_timer_interrupt+0x1bf/0x690 [50006.568645] apic_timer_interrupt+0xf/0x20 [50006.573341] The issue is that a tasklet could be pending on another core racing the delete of the irq. Fix by insuring any scheduled tasklet is killed after deleting the irq. Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions") Signed-off-by: Mike Marciniszyn Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale --- drivers/infiniband/hw/irdma/hw.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c index bd4b2b896444..2f8d18d8be3b 100644 --- a/drivers/infiniband/hw/irdma/hw.c +++ b/drivers/infiniband/hw/irdma/hw.c @@ -570,6 +570,13 @@ static void irdma_destroy_irq(struct irdma_pci_f *rf, dev->irq_ops->irdma_dis_irq(dev, msix_vec->idx); irq_update_affinity_hint(msix_vec->irq, NULL); free_irq(msix_vec->irq, dev_id); + if (rf == dev_id) { + tasklet_kill(&rf->dpc_tasklet); + } else { + struct irdma_ceq *iwceq = (struct irdma_ceq *)dev_id; + + tasklet_kill(&iwceq->dpc_tasklet); + } } /** From patchwork Wed Jan 31 23:38:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sindhu Devale X-Patchwork-Id: 13540490 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2392D39FE9 for ; Wed, 31 Jan 2024 23:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706744585; cv=none; b=G07SFc8cFqSNDYHsVNY2kJFwHcLVRVrErltwUQxsay86ynjfu8flJyHoASlVVPZi4NX/ETj18zyc/5zydULoMmixVuGsuF0c0zLyOFCFYzuuFGKKwCEuVgBpg7mEmzYCN6+sAwiHIjY7eUgMIaUVs818aFTyeB6Qj4wlrtumns4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706744585; c=relaxed/simple; bh=Oj5aizfZnYsxSt+rBl1W51krahFL3hMOPoariyTjknU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C2fII8Nl2S1EqRPo4dQ1XIK3E/dTv69DxaPGbHcgydqQC8LamZzqpKDkmBaVxnksiAH20ZOGRZZiD0ulN56Nw7K6kcqvfNsfB7/+/gRuHP06v7oYnyxaBODzzL3UKlhTC1V75M1M+z6x5VpfQM/mxzLSbsdaWXp01vulD5vwaeU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jbeckFxL; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jbeckFxL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706744584; x=1738280584; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Oj5aizfZnYsxSt+rBl1W51krahFL3hMOPoariyTjknU=; b=jbeckFxLkZZOc7xAJ0m4ICdWqCmrei6zLmDNhB0BLHT/Y8NaQd4Wx0wz eoqgYXHNL5iTHDa9SdqHC7//qm4Gc6GRok+z/RrzpNsbYYjLmaeuYIFCb E9kTTM3S1NUdJyiq4WSIJmyNOwUenDcJxIhV6zSikyFxiE1bIaFHBegk1 gRawGTF6S4FXspTDC75nclgEIz50ouRzDz3FbGWRy7NJphUWAmX3l9qj2 Sjjc/+5YqoyAlCLmm2G0xoRtguXFswkmBDu8gZzXTCEEKq/P14HX3VKIa W5/MnIwFeK9bszEdrCPW4OOmJDNFmUVvi3tnLc+D+tzZkxQU0PIngecRT g==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="22260035" X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="22260035" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 15:43:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="4338985" Received: from unknown (HELO SD8036..) ([10.232.218.36]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 15:43:03 -0800 From: Sindhu Devale To: jgg@nvidia.com, leon@kernel.org Cc: linux-rdma@vger.kernel.org, sindhu.devale@intel.com, Shiraz Saleem Subject: [PATCH rdma-rc 2/4] RDMA/irdma: Validate max_send_wr and max_recv_wr Date: Wed, 31 Jan 2024 17:38:47 -0600 Message-ID: <20240131233849.400285-3-sindhu.devale@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240131233849.400285-1-sindhu.devale@intel.com> References: <20240131233849.400285-1-sindhu.devale@intel.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Shiraz Saleem Validate that max_send_wr and max_recv_wr is within the supported range. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Change-Id: I2fc8b10292b641fddd20b36986a9dae90a93f4be Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale --- drivers/infiniband/hw/irdma/verbs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index b5eb8d421988..cb828e3da478 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -839,7 +839,9 @@ static int irdma_validate_qp_attrs(struct ib_qp_init_attr *init_attr, if (init_attr->cap.max_inline_data > uk_attrs->max_hw_inline || init_attr->cap.max_send_sge > uk_attrs->max_hw_wq_frags || - init_attr->cap.max_recv_sge > uk_attrs->max_hw_wq_frags) + init_attr->cap.max_recv_sge > uk_attrs->max_hw_wq_frags || + init_attr->cap.max_send_wr > uk_attrs->max_hw_wq_quanta || + init_attr->cap.max_recv_wr > uk_attrs->max_hw_rq_quanta) return -EINVAL; if (rdma_protocol_roce(&iwdev->ibdev, 1)) { From patchwork Wed Jan 31 23:38:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sindhu Devale X-Patchwork-Id: 13540491 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE3BB3A8CB for ; Wed, 31 Jan 2024 23:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706744586; cv=none; b=rovFbmsV7Y4ZyQqESzE007ylocwaxwVYb7unbf8GWThUh+qzTLrubVh1vUbp0FfwG9Tvgt4cPM69xdVxcohKWl7XXQTuYkjaXHV+J994DYRCXoH84Mt7o0lKKdGx7XuzLxjvcZFATSBo2CzabRzU/oaYvDX3kiMh7AUjyGZlmOs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706744586; c=relaxed/simple; bh=5ronuqEq7LM+9fodu/40dH5JPKYbWIaePM1e0d5T+HM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DwMYMi5zPbSBtKX6CC1Hk6a+PnpLLvpVXVMtRbLnu68eWrAryEt7Un4ff10GGteYXT+C8sZho6IBQmFwKuqAZGs8bJQd08AJfPKm2z0XQ22dZ2EmPFfR11eat76W/A8xG7Kg35WnEQqpQASmqqg0b0Ftg+91oN9bEM7/qRNjjW4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=AH8VR3tW; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AH8VR3tW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706744585; x=1738280585; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5ronuqEq7LM+9fodu/40dH5JPKYbWIaePM1e0d5T+HM=; b=AH8VR3tWWsFx5FuukCQhUYpBoeoixTZ1LfSvU54t8rhKoI6PHinrLpCW ZvvzgAqdarC24slDlt/CbV2ALe7+GbX2RfZISRkShExB3Rj9K+jcxaxDn JTW5kd+MYA9/yNrulQIzuD18bQYr7iquw4OIcDrOASRyd2c4kOyrGpheZ fs5TtHqnLDDxqVKrzvWAMXbU119cCxGDGuRjoSyhVM8UTvLLUerBKmqLT +46UHOh1B1xx5WfVLbSPVUfzmWoe0eOTw3eoSIZVnTbZEBf+ILlTWvY/8 P+Chn2xHcoeVTyBbV6Nzpi7Vx6IZwHScB69XT+kGZx+GSPsO+624VtPrS g==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="22260039" X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="22260039" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 15:43:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="4338991" Received: from unknown (HELO SD8036..) ([10.232.218.36]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 15:43:03 -0800 From: Sindhu Devale To: jgg@nvidia.com, leon@kernel.org Cc: linux-rdma@vger.kernel.org, sindhu.devale@intel.com, Mustafa Ismail Subject: [PATCH rdma-rc 3/4] RDMA/irdma: Set the CQ read threshold for GEN 1 Date: Wed, 31 Jan 2024 17:38:48 -0600 Message-ID: <20240131233849.400285-4-sindhu.devale@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240131233849.400285-1-sindhu.devale@intel.com> References: <20240131233849.400285-1-sindhu.devale@intel.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mustafa Ismail The CQ shadow read threshold is currently not set for GEN 2. This could cause an invalid CQ overflow condition, so remove the GEN check that exclused GEN 1. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale --- drivers/infiniband/hw/irdma/verbs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index cb828e3da478..0b046c061742 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -2186,9 +2186,8 @@ static int irdma_create_cq(struct ib_cq *ibcq, info.cq_base_pa = iwcq->kmem.pa; } - if (dev->hw_attrs.uk_attrs.hw_rev >= IRDMA_GEN_2) - info.shadow_read_threshold = min(info.cq_uk_init_info.cq_size / 2, - (u32)IRDMA_MAX_CQ_READ_THRESH); + info.shadow_read_threshold = min(info.cq_uk_init_info.cq_size / 2, + (u32)IRDMA_MAX_CQ_READ_THRESH); if (irdma_sc_cq_init(cq, &info)) { ibdev_dbg(&iwdev->ibdev, "VERBS: init cq fail\n"); From patchwork Wed Jan 31 23:38:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sindhu Devale X-Patchwork-Id: 13540492 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F08E3A8ED for ; Wed, 31 Jan 2024 23:43:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706744586; cv=none; b=QbRuhb879mpP0DyYzAMMjlVZ84+oRPEBGH7xVhUh6ZuzqyniW8WYfx6wbxkkKGFGjyImBkl2mvSX/MObhtPNAXJv37mdgLqK9/NdCF0gZKmeQmjV42yw6gWtb3fQOFdDDldjvVu738JfUx4V3K7rzypFIss8uh9d1f0szh7zaNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706744586; c=relaxed/simple; bh=mZTdSU/kYCqtNHLHgL4sibxzjJWig1ln3S0QICmtKN0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XflEXz5Qlfoics5fKiaCL1zxbhQkcjg/wXOKeQs1d5UkblSkZ68nB/hPEQzw9S8bKEFEYswazOYITG193Zuc8WigA7ciV30imt508fOO9MWr2KW/HVPY17h1/FUfCGYW2c1ao5el/OxxInS8P9FTTuPaXdqo2QyiS/k77Bb2sAs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IlUTuOPb; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IlUTuOPb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706744585; x=1738280585; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mZTdSU/kYCqtNHLHgL4sibxzjJWig1ln3S0QICmtKN0=; b=IlUTuOPb+tDuf1FuUuxEqfnmEMxWJNRH0XMCYso7fD10xb6cOqYyqBQs whIQhSeQxHCccsGOU39ISbEMbZjWvfeTXPHWwMnrSW8udX1Qz0opQeFrY nfxMfrUKNLe/dcUYYnMTedN0/ZUirsZNzbW3moUGk8XNJa6RRvFgtmmqe gesvd87E3PA4nZoLFj3xByNWMZtEKDjGec25HDSzHy52ZUJI9S+tz//uu AOpxk+hqqvBg2Yfzciik0dsnLcPLLBxAq5AkEMPlZ04q4wF9v3nyI/BT1 9q21saqPKALsgo3c2+bU7QCgwY2K+TSBs2S9iyyN8zikfewLW0Hh7ioj4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="22260042" X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="22260042" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 15:43:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="4338994" Received: from unknown (HELO SD8036..) ([10.232.218.36]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 15:43:04 -0800 From: Sindhu Devale To: jgg@nvidia.com, leon@kernel.org Cc: linux-rdma@vger.kernel.org, sindhu.devale@intel.com, Mustafa Ismail Subject: [PATCH rdma-rc 4/4] RDMA/irdma: Add AE for too many RNRS Date: Wed, 31 Jan 2024 17:38:49 -0600 Message-ID: <20240131233849.400285-5-sindhu.devale@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240131233849.400285-1-sindhu.devale@intel.com> References: <20240131233849.400285-1-sindhu.devale@intel.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Mustafa Ismail Add IRDMA_AE_LLP_TOO_MANY_RNRS to the list of AE's processed as an abnormal asyncronous event. Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale --- drivers/infiniband/hw/irdma/defs.h | 1 + drivers/infiniband/hw/irdma/hw.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/infiniband/hw/irdma/defs.h b/drivers/infiniband/hw/irdma/defs.h index 8fb752f2eda2..2cb4b96db721 100644 --- a/drivers/infiniband/hw/irdma/defs.h +++ b/drivers/infiniband/hw/irdma/defs.h @@ -346,6 +346,7 @@ enum irdma_cqp_op_type { #define IRDMA_AE_LLP_TOO_MANY_KEEPALIVE_RETRIES 0x050b #define IRDMA_AE_LLP_DOUBT_REACHABILITY 0x050c #define IRDMA_AE_LLP_CONNECTION_ESTABLISHED 0x050e +#define IRDMA_AE_LLP_TOO_MANY_RNRS 0x050f #define IRDMA_AE_RESOURCE_EXHAUSTION 0x0520 #define IRDMA_AE_RESET_SENT 0x0601 #define IRDMA_AE_TERMINATE_SENT 0x0602 diff --git a/drivers/infiniband/hw/irdma/hw.c b/drivers/infiniband/hw/irdma/hw.c index 2f8d18d8be3b..ad50b77282f8 100644 --- a/drivers/infiniband/hw/irdma/hw.c +++ b/drivers/infiniband/hw/irdma/hw.c @@ -387,6 +387,7 @@ static void irdma_process_aeq(struct irdma_pci_f *rf) case IRDMA_AE_LLP_TOO_MANY_RETRIES: case IRDMA_AE_LCE_QP_CATASTROPHIC: case IRDMA_AE_LCE_FUNCTION_CATASTROPHIC: + case IRDMA_AE_LLP_TOO_MANY_RNRS: case IRDMA_AE_LCE_CQ_CATASTROPHIC: case IRDMA_AE_UDA_XMIT_DGRAM_TOO_LONG: default: