From nobody Sat Feb 04 16:20:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P8Hn61dDHz3nZFp; Sat, 4 Feb 2023 16:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P8Hn60zdmz44FF; Sat, 4 Feb 2023 16:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675527626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kO6VQcLF2Wxev/WsNHbudcQvJ4UM26Kt57b43oSvTFA=; b=EKgBvxDga723FGIZDuDvniNp1Bw2wpsGV6F1fUR5vUtWrmdfAH89NizyYD/4AgYZ48O4WV a4pcIgkCZFLKnQtlANgu984ZGX97N5Qh3rZSuPtYKm8bhGpCtL0Y1uS5KHswaIlX71Cycs ANEycJjZZBbJX1j/WouGhic9xNYrbUinH0OW1guF3akTze0doKkN0YZD6FiRbEmTDhxzAE u//KFV9j0OzpFUS7X2I0TgGbabhYUWJtJtnMhWSvU6xK9+wILcK0krw9tGOchBQZDcfHmp yoQsIo3VuHgnlH4xOovfLmiE0AqVYpS6c7P9WcC15lJmjqSODECsNyijIYbkgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675527626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kO6VQcLF2Wxev/WsNHbudcQvJ4UM26Kt57b43oSvTFA=; b=lSXYIqfawmiQKrqa5YJdo9iiWOUY5MzNL8+6nyPvmgRcFjAQoda8xg4MYk9HjbbZfapYwE 3iOw36VGBUCjm2SCxDXLinbjnXyInn18GDiFuViYqhBKC0EUDbr8SS2QDRZtrrwqgHqRDX KR0+5vCqGPs14RQ/U0sWF5Nx4xGwYybxh8vrTYqekUC/i8wlXf6VY6Ze752k2hYD4/diiM lOwIrHsyzmuqFxEI525HE7/6DPSwPUBAv4OH68CP/QQz2q2Ck4qM5WKGiySo1UTReRecX4 slQlcE5PoN5rrJq5buG7YIScwmLmJ1dCdLeIfuD2qtWuBZUqyXuX+hKlZeu4GQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675527626; a=rsa-sha256; cv=none; b=Rky31I/lArrhhM6/L7rdrHx8dED0G065Nqk8REcqgaMQUQtmYhROyWUlO0jkiI5pe+8nTJ iQK8CWZ1Ne5AZq6SW/gToDBck6Yaw5ujrUNQFk0LQqX7VFCT6dl+QV95UheT79BpfAebu7 s3Z7T9Ya2R2FAkmYoDuGklank/VaZyiw9yEajwbVDg/niSxxUPJ6eY3ln+F1SQJFOTDc1/ oWT0xnq4Be0CmTV1atqHgwKQC2D2jD+9qPJdVlLXFVkzojPJpT76PVJKXCSFaktfhga69h 3+6AJJuGBqrbadNKdV4jLAASFNcJdq0h5iBcOwjv6blyHeS/cRhaSYGwUZ1P5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P8Hn604NbzLBX; Sat, 4 Feb 2023 16:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 314GKPAO013589; Sat, 4 Feb 2023 16:20:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 314GKPlP013588; Sat, 4 Feb 2023 16:20:25 GMT (envelope-from git) Date: Sat, 4 Feb 2023 16:20:25 GMT Message-Id: <202302041620.314GKPlP013588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 21e0b5079610 - main - qlnxr: cleanup secondary effects from EOL purge List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21e0b5079610dcf2c2eb198e064747f2a0e34605 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=21e0b5079610dcf2c2eb198e064747f2a0e34605 commit 21e0b5079610dcf2c2eb198e064747f2a0e34605 Author: Elliott Mitchell AuthorDate: 2022-06-24 23:26:18 +0000 Commit: Warner Losh CommitDate: 2023-02-04 16:13:09 +0000 qlnxr: cleanup secondary effects from EOL purge DEFINE_ALLOC_MR became unconditionally true, but it isn't used anywhere now. Several places depended upon DEFINE_IB_FAST_REG, but that is now always false. Similarly DEFINE_IB_UMEM_WITH_CHUNK became always false/undefined. DEFINE_IB_AH_ATTR_WITH_DMAC is now unconditionally true. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560 --- sys/dev/qlnx/qlnxr/qlnxr_cm.c | 8 ---- sys/dev/qlnx/qlnxr/qlnxr_def.h | 22 ---------- sys/dev/qlnx/qlnxr/qlnxr_verbs.c | 90 ++++++++++++++-------------------------- 3 files changed, 32 insertions(+), 88 deletions(-) diff --git a/sys/dev/qlnx/qlnxr/qlnxr_cm.c b/sys/dev/qlnx/qlnxr/qlnxr_cm.c index 2a36e7412f2d..1f418f83ad37 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_cm.c +++ b/sys/dev/qlnx/qlnxr/qlnxr_cm.c @@ -498,9 +498,6 @@ qlnxr_gsi_build_header(struct qlnxr_dev *dev, int ip_ver = 0; bool has_udp = false; -#if !DEFINE_IB_AH_ATTR_WITH_DMAC - u8 mac[ETH_ALEN]; -#endif int i; send_size = 0; @@ -525,12 +522,7 @@ qlnxr_gsi_build_header(struct qlnxr_dev *dev, } /* ENET + VLAN headers*/ -#if DEFINE_IB_AH_ATTR_WITH_DMAC memcpy(udh->eth.dmac_h, ah_attr->dmac, ETH_ALEN); -#else - qlnxr_get_dmac(dev, ah_attr, mac); - memcpy(udh->eth.dmac_h, mac, ETH_ALEN); -#endif memcpy(udh->eth.smac_h, dev->ha->primary_mac, ETH_ALEN); if (has_vlan) { udh->eth.type = htons(ETH_P_8021Q); diff --git a/sys/dev/qlnx/qlnxr/qlnxr_def.h b/sys/dev/qlnx/qlnxr/qlnxr_def.h index 2d67a881da06..419b7e5fc5ea 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_def.h +++ b/sys/dev/qlnx/qlnxr/qlnxr_def.h @@ -623,15 +623,6 @@ struct mr_info { u32 completed_handled; }; -#define DEFINE_ALLOC_MR - -#ifdef DEFINE_IB_FAST_REG -struct qlnxr_fast_reg_page_list { - struct ib_fast_reg_page_list ibfrpl; - struct qlnxr_dev *dev; - struct mr_info info; -}; -#endif struct qlnxr_qp { struct ib_qp ibqp; /* must be first */ struct qlnxr_dev *dev; @@ -675,9 +666,6 @@ struct qlnxr_qp { bool signaled; dma_addr_t icrc_mapping; u32 *icrc; -#ifdef DEFINE_IB_FAST_REG - struct qlnxr_fast_reg_page_list *frmr; -#endif struct qlnxr_mr *mr; } *wqe_wr_id; @@ -828,14 +816,6 @@ static inline bool qlnxr_qp_has_rq(struct qlnxr_qp *qp) return 1; } -#ifdef DEFINE_IB_FAST_REG -static inline struct qlnxr_fast_reg_page_list *get_qlnxr_frmr_list( - struct ib_fast_reg_page_list *ifrpl) -{ - return container_of(ifrpl, struct qlnxr_fast_reg_page_list, ibfrpl); -} -#endif - #define SET_FIELD2(value, name, flag) \ do { \ (value) |= ((flag) << (name ## _SHIFT)); \ @@ -887,8 +867,6 @@ extern int qlnx_rdma_ll2_set_mac_filter(void *rdma_ctx, uint8_t *old_mac_address #define QLNXR_ROCE_PKEY_TABLE_LEN 1 #define QLNXR_ROCE_PKEY_DEFAULT 0xffff -#define DEFINE_IB_AH_ATTR_WITH_DMAC (1) - #define QLNX_IS_IWARP(rdev) IS_IWARP(ECORE_LEADING_HWFN(rdev->cdev)) #define QLNX_IS_ROCE(rdev) IS_ROCE(ECORE_LEADING_HWFN(rdev->cdev)) diff --git a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c index 1100a81891c2..310ef2dc6e9f 100644 --- a/sys/dev/qlnx/qlnxr/qlnxr_verbs.c +++ b/sys/dev/qlnx/qlnxr/qlnxr_verbs.c @@ -1293,13 +1293,7 @@ qlnxr_populate_pbls(struct qlnxr_dev *dev, struct ib_umem *umem, struct scatterlist *sg; int shift, pg_cnt, pages, pbe_cnt, total_num_pbes = 0; qlnx_host_t *ha; - -#ifdef DEFINE_IB_UMEM_WITH_CHUNK - int i; - struct ib_umem_chunk *chunk = NULL; -#else int entry; -#endif ha = dev->ha; @@ -1333,53 +1327,42 @@ qlnxr_populate_pbls(struct qlnxr_dev *dev, struct ib_umem *umem, shift = ilog2(umem->page_size); -#ifndef DEFINE_IB_UMEM_WITH_CHUNK - for_each_sg(umem->sg_head.sgl, sg, umem->nmap, entry) { -#else - list_for_each_entry(chunk, &umem->chunk_list, list) { - /* get all the dma regions from the chunk. */ - for (i = 0; i < chunk->nmap; i++) { - sg = &chunk->page_list[i]; -#endif - pages = sg_dma_len(sg) >> shift; - for (pg_cnt = 0; pg_cnt < pages; pg_cnt++) { - /* store the page address in pbe */ - pbe->lo = - cpu_to_le32(sg_dma_address(sg) + - (umem->page_size * pg_cnt)); - pbe->hi = - cpu_to_le32(upper_32_bits - ((sg_dma_address(sg) + - umem->page_size * pg_cnt))); + pages = sg_dma_len(sg) >> shift; + for (pg_cnt = 0; pg_cnt < pages; pg_cnt++) { + /* store the page address in pbe */ + pbe->lo = + cpu_to_le32(sg_dma_address(sg) + + (umem->page_size * pg_cnt)); + pbe->hi = + cpu_to_le32(upper_32_bits + ((sg_dma_address(sg) + + umem->page_size * pg_cnt))); - QL_DPRINT12(ha, - "Populate pbl table:" - " pbe->addr=0x%x:0x%x " - " pbe_cnt = %d total_num_pbes=%d" - " pbe=%p\n", pbe->lo, pbe->hi, pbe_cnt, - total_num_pbes, pbe); - - pbe_cnt ++; - total_num_pbes ++; - pbe++; - - if (total_num_pbes == pbl_info->num_pbes) - return; - - /* if the given pbl is full storing the pbes, - * move to next pbl. - */ - if (pbe_cnt == - (pbl_info->pbl_size / sizeof(u64))) { - pbl_tbl++; - pbe = (struct regpair *)pbl_tbl->va; - pbe_cnt = 0; - } + QL_DPRINT12(ha, + "Populate pbl table:" + " pbe->addr=0x%x:0x%x " + " pbe_cnt = %d total_num_pbes=%d" + " pbe=%p\n", pbe->lo, pbe->hi, pbe_cnt, + total_num_pbes, pbe); + + pbe_cnt ++; + total_num_pbes ++; + pbe++; + + if (total_num_pbes == pbl_info->num_pbes) + return; + + /* if the given pbl is full storing the pbes, + * move to next pbl. + */ + if (pbe_cnt == + (pbl_info->pbl_size / sizeof(u64))) { + pbl_tbl++; + pbe = (struct regpair *)pbl_tbl->va; + pbe_cnt = 0; } -#ifdef DEFINE_IB_UMEM_WITH_CHUNK } -#endif } QL_DPRINT12(ha, "exit\n"); return; @@ -2346,9 +2329,6 @@ qlnxr_init_srq_user_params(struct ib_ucontext *ib_ctx, struct qlnxr_create_srq_ureq *ureq, int access, int dmasync) { -#ifdef DEFINE_IB_UMEM_WITH_CHUNK - struct ib_umem_chunk *chunk; -#endif struct scatterlist *sg; int rc; struct qlnxr_dev *dev = srq->dev; @@ -2376,13 +2356,7 @@ qlnxr_init_srq_user_params(struct ib_ucontext *ib_ctx, return PTR_ERR(srq->prod_umem); } -#ifdef DEFINE_IB_UMEM_WITH_CHUNK - chunk = container_of((&srq->prod_umem->chunk_list)->next, - typeof(*chunk), list); - sg = &chunk->page_list[0]; -#else sg = srq->prod_umem->sg_head.sgl; -#endif srq->hw_srq.phy_prod_pair_addr = sg_dma_address(sg); QL_DPRINT12(ha, "exit\n");