From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gaetan.rivet@6wind.com>
Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52])
 by dpdk.org (Postfix) with ESMTP id 87E361B3D5
 for <stable@dpdk.org>; Wed,  9 May 2018 15:30:29 +0200 (CEST)
Received: by mail-wm0-f52.google.com with SMTP id y189-v6so9654920wmc.3
 for <stable@dpdk.org>; Wed, 09 May 2018 06:30:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:content-transfer-encoding:in-reply-to
 :user-agent; bh=bviDlzEXuoH63rj8NSStW4P8sjtl9qOSIAnFKOE/1gY=;
 b=Fy2YkRin1jh8hZtdDl0a96MYYqVXCUzNGhJFVE1l5Fes85JM3xAD0ii3tzgRYSjaEg
 5UE1ahmcHl9cdaRttgO064rdMsuk1d8mvh1ggLNnW2jFMu3h7gpcsDsmxfgutjl4ueEB
 cSEiUGIYG//34pXeRrY76pZjFPgQyZzuEINzo4bK8OO2eiRMD6veueM4aLS738TVksng
 3uos36Qk17049mcadaDINNsgpJ4J5osd3Me2Zvbts/hfM9230b/0DPDdgEXNw4Kwf6jP
 EuauhgB8FIT+k0MwPwRwbv6n3zrC/oTXvov1aGuY7KFB8G6FSuVfhzj6fK4L9jDePCv3
 DgWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
 :mime-version:content-disposition:content-transfer-encoding
 :in-reply-to:user-agent;
 bh=bviDlzEXuoH63rj8NSStW4P8sjtl9qOSIAnFKOE/1gY=;
 b=D4miHhrKAgw24NOcNeUOjidURhdQgkxQc1wBmNzFtQBMLu42Zlk4KQxBOxLEziCIki
 meQyFhQ/eUzQip2I3L18NakhRchLevHwDTwdInf+PKkDf3ZR7sXtD8WRIb1vGB4Xylcs
 6zqIeT6S1GsBMTr0mgkbz3ozQyiDN9SCwHueDIpyEuBrabxGwQgTuUfZSlXMVvzv9eza
 7hpz3gAd/kp1BsGhjo1Q02ajEVLEpZFavWU6/8RGUemGwLKEzHPOyhqEdYVS8fgGKXLJ
 X8IZRLwAooLFVJZmQGYbkn3GieTECr2dLgtr9Q92S1o29qKUGdVDKiH2sx5uc4+UwYg1
 tdPA==
X-Gm-Message-State: ALQs6tAI2rZtpnFb+XmrrjWkoRP7tYapGsdzABMHXdzk2oOEfXKyQrD+
 4bHQwYg+spfYxk3nuGRhxZjVPP+v
X-Google-Smtp-Source: AB8JxZor9mpoecuZ65pm8WjVn/lMDRsWi7RGywg8ZWpAwvctZNQC+yu3CgGj1RbsebUe7gGFeZcjUg==
X-Received: by 10.28.0.206 with SMTP id 197mr5464108wma.118.1525872629174;
 Wed, 09 May 2018 06:30:29 -0700 (PDT)
Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com.
 [62.23.145.78])
 by smtp.gmail.com with ESMTPSA id w6-v6sm31714053wra.16.2018.05.09.06.30.28
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 09 May 2018 06:30:28 -0700 (PDT)
Date: Wed, 9 May 2018 15:30:13 +0200
From: =?iso-8859-1?Q?Ga=EBtan?= Rivet <gaetan.rivet@6wind.com>
To: Matan Azrad <matan@mellanox.com>
Cc: Thomas Monjalon <thomas@monjalon.net>, "dev@dpdk.org" <dev@dpdk.org>,
 "stable@dpdk.org" <stable@dpdk.org>
Message-ID: <20180509133013.yxy66njakty2g7y2@bidouze.vm.6wind.com>
References: <20180509094337.26112-1-thomas@monjalon.net>
 <20180509094337.26112-11-thomas@monjalon.net>
 <20180509124123.un67tmsh75kxwrir@bidouze.vm.6wind.com>
 <VI1PR0501MB260866846C128ED90805443ED2990@VI1PR0501MB2608.eurprd05.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <VI1PR0501MB260866846C128ED90805443ED2990@VI1PR0501MB2608.eurprd05.prod.outlook.com>
User-Agent: NeoMutt/20170113 (1.7.2)
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 10/11] net/failsafe: fix
 sub-device ownership race
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 09 May 2018 13:30:29 -0000

On Wed, May 09, 2018 at 01:01:58PM +0000, Matan Azrad wrote:
> Hi Gaetan
> 
> Regarding backporting.
> This version should be bacported for 18.02.1.
> There we have the new event.
> 

Then the fixline should probably reflect this instead.
Targetting the initial failsafe release won't work.

This patch also relies on probing_finish() being introduced, so I guess
the plan is to backport the whole series in 18.02.1?

If so, I think the whole series should target the same commit id within
this release, maybe the introduction of ownership or RTE_ETH_EVENT_NEW.

In any case, I think I recall being told to leave this to stable
maintainers to deal with. However, I do not see the benefit of having
a fixline if the information is meant to be discarded for someone to do
the work again.

> Regarding uint32
> The maximum port id number can be 0xffff.
> In this case the loop will be infinite if we use uint16 to iterate over all the ports.

If RTE_MAX_ETHPORTS is set to 0xffff, an array rte_eth_devices[0xffff]
would be defined statically, and I think other issues would arise
before our being stuck in an infinite loop?

In any case, if this had to be fixed, then there should be a
BUILD_BUG_ON RTE_MAX_ETHPORTS being 0xffff, in the relevant part of
librte_ethdev, instead of relying on librte_ethdev users skirting
shortfalls of the library. Anyone iterating on port IDs should expect the
port_id type to be sufficient to hold this information.

-- 
Gaƫtan Rivet
6WIND