Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp149744rdb; Mon, 22 Jan 2024 15:23:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVYwKqKxOS/eOkNrneu4P9bfK0F8mHe6ZaNCwwfI7StMnOjd7u4K+j4SosDxm5qHiyWW/H X-Received: by 2002:a05:6870:84cb:b0:206:95ba:abcb with SMTP id l11-20020a05687084cb00b0020695baabcbmr629142oak.53.1705965803188; Mon, 22 Jan 2024 15:23:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705965803; cv=pass; d=google.com; s=arc-20160816; b=WJ2jj8CDv0nZg3kWM23h7327UYcIst8IuIeuj0vcRf7OXLMxDP2EFiz8Mf/szYejfk 9mefCgU3rO4dFsMlc8yAURhZpIGtQN2MbADPOjWCf8gYLo6OI9LFRTV9QbhIdK1rXdtw 1dSXFPurYjix06kHjESEAeTQ2Q4UFWuVFqV9AsKPp1g0+l153Jlg52Z7WHWhH9D6uBBC syKTcMf6vjo3u+3OK/+RyYURq6TlBLtsanNwYsRcYgaVF34b5E1b6vyR9LCqj4emXj3s pZ9cO/eaur0OQUhdu56OVNPl8lqPf9sbvHDN7CEHbz+Avr+3wAeoUBNSfKafTTuEad8C mPbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=nTh23HnZRdP/6Sx5yekzRTq2MwUPNWD0l+ejJL4d8AQ=; fh=ujksmUrBEjpGhQjWbrjZMx9PDXUXbYR/j4y8MAq1x1o=; b=v5SU2wXuDgC7C4MRjI5rnA1cJZhKVWw7kj6e1J/t1VDsvHqPNBWgDNBjV8ZK2ZqJHc nEQhWOQ286NgAbjpGjP6BbhRYBtL+cJCnm401FXyKofp/62Iz61GaX7GSAHSc8b3uggt PUm97nTsHZboGuhdUOjmU3flFuVz2lSvDtaCu4lPxhOIxleENHOOdDxyrqq+8epGOe1f ctKdMwzTrR4ZqNO6cNrKbX2fd/r/SZBgqrdigl9JFomUWb5ZeID560D37NtdJrnKY/Y2 RqURtCC4h9ZzQuQ1tmi8rDbscwpZ8W8nN/IWbwVgt9DE4p0Rp8dfJTUVSGw8b2ADNAfc rj0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=iAt7YVGP; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-34290-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p8-20020a63e648000000b005cee0fe93aesi8511158pgj.472.2024.01.22.15.23.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 15:23:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34290-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=iAt7YVGP; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-34290-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CB03A28600B for ; Mon, 22 Jan 2024 23:23:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E70D14D120; Mon, 22 Jan 2024 23:23:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="iAt7YVGP" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E16124CDFF; Mon, 22 Jan 2024 23:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705965792; cv=none; b=sRsHdgeYBnVvSBbmVT6WPp9DqKfpNbfX33+5EQp/ppKAyNHLPJ9AZTS+mWt8FERUpiwsj9ngZyoi14XhXfKI1TGjEHoVg3qoJ4MbddJGmhhzu87xlxasINLhnDIy+6FGe3q27NkPVdFevL2UO6JbhbqHRboFq/e7MF6h5txzTPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705965792; c=relaxed/simple; bh=eLJhNzdFZj3RlP7C0RvlpZ87zYE+Z2S+CabRM8UsbZQ=; h=From:To:Cc:Subject:Date:Message-Id; b=r5NvJlRdushJJAujNBmxi1ZuIktXic66Fl8TcSlL8ZLyotOMlvEi7/NVb3NFdGACM0KgSLZ+Ki+I3hFFbkEIds7tylzFrsf9cJ3RGmppD8Ufd6NiQmzudYMe1ZSnKkJtIjwgP0a4oSHkXzFq8CSPWtrMco1ZNxg5+t0C37k74BA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=iAt7YVGP; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 75C2120E2C18; Mon, 22 Jan 2024 15:23:10 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 75C2120E2C18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1705965790; bh=nTh23HnZRdP/6Sx5yekzRTq2MwUPNWD0l+ejJL4d8AQ=; h=From:To:Cc:Subject:Date:From; b=iAt7YVGPAUXBwHjlUekjBctC05U3DbUMvOVJ/UzaRzdQiAEU/111LXnrg/Z5NN25j kqBFK2rOqeLWa3jp3HsH+GI4WoDJ6nSl+dgT/EWFK1uS1q3xxBsfG3nrTGiwwfzMNB w0y4vHsDKpaFATKhWRqqR1lmZwxjF7J/2Tz6kI+Y= From: Konstantin Taranov To: kotaranov@microsoft.com, sharmaajay@microsoft.com, longli@microsoft.com, jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH rdma-next v1 0/3] RDMA/mana_ib: Introduce three helper functions to clean code Date: Mon, 22 Jan 2024 15:22:58 -0800 Message-Id: <1705965781-3235-1-git-send-email-kotaranov@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: From: Konstantin Taranov This patchset aims to remove code repetitions in mana_ib as well as to avoid explicit use of the gdma_dev. The gdma_dev was either ethernet or IB device depending on the usage, which was often easy to confuse and misuse. Introduced functions: 1) mdev_to_gc 2) mana_ib_get_netdev 3) mana_ib_install_cq_cb Konstantin Taranov (3): RDMA/mana_ib: introduce mdev_to_gc helper function RDMA/mana_ib: introduce mana_ib_get_netdev helper function RDMA/mana_ib: introduce mana_ib_install_cq_cb helper function drivers/infiniband/hw/mana/cq.c | 25 +++++++- drivers/infiniband/hw/mana/main.c | 40 +++++-------- drivers/infiniband/hw/mana/mana_ib.h | 20 ++++++- drivers/infiniband/hw/mana/mr.c | 13 +--- drivers/infiniband/hw/mana/qp.c | 88 +++++++++------------------- 5 files changed, 84 insertions(+), 102 deletions(-) base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d -- 2.43.0