Re: [PATCH] RDMA/siw: Trim size of page array to max size needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bernard,

On 1/19/24 21:05, Bernard Metzler wrote:
siw tries sending all parts of an iWarp wire frame in one socket
send operation. If user data can be send without copy, user data
pages for one wire frame are referenced in an fixed size page array.
The size of this array can be made 2 elements smaller, since it
does not reference iWarp header and trailer crc. Trimming
the page array reduces the affected siw_tx_hdt() functions frame
size, staying below 1024 bytes. This avoids the following
compile-time warning:

  drivers/infiniband/sw/siw/siw_qp_tx.c: In function 'siw_tx_hdt':
  drivers/infiniband/sw/siw/siw_qp_tx.c:677:1: warning: the frame
  size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]

I saw similar warning in my ubuntu 22.04 VM which has below gcc.

root@buk:/home/gjiang/linux-mirror# make M=drivers/infiniband/sw/siw/ -j16 W=1
  CC [M]  drivers/infiniband/sw/siw/siw_qp_tx.o
drivers/infiniband/sw/siw/siw_qp_tx.c: In function ‘siw_tx_hdt’:
drivers/infiniband/sw/siw/siw_qp_tx.c:665:1: warning: the frame size of 1440 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  665 | }
      | ^

# gcc --version
gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0

And it still appears after apply this patch on top of 6.8-rc1.

root@buk:/home/gjiang/linux-mirror# git am ./20240119_bmt_rdma_siw_trim_size_of_page_array_to_max_size_needed.mbx
Applying: RDMA/siw: Trim size of page array to max size needed
root@buk:/home/gjiang/linux-mirror# make M=drivers/infiniband/sw/siw/ -j16 W=1
  CC [M]  drivers/infiniband/sw/siw/siw_qp_tx.o
drivers/infiniband/sw/siw/siw_qp_tx.c: In function ‘siw_tx_hdt’:
drivers/infiniband/sw/siw/siw_qp_tx.c:668:1: warning: the frame size of 1408 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  668 | }
      | ^

However with gcc-13.1, I can't see the warning with or without the patch.

Thanks,
Guoqing




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux