From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 53D45374F for ; Fri, 10 Mar 2017 10:03:49 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id t189so5614796wmt.1 for ; Fri, 10 Mar 2017 01:03:48 -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=GIey3Wua0kNYHMt9do/d2gteXdR1gs8GVfOj6kqJ8KI=; b=Eb6RNuBp6bRBK1YbHgbzok5o/y29jeVTyKnxK7/Lq0v0EGzd7xh6DPIin3ESZ5H9ow yxNs9sRjeI6Ltv671YoMwdKBE/3ZvJFlj6vl76ntTD1N7pH61wLGvk4MR0sEgQYqn7Ay kyPfosS14tOG9Nnlvn3W/C7Km8t029KTfIu4/I2/Cd3M9n8fixjSSUBTnEV7pbZjGO+b ypk5r9XxwdvjzjDJTslQtHdOEjsL5qC6PM5I4ZWyu/U1/13+KtfXNSzee+fiSb+KlHOI q+Nqs3xgTPg43YNjYNZ1mA57DuFOgoKdTuEoUtj+3tiA+nDakpBuHgfIFrvt7CUHQUHr 78Gw== 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=GIey3Wua0kNYHMt9do/d2gteXdR1gs8GVfOj6kqJ8KI=; b=mc+iP6hyRydMWMYLRPJ/y0pd8By0NoJd0om2W+lBbF+pcGPJQpcxWh7cUUzTJwz1lk isiWw3whRHoEj2B6C/4U9Cxl+9+GT61ldw18Dz1klISYXX78Up8HLG5gIFsZ+9RmZ/wm lHd9Bmeifx3cBho8wCu69b88TyW/jl/GGCo/qTu/H08w4BClSlzf0NCRerA9LZ3Ycgu4 eSBsr3sqHf8qDKqBdvLSWG+oow/QBOfDKX5XNW4EjirUzL1MTPxiJFY5LQEk+vFOf/Jw lzskd6rWLaaPlSgH5B7pGBiUvaJAyV2Kbw5GTuqQh7EpnhtZxPsJYs0RU9Ug4TQcg8ww 9HBA== X-Gm-Message-State: AFeK/H3DSychH08BC74AhOmmhdz6hLaHStmVlOplq1fUrCHcgmKZzJVqttjKU1jr3ZniFdhB X-Received: by 10.28.146.12 with SMTP id u12mr1398926wmd.113.1489136628793; Fri, 10 Mar 2017 01:03:48 -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 l138sm2357537wmd.7.2017.03.10.01.03.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Mar 2017 01:03:48 -0800 (PST) Date: Fri, 10 Mar 2017 10:03:12 +0100 From: Pascal Mazon To: Ferruh Yigit Cc: "Wiles, Keith" , "dev@dpdk.org" Message-ID: <20170310100312.5854eeb4@paques.dev.6wind.com> In-Reply-To: <161c8ab9-2b3f-121d-bf0c-9be7fae531b9@intel.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> 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:03:49 -0000 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. Regards, Pascal