[dpdk-dev] [PATCH v4] net/tap: fix missing _SC_IOV_MAX
Stephen Hemminger
stephen at networkplumber.org
Fri Mar 8 22:51:53 CET 2019
On Fri, 8 Mar 2019 14:06:58 -0500
olegpoly123 <olegp123 at walla.co.il> wrote:
> struct rx_queue *rxq = &internals->rxq[rx_queue_id];
> struct rte_mbuf **tmp = &rxq->pool;
> long iov_max = sysconf(_SC_IOV_MAX);
> +
> + if (iov_max <= 0) {
> + TAP_LOG(WARNING,
> + "_SC_IOV_MAX is not defined. Using %d as default\n", TAP_IOV_DEFAULT_MAX);
> + iov_max = TAP_IOV_DEFAULT_MAX;
> + }
> uint16_t nb_desc = RTE_MIN(nb_rx_desc, iov_max - 1);
> struct iovec (*iovecs)[nb_desc + 1];
Don't mix code and declarations.
More information about the dev
mailing list