From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by dpdk.org (Postfix) with ESMTP id 8CED53257 for ; Mon, 22 Jan 2018 11:17:25 +0100 (CET) Received: by mail-wr0-f180.google.com with SMTP id f11so7986158wre.4 for ; Mon, 22 Jan 2018 02:17:25 -0800 (PST) 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=QQ3Epnt2IU5us6dWxy/oRhdPukObytzMNHiPlWn+sus=; b=umBiRsEhv+YEAWUAPqVgPHSIbEQKx+ssLPcKQzA+HbNZg1r5OHfCTMpUGFA3aK9sLo aH11xMpMg8hJWRfHsfg5+t2SL54UYvh5QFxNf+ssxN6n52eBXaXPsR6VMhkfn/pdqRys ako3NPo+vjKBsL0lQ1vyGl2K/rj45YoBEi1V5Ue5OmbiJytazJ3WoyLU3OlStNQUfh1O wgPpsygKpZuSF+SfbFcc4e1wMTWm59Fk7t3bSV7SYHyfrj03S7I9carorp2SmvnktQ2p uULiwOWv4R7NzWSsgBGgm/Z7Y84rC/7HQ27h3CycPzToaRZEaIG5T7PjZJjJhBqO/RHm fYVg== 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=QQ3Epnt2IU5us6dWxy/oRhdPukObytzMNHiPlWn+sus=; b=t7OiXA/igTOrb+qVLTLSKIvgqJO0TdLm4ty6psU8A3kYQvphRShHd0U2Ei5y/6U7xR XGHQW5Jd5shgKNmPpTfRG1KlYXG9fMnwdZqmeriJfYaKxVpMpQvqa9IuC8BWjfMYfDQ6 2GxfLY6Na6IIaoPm3x1OOq/sTVXu/ikSZwfutJDW8OlENbDwqrjCLfXmQFfTlmnFBLvj GtBZDCBNVgElhz6eCT2mznBxl1drNiEugG+Qs1YGKEZczHj//lUGyQ8NF+jHI2OX7pcp 3rYXsYxKzyfwJ1bOuxYDiIO9AZpQe2CRE8vS0/UPffKlowuil6OU9AsJsDscEbu2xCPa IFdw== X-Gm-Message-State: AKwxytejPiNEjOUciUbob3DkEWBmHmlnbVlB5UzDjuWXPxflIYQwGjiV Xy3aOEDeKU7XQ+PmfF/FjcSJuQ== X-Google-Smtp-Source: AH8x226bBwMlONIQJ0tFO4dqxt812tjFn9scflmCfjeKWBYCEta4/rxebEUtPRS7DWMW+YZ2OD/JhA== X-Received: by 10.223.143.44 with SMTP id p41mr5680548wrb.125.1516616245076; Mon, 22 Jan 2018 02:17:25 -0800 (PST) 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 e67sm14080994wmf.7.2018.01.22.02.17.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 02:17:23 -0800 (PST) Date: Mon, 22 Jan 2018 11:17:11 +0100 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: "Ananyev, Konstantin" , Thomas Monjalon , "Wu, Jingjing" , "dev@dpdk.org" , Neil Horman , "Richardson, Bruce" Message-ID: <20180122101711.ecgbqvzuitataygk@bidouze.vm.6wind.com> References: <1515318351-4756-1-git-send-email-matan@mellanox.com> <1516293317-30748-1-git-send-email-matan@mellanox.com> <1516293317-30748-8-git-send-email-matan@mellanox.com> <2601191342CEEE43887BDE71AB97725886280A68@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB97725886280AE8@irsmsx105.ger.corp.intel.com> <20180119150017.mljpcdmldqx32mkq@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3 7/7] app/testpmd: adjust ethdev port ownership X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2018 10:17:25 -0000 Hi Matan, On Sat, Jan 20, 2018 at 06:14:13PM +0000, Matan Azrad wrote: > > > > > > > @@ -1394,7 +1394,7 @@ struct cmd_config_speed_all { > > > > > > > &link_speed) < 0) > > > > > > > return; > > > > > > > > > > > > > > - RTE_ETH_FOREACH_DEV(pid) { > > > > > > > + RTE_ETH_FOREACH_DEV_OWNED_BY(pid, my_owner.id) { > > > > > > > > > > > > Why do we need all these changes? > > > > > > As I understand you changed definition of RTE_ETH_FOREACH_DEV(), > > > > > > so no testpmd should work ok default (no_owner case). > > > > > > Am I missing something here? > > > > > > > > > > Now, After Gaetan suggestion RTE_ETH_FOREACH_DEV(pid) will iterate > > > > over all valid and ownerless ports. To be clear: you did not implement what I suggested, but your own interpretation of it. Please do not write as if I validated this interpretation. Essentially, the NO_OWNER semantic is completely different from a default owner. A default owner would protect ports from race conditions and force port ownership requests to go through proper channels protected by critical sections. NO_OWNER means that anyone is free to take any ownerless port at any time. And as a result, your are thus forced here to fix this by modifying an existing application for any entity using your ownership API to function with it. This is very different from what I suggested. What I said was that I wanted the most common case to be taken care of, and for existing applications to continue working. It entails having a more complicated API, but I think this is a price we should pay. You are implementing the most common case in testpmd (the app entity creating an owner and putting its valid ports within). Your API should ease that up as much as possible before considering forcing everyone to work with it. ~*~ You implemented a way for the failsafe to capture existing ports. How does it work without the channels for requesting ports suggested above? Regards, -- Gaëtan Rivet 6WIND