From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pascal Mazon Subject: Re: [PATCH v3 2/6] net/tap: add speed capabilities Date: Fri, 10 Mar 2017 10:11:56 +0100 Message-ID: <20170310101156.78e643e7@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> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "Wiles, Keith" , "dev@dpdk.org" To: Ferruh Yigit 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) In-Reply-To: <20170310100312.5854eeb4@paques.dev.6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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