From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pascal Mazon Subject: Re: [PATCH v1] [net/tap] add logic to assign speed from user Date: Thu, 18 Jan 2018 15:04:45 +0100 Message-ID: <6f6a28dd-44db-9ae2-f7ff-aca7163ac926@6wind.com> References: <1513875200-5061-1-git-send-email-vipin.varghese@intel.com> <2893AEFC-6FD7-4D05-AB5B-F2AC018D1390@intel.com> <92A6F8C2-94CF-404D-9970-5357CEA79277@intel.com> <6dd432ff-575f-4fa1-e65f-f707bef06216@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "Varghese, Vipin" , "dev@dpdk.org" , "Patel, Amol" , "Hunt, David" , "Jain, Deepak K" To: Ferruh Yigit , "Wiles, Keith" Return-path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id A48521B2F9 for ; Thu, 18 Jan 2018 15:04:47 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id b141so22341275wme.1 for ; Thu, 18 Jan 2018 06:04:47 -0800 (PST) In-Reply-To: <6dd432ff-575f-4fa1-e65f-f707bef06216@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" I have no objection to having the 10G default speed on tap. On 17/01/2018 17:22, Ferruh Yigit wrote: > On 1/17/2018 4:14 PM, Wiles, Keith wrote: >> >>> On Jan 17, 2018, at 10:06 AM, Yigit, Ferruh wrote: >>> >>> On 12/21/2017 1:38 PM, Wiles, Keith wrote: >>>> >>>>> On Dec 21, 2017, at 10:53 AM, Vipin Varghese wrote: >>>>> >>>>> TAP speed is passed as user argument, but never set to interface. >>>>> New logic brings speed get and set to LOCAL and REMOTE interfaces. >>>>> >>>>> Updated the default PMD speeed to 10M as per Linux Kernel default >>>>> value. >>>> The problem in setting the link speed to 10M is that TAP will not limit its traffic to 10M. Applications like pktgen and others use the Link speed to calculate the bit rate, which will be broken now. >>>> >>>> I would suggest making the default value 10G or 40G instead as CPU speeds will continue to increase. Forcing someone to always add the link speed seems a bit much when we know the systems can send/receive much higher then 10M, which is the reason 10G was picked. Please set the default back to 10G or some much higher number. >>> Hi Keith, Vipin, Pascal, >>> >>> Since we really can't set the interface for Linux tap interface, what do you >>> think removing speed arg completely from tap PMD? >> I have no problems with it being remove from the PMD. The only problem is this being a virtual interface it can be any speed, but 10M is unreasonable IMO. I would like it to be set to something reasonable as the default (40G or 10G) or would zero be more reasonable. > Agreed. > When "speed" arg removed I think there is no reason to change default speed, it > can stay as 10G as it is now. > >> I know the reported speed does not effect the performance, but tools that look at the speed and attempt to use that speed need a value greater then the max bit rate of the interface IMO. If we had a value to indicate a bogus speed then maybe the tools can adjust in some way. >> >>> Thanks, >>> ferruh >>> >>>>> Signed-off-by: Vipin Varghese >>>>> --- >>>>> drivers/net/tap/rte_eth_tap.c | 185 +++++++++++++++++++++++++++++++++++++++++- >>>>> 1 file changed, 182 insertions(+), 3 deletions(-) >>>>> >>>>> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c >>>>> index 6b27679..7238504 100644 >>>>> --- a/drivers/net/tap/rte_eth_tap.c >>>>> +++ b/drivers/net/tap/rte_eth_tap.c >>>>> @@ -62,6 +62,8 @@ >>>>> #include >>>>> #include >>>>> #include >>>>> +#include >>>>> +#include >>>>> >>>> Regards, >>>> Keith >> Regards, >> Keith >>