lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231103095549.490744-6-lizhijian@fujitsu.com>
Date:   Fri,  3 Nov 2023 17:55:48 +0800
From:   Li Zhijian <lizhijian@...itsu.com>
To:     zyjzyj2000@...il.com, jgg@...pe.ca, leon@...nel.org,
        linux-rdma@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, rpearsonhpe@...il.com,
        matsuda-daisuke@...itsu.com, bvanassche@....org,
        yi.zhang@...hat.com, Li Zhijian <lizhijian@...itsu.com>
Subject: [PATCH RFC V2 5/6] RDMA/rxe: cleanup rxe_mr.{page_size,page_shift}

This 2 elements were believed to be designed for extracting address
from the page_list before. But now we use PAGE_SIZE and PAGE_SHIFT
directly, so we can drop it.

Signed-off-by: Li Zhijian <lizhijian@...itsu.com>
---
 drivers/infiniband/sw/rxe/rxe_mr.c    | 4 ----
 drivers/infiniband/sw/rxe/rxe_verbs.h | 3 ---
 2 files changed, 7 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
index d39c02f0c51e..a038133e1322 100644
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@ -59,8 +59,6 @@ static void rxe_mr_init(int access, struct rxe_mr *mr)
 
 	mr->access = access;
 	mr->ibmr.page_size = PAGE_SIZE;
-	mr->page_mask = PAGE_MASK;
-	mr->page_shift = PAGE_SHIFT;
 	mr->state = RXE_MR_STATE_INVALID;
 }
 
@@ -230,8 +228,6 @@ int rxe_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sgl,
 	}
 
 	mr->nbuf = 0;
-	mr->page_shift = PAGE_SHIFT;
-	mr->page_mask = PAGE_MASK;
 
 	return ib_sg_to_pages(ibmr, sgl, sg_nents, sg_offset, rxe_set_page);
 }
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h
index ccc75f8c0985..ef813560b0ab 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.h
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.h
@@ -309,9 +309,6 @@ struct rxe_mr {
 	int			access;
 	atomic_t		num_mw;
 
-	unsigned int		page_shift;
-	u64			page_mask;
-
 	u32			num_buf;
 	u32			nbuf;
 
-- 
2.41.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ