From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: bmt@zurich.ibm.com, jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, guoqing.jiang@linux.dev
Subject: [PATCH V2 2/4] RDMA/siw: Reduce memory usage of struct siw_rx_stream
Date: Sun, 3 Dec 2023 17:26:53 +0800 [thread overview]
Message-ID: <20231203092655.28102-3-guoqing.jiang@linux.dev> (raw)
In-Reply-To: <20231203092655.28102-1-guoqing.jiang@linux.dev>
We can reduce the memory of the struct by move some of it's
member.
Before,
/* size: 144, cachelines: 3, members: 17 */
/* sum members: 124, holes: 3, sum holes: 12 */
/* sum bitfield members: 7 bits (0 bytes) */
/* padding: 7 */
/* bit_padding: 1 bits */
After
/* size: 128, cachelines: 2, members: 17 */
/* padding: 3 */
/* bit_padding: 1 bits */
Acked-by: Bernard Metzler <bmt@zurich.ibm.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
drivers/infiniband/sw/siw/siw.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h
index d14bb965af75..2edba2a864bb 100644
--- a/drivers/infiniband/sw/siw/siw.h
+++ b/drivers/infiniband/sw/siw/siw.h
@@ -288,10 +288,11 @@ struct siw_rx_stream {
int skb_offset; /* offset in skb */
int skb_copied; /* processed bytes in skb */
+ enum siw_rx_state state;
+
union iwarp_hdr hdr;
struct mpa_trailer trailer;
-
- enum siw_rx_state state;
+ struct shash_desc *mpa_crc_hd;
/*
* For each FPDU, main RX loop runs through 3 stages:
@@ -313,7 +314,6 @@ struct siw_rx_stream {
u64 ddp_to;
u32 inval_stag; /* Stag to be invalidated */
- struct shash_desc *mpa_crc_hd;
u8 rx_suspend : 1;
u8 pad : 2; /* # of pad bytes expected */
u8 rdmap_op : 4; /* opcode of current frame */
--
2.35.3
next prev parent reply other threads:[~2023-12-03 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-03 9:26 [PATCH V2 0/4] Misc changes for siw Guoqing Jiang
2023-12-03 9:26 ` [PATCH V2 1/4] RDMA/siw: Move tx_cpu ahead Guoqing Jiang
2023-12-03 9:26 ` Guoqing Jiang [this message]
2023-12-03 9:26 ` [PATCH V2 3/4] RDMA/siw: Set qp_state in siw_query_qp Guoqing Jiang
2023-12-04 14:43 ` Bernard Metzler
2023-12-03 9:26 ` [PATCH V2 4/4] RDMA/siw: Call orq_get_current if possible Guoqing Jiang
2023-12-05 0:21 ` [PATCH V2 0/4] Misc changes for siw Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231203092655.28102-3-guoqing.jiang@linux.dev \
--to=guoqing.jiang@linux.dev \
--cc=bmt@zurich.ibm.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.