patches for DPDK stable branches
 help / color / mirror / Atom feed
* Re: [dpdk-stable] [PATCH v2 2/2] Define macro for iov_max default value
       [not found] ` <20190308155547.1695-2-olegp123@walla.co.il>
@ 2019-03-08 16:33   ` Wiles, Keith
  0 siblings, 0 replies; 2+ messages in thread
From: Wiles, Keith @ 2019-03-08 16:33 UTC (permalink / raw)
  To: olegpoly123; +Cc: Thomas Monjalon, dpdk-dev, stable, Oeg Polyakov



> On Mar 8, 2019, at 9:55 AM, olegpoly123 <olegp123@walla.co.il> wrote:
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Oeg Polyakov <opolyakov@northforgeinc.com>
> ---
> drivers/net/tap/rte_eth_tap.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index cd48b2b2a..e7da73509 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -68,6 +68,8 @@
> /* IPC key for queue fds sync */
> #define TAP_MP_KEY "tap_mp_sync_queues"
> 
> +#define TAP_IOV_DEFAULT_MAX 1024
> +
> static int tap_devices_count;
> static struct rte_vdev_driver pmd_tap_drv;
> static struct rte_vdev_driver pmd_tun_drv;
> @@ -1328,8 +1330,8 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
> 	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;
> +			"_SC_IOV_MAX is not defined. Using %d as default\n", TAP_IOV_DEFAULT_MAX);
> +		iov_max = TAP_IOV_DEFAULT_MAX;

I am afraid your patch will not work on top of the current code in the master repo, it appears you created a patch on top of your v1 patch.
Maybe you should squash the first patch and this one, then it should be correct.
> 	}
> 	uint16_t nb_desc = RTE_MIN(nb_rx_desc, iov_max - 1);
> 	struct iovec (*iovecs)[nb_desc + 1];
> -- 
> 2.14.1
> 

Regards,
Keith

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2 1/2] net/tap: fix missing _SC_IOV_MAX
       [not found] <20190308155547.1695-1-olegp123@walla.co.il>
       [not found] ` <20190308155547.1695-2-olegp123@walla.co.il>
@ 2019-03-08 17:29 ` Stephen Hemminger
  1 sibling, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2019-03-08 17:29 UTC (permalink / raw)
  To: olegpoly123; +Cc: keith.wiles, thomas, dev, stable, Oeg Polyakov

On Fri,  8 Mar 2019 10:55:46 -0500
olegpoly123 <olegp123@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-08 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190308155547.1695-1-olegp123@walla.co.il>
     [not found] ` <20190308155547.1695-2-olegp123@walla.co.il>
2019-03-08 16:33   ` [dpdk-stable] [PATCH v2 2/2] Define macro for iov_max default value Wiles, Keith
2019-03-08 17:29 ` [dpdk-stable] [dpdk-dev] [PATCH v2 1/2] net/tap: fix missing _SC_IOV_MAX Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).