RDMA/siw: Reduce memory usage of struct siw_rx_stream
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 */ Link: https://lore.kernel.org/r/20231203092655.28102-3-guoqing.jiang@linux.dev Acked-by: Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
84de14baf8
commit
51ac45a663
@@ -288,10 +288,11 @@ struct siw_rx_stream {
|
|||||||
int skb_offset; /* offset in skb */
|
int skb_offset; /* offset in skb */
|
||||||
int skb_copied; /* processed bytes in skb */
|
int skb_copied; /* processed bytes in skb */
|
||||||
|
|
||||||
|
enum siw_rx_state state;
|
||||||
|
|
||||||
union iwarp_hdr hdr;
|
union iwarp_hdr hdr;
|
||||||
struct mpa_trailer trailer;
|
struct mpa_trailer trailer;
|
||||||
|
struct shash_desc *mpa_crc_hd;
|
||||||
enum siw_rx_state state;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For each FPDU, main RX loop runs through 3 stages:
|
* For each FPDU, main RX loop runs through 3 stages:
|
||||||
@@ -313,7 +314,6 @@ struct siw_rx_stream {
|
|||||||
u64 ddp_to;
|
u64 ddp_to;
|
||||||
u32 inval_stag; /* Stag to be invalidated */
|
u32 inval_stag; /* Stag to be invalidated */
|
||||||
|
|
||||||
struct shash_desc *mpa_crc_hd;
|
|
||||||
u8 rx_suspend : 1;
|
u8 rx_suspend : 1;
|
||||||
u8 pad : 2; /* # of pad bytes expected */
|
u8 pad : 2; /* # of pad bytes expected */
|
||||||
u8 rdmap_op : 4; /* opcode of current frame */
|
u8 rdmap_op : 4; /* opcode of current frame */
|
||||||
|
Reference in New Issue
Block a user