net/tap: fix getting max iovec
authorOleg Polyakov <olegp123@walla.co.il>
Mon, 18 Mar 2019 18:20:47 +0000 (14:20 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 21 Mar 2019 17:37:43 +0000 (18:37 +0100)
commitefa28ae847546a1376b2112544490251dd0ea5cd
tree949117e21625e80dc1ee19aff2ba6484e25a5a6e
parent968e9c14f3fe51174e8cda7eb9148985f28f1bb3
net/tap: fix getting max iovec

If the value _SC_IOV_MAX is missing, sysconf returns -1.
In this case, iov_max is set to a default value of 1024.
This should never happen except for redhat bug:
   https://bugzilla.redhat.com/show_bug.cgi?id=1504165

Fixes: ec12df9504fe ("net/tap: fix support for large Rx queues")
Cc: stable@dpdk.org
Signed-off-by: Oleg Polyakov <olegp123@walla.co.il>
Acked-by: Keith Wiles <keith.wiles@intel.com>
drivers/net/tap/rte_eth_tap.c