[dpdk-dev] [PATCH v6] net/tap: fix missing _SC_IOV_MAX
Stephen Hemminger
stephen at networkplumber.org
Mon Mar 18 18:56:36 CET 2019
On Mon, 18 Mar 2019 12:55:23 -0400
olegpoly123 <olegp123 at walla.co.il> wrote:
> 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);
Looking at this a little more carefully.
1. Trivial: TAP_LOG() already adds a newline.
2. TAP device should not be silently reducing the number of receive descriptors.
3. TAP device be using IOV_MAX to set rx_descriptor limit. (in dev_info)
The ethdev would rx_queue_setup with any request for too large a value.
More information about the dev
mailing list