From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by dpdk.org (Postfix) with ESMTP id CCABA2B8C for ; Fri, 10 Mar 2017 10:12:33 +0100 (CET) Received: by mail-wr0-f182.google.com with SMTP id l37so60831289wrc.1 for ; Fri, 10 Mar 2017 01:12:33 -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:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=Avq6wNAPtfv5bTn7v35+LQaqQXiHIfy8XxHnGFUPO80=; b=BDkicwWHcd4+1A8e/DdsXJVCZ3vDgdMu9flO+ryoYEUMG33FDRgO7eAEfWtxcOkjGX 8jfJntF2BHuS5c4Dzu/98rG3cm3+YzRMmP9EHowIJZxjGa/iNUTmHzJWtGnXe6xxMfUh t1ks9Kw1D8uVHrs/9iVxsHZrg0g5Hc++UKjJRHtUY+8Ah/VRcKKJKTXvF9gk52nY/JEb AqkosOhUEKeiHnhZvsomKJpqv6n+sBE+woEDykNQymGQfj+TBEjuguVGSZyR47RcItsc BfTXv5AFiEqRM+girn3LDl2MjCd/lJB1Wd+kIsmHWF4xk/5nyOwn+KdMLUXExTwQOYqZ 9DNw== 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:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=Avq6wNAPtfv5bTn7v35+LQaqQXiHIfy8XxHnGFUPO80=; b=ul2UkWVM24/MQoB2UBaBMAaJuqlUf+dKSxZlFgy6gBM0rJEE2iI+EPDsiKK1zWG/fy RLArBCO9uUjrDr5a5mqWWm9L3iPqjQBBbGQ3Slld7fegaX/JMcRQT4hsRdWp1H4fzMOs gmgtMfDVlETOXYfoRit9yp9ojNUQg32pXykH8N+ckTk3n/gNfMs5Y6Anh0XUl62aDKZW NKlyLiQ0lKU9GIUs4v1gaS/Ukf5n1jiO7oh//CQSU4JtTz26c0qcqQN1LX2lznZCTP1c mGvlCzfCdRZ3l7v6eOVWCZxMk7zO7wrQOmFI5GzACb55yP/y2BTNrdJPbd6K+tkElfZq 2v0A== X-Gm-Message-State: AMke39l9aK/ciRMlFBb8/dk+pNzbYr+evVXzbJSu7JM/pwZFSK/CmeHF3GAzq0DAZlpE7+Vu X-Received: by 10.223.153.168 with SMTP id y37mr14216286wrb.193.1489137153495; Fri, 10 Mar 2017 01:12:33 -0800 (PST) Received: from paques.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id n187sm2388322wmd.4.2017.03.10.01.12.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Mar 2017 01:12:33 -0800 (PST) Date: Fri, 10 Mar 2017 10:11:56 +0100 From: Pascal Mazon To: Ferruh Yigit Cc: "Wiles, Keith" , "dev@dpdk.org" Message-ID: <20170310101156.78e643e7@paques.dev.6wind.com> In-Reply-To: <20170310100312.5854eeb4@paques.dev.6wind.com> References: <1488904298-31395-3-git-send-email-pascal.mazon@6wind.com> <1c44b4be-943a-2911-f91b-f61ebf0eb258@intel.com> <161c8ab9-2b3f-121d-bf0c-9be7fae531b9@intel.com> <20170310100312.5854eeb4@paques.dev.6wind.com> Organization: 6WIND X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 2/6] net/tap: add speed capabilities 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: Fri, 10 Mar 2017 09:12:33 -0000 On Fri, 10 Mar 2017 10:03:12 +0100 Pascal Mazon wrote: > On Thu, 9 Mar 2017 16:05:47 +0000 > Ferruh Yigit wrote: > > > On 3/9/2017 2:36 PM, Wiles, Keith wrote: > > > > > >> On Mar 9, 2017, at 8:18 AM, Yigit, Ferruh > > >> wrote: > > >> > > >> On 3/7/2017 4:31 PM, Pascal Mazon wrote: > > >>> Tap PMD is flexible, it supports any speed. > > >>> > > >>> Signed-off-by: Pascal Mazon > > >>> --- > > >>> doc/guides/nics/features/tap.ini | 1 + > > >>> drivers/net/tap/rte_eth_tap.c | 35 > > >>> +++++++++++++++++++++++++++++++++++ 2 files changed, 36 > > >>> insertions(+) > > >>> > > >>> diff --git a/doc/guides/nics/features/tap.ini > > >>> b/doc/guides/nics/features/tap.ini index > > >>> d9b47a003654..dad5a0561087 100644 --- > > >>> a/doc/guides/nics/features/tap.ini +++ > > >>> b/doc/guides/nics/features/tap.ini @@ -9,6 +9,7 @@ Jumbo > > >>> frame = Y Promiscuous mode = Y > > >>> Allmulticast mode = Y > > >>> Basic stats = Y > > >>> +Speed capabilities = Y > > >>> Unicast MAC filter = Y > > >>> Other kdrv = Y > > >>> ARMv7 = Y > > >>> diff --git a/drivers/net/tap/rte_eth_tap.c > > >>> b/drivers/net/tap/rte_eth_tap.c index 1e46ee36efa2..ef525a3f0826 > > >>> 100644 --- a/drivers/net/tap/rte_eth_tap.c > > >>> +++ b/drivers/net/tap/rte_eth_tap.c > > >>> @@ -351,6 +351,40 @@ tap_dev_configure(struct rte_eth_dev *dev > > >>> __rte_unused) return 0; > > >>> } > > >>> > > >>> +static uint32_t > > >>> +tap_dev_speed_capa(void) > > >>> +{ > > >>> + uint32_t speed = pmd_link.link_speed; > > >> > > >> link_speed is already hardcoded into PMD, so there is nothing to > > >> detect here. Would it be different if PMD directly return > > >> pmd_link.link_speed? > > > > > > The link speed is passed into the PMD via the command line, which > > > means it can change per run. > > > > Right, I missed that. > > I'll use switch/case in the next version in any case. > But yes, as Keith said speed is a runtime option. Sorry, I've sent that mail a little too quick. Of course I can't use switch/case as we're not checking exact values matching. > > Regards, > Pascal