[dpdk-dev] [PATCH v2 1/2] net/tap: fix missing _SC_IOV_MAX

Stephen Hemminger stephen at networkplumber.org
Fri Mar 8 18:29:37 CET 2019


On Fri,  8 Mar 2019 10:55:46 -0500
olegpoly123 <olegp123 at walla.co.il> wrote:

> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index 6f5109fca..cd48b2b2a 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -1326,6 +1326,11 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
>  	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 1024 as default\n");
> +		iov_max = 1024;
> +	}

Blank line between declarations and code please.

This should never happen except for redhat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1504165


More information about the dev mailing list