From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lb0-f193.google.com (mail-lb0-f193.google.com [209.85.217.193]) by dpdk.org (Postfix) with ESMTP id BBC4F5A63 for ; Sat, 26 Mar 2016 11:24:44 +0100 (CET) Received: by mail-lb0-f193.google.com with SMTP id oa3so6460940lbb.2 for ; Sat, 26 Mar 2016 03:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=cDwheWENMBhMZ2DftprP51AiqZCGnh+7S/0jbL6Xf7k=; b=U/qYLIgzJEl9CPxI9SAOSyQZ22hdBb4BK1U573DJ3uGCglmvMRcgUNvAd4Ph3yuEeE Z5pj+xp5uPIW3q8H+dYIsPFbk9HUzfAVOMtqkao6AIupYHka2iLojAsqUAQW82rKYavY sDmTiFOEQo6AvvX4evtnwrSqmKRgqF/DNrWp/JZHhkjm2/y4bXf428SK0bt3MiG8PtkV Y3BuwAAf9ng9EgFFeQI06wziukPNBWU/l/yVuLnKDjOFBkV8E7F2zBbtB90E4Nea76iE ghwpk1roYUpZp29WZ7Cz5luO1toeyyhrVXL/u7gMaAvmcfUlWocOWNnuqqISPdzB6iVp VgTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=cDwheWENMBhMZ2DftprP51AiqZCGnh+7S/0jbL6Xf7k=; b=Xs/oYtmh3fLE7LhoS6cj2D1/tmLM8qm5nB5uDpFkmxAp7Z1qU9/NHsWORiD3vDFwz8 vSDarSXUusMsuz8lM1D4DZJvtOg8v4KDz03ixQTw9USHfiFdgs+0SqYflse2SjdRUgDl YnoXtOpQ+ZGpBMRVvDEsT9bakAXUfSneC0xKhXID00ys3vkYZOigyZmFpIUElyJ9pNQt ZrnKI52RgqnM0K6/uU40RCFL0nVxYMZLaFvr4aa+jnzxejvHg9GqucO1azmGBVigMkAw nlA0i0LZYjOtLkZFX1rrGDqKSYM7vCvboiZziUW45aYkqFhdWL7Kpdr7LgRzkz7BZxyA XDOA== X-Gm-Message-State: AD7BkJL7CIQvjnFp+zyL60vAUFjClV7BP9rnHFP3KSie2tv1uisBMRAiDrCDnEEui7XTNznj9YP9dJUIgYG+Gw== X-Received: by 10.112.61.233 with SMTP id t9mr7017246lbr.47.1458987884479; Sat, 26 Mar 2016 03:24:44 -0700 (PDT) MIME-Version: 1.0 Sender: marc.sune@gmail.com Received: by 10.112.155.196 with HTTP; Sat, 26 Mar 2016 03:24:24 -0700 (PDT) In-Reply-To: <3243448.uE5B0znWZS@xps13> References: <1457992546-32230-1-git-send-email-thomas.monjalon@6wind.com> <3243448.uE5B0znWZS@xps13> From: Marc Date: Sat, 26 Mar 2016 11:24:24 +0100 X-Google-Sender-Auth: UIlPhxB1p2OHcAiHu6RY6NRXhvA Message-ID: To: Thomas Monjalon Cc: "Zhang, Helin" , "Xu, Qian Q" , "Xing, Beilei" , dev@dpdk.org, "Ananyev, Konstantin" , "Lu, Wenzhuo" , "Richardson, Bruce" , "Glynn, Michael J" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v11 0/8] ethdev: 100G and link speed API refactoring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2016 10:24:45 -0000 On 26 March 2016 at 09:08, Thomas Monjalon wrote: > Hi Marc, > > Thanks for finding time to help. > > 2016-03-25 22:30, Marc: > > From v9 to v10 patchset the values ETH_LINK_SPEED_AUTONEG and > ETH_LINK_SPEED_FIXED were flipped. Reverting this makes it work: > > > > marc@Beluga:~/personal/dpdk/tools$ git diff > > diff --git a/lib/librte_ether/rte_ethdev.h > b/lib/librte_ether/rte_ethdev.h > > index ef2502a..fb247a7 100644 > > --- a/lib/librte_ether/rte_ethdev.h > > +++ b/lib/librte_ether/rte_ethdev.h > > @@ -244,8 +244,8 @@ struct rte_eth_stats { > > /** > > * Device supported speeds bitmap flags > > */ > > -#define ETH_LINK_SPEED_FIXED (0 << 0) /**< Disable autoneg (fixed > speed) */ > > -#define ETH_LINK_SPEED_AUTONEG (1 << 0) /**< Autonegotiate (all > speeds) */ > > +#define ETH_LINK_SPEED_AUTONEG (0 << 0) /**< Autonegotiate (all > speeds) */ > > +#define ETH_LINK_SPEED_FIXED (1 << 0) /**< Disable autoneg (fixed > speed) */ > > #define ETH_LINK_SPEED_10M_HD (1 << 1) /**< 10 Mbps half-duplex */ > > #define ETH_LINK_SPEED_10M (1 << 2) /**< 10 Mbps full-duplex */ > > #define ETH_LINK_SPEED_100M_HD (1 << 3) /**< 100 Mbps half-duplex */ > > > > I think having autoneg == 0 is better. Do you agree Thomas? > > No I do not agree, because this flag is now used also for > rte_eth_link.link_autoneg. > So it is more logic to set it to 1. > Having to explicitly specify ETH_LINK_SPEED_AUTONEG in link_speeds during port configuration for achieving auto-negociation, which is what 98% of applications will use, seems anti-natural to me and breaks existing applications. The only benefit of your approach is not to have another macro #define ETH_LINK_AUTONEG 1, which is marginal IMHO. > > Would it be possible to fix without reverting? > At least, all existing applications will have to be modified. I would have to go through v12 again to see if there are other issues still to be fixed, and also apply the 2 fixes I found for e1000. Marc