]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sdp: Limit skb frag size to 64K-1
authorAmir Vadai <amirv@mellanox.co.il>
Sun, 26 Oct 2008 09:43:43 +0000 (11:43 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:19 +0000 (05:04 -0700)
commitf239beac805f9d3b5cf66d45b1c656f5ffeafea8
tree37549361102c01eddb8ae48498b9e4a262ecc2cc
parenta99308fe1339817ff0a7c07138dbc80154f45220
sdp: Limit skb frag size to 64K-1

When 64K pages are in use, the skb_frag size can become larger
than the skb_frag can address. An skb_frag's max size is 64K-1.
This patch defines SDP_MAX_PAYLOAD as 64K - SDP_HEADER_SIZE.
The patch changes sdp_post_recv() and sdp_sendmsg() to use the smaller of
PAGE_SIZE or SDP_MAX_PAYLOAD as it segment size.

This fix the bug here:
https://bugs.openfabrics.org/show_bug.cgi?id=1300

Signed-off-by: David Wilder <dwilder@us.ibm.com>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp.h
drivers/infiniband/ulp/sdp/sdp_bcopy.c
drivers/infiniband/ulp/sdp/sdp_main.c