mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 15:20:41 +00:00
selftests: net: tcp_mmap: fix SO_RCVLOWAT setting
Since chunk_size is no longer an integer, we can not
use it directly as an argument of setsockopt().
This patch should fix tcp_mmap for Big Endian kernels.
Fixes: 597b01edaf
("selftests: net: avoid ptl lock contention in tcp_mmap")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Cc: Arjun Roy <arjunroy@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f5dda315b6
commit
a84724178b
1 changed files with 3 additions and 1 deletions
|
@ -282,12 +282,14 @@ static void setup_sockaddr(int domain, const char *str_addr,
|
|||
static void do_accept(int fdlisten)
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int rcvlowat;
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
|
||||
rcvlowat = chunk_size;
|
||||
if (setsockopt(fdlisten, SOL_SOCKET, SO_RCVLOWAT,
|
||||
&chunk_size, sizeof(chunk_size)) == -1) {
|
||||
&rcvlowat, sizeof(rcvlowat)) == -1) {
|
||||
perror("setsockopt SO_RCVLOWAT");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue