From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v11 0/8] ethdev: 100G and link speed API refactoring Date: Mon, 28 Mar 2016 15:42:46 +0200 Message-ID: <3378985.okHjTtIZOy@xps13> References: <1457992546-32230-1-git-send-email-thomas.monjalon@6wind.com> <10133718.H4CGZOGkuk@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: "Zhang, Helin" , "Xu, Qian Q" , "Xing, Beilei" , dev@dpdk.org, "Ananyev, Konstantin" , "Lu, Wenzhuo" , "Richardson, Bruce" , "Glynn, Michael J" To: Marc Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 16BB347D1 for ; Mon, 28 Mar 2016 15:44:41 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id 20so17823873wmh.1 for ; Mon, 28 Mar 2016 06:44:41 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Marc, 2016-03-27 21:39, Marc: > On 27 March 2016 at 11:53, Thomas Monjalon > wrote: > > 2016-03-26 11:24, Marc: > > > On 26 March 2016 at 09:08, Thomas Monjalon > > > wrote: > > > > 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: [...] > > > > > 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. > > > > Yes, you're right. We have to avoid apps modifications. > > By keeping autoneg the default behaviour (value 0), we avoid issues. > > > > > The only benefit of your approach is not to have another macro #define > > > ETH_LINK_AUTONEG 1, which is marginal IMHO. > > > > Yes, you're right. > > I suggest adding 2 macros for rte_eth_link.link_autoneg: > > #define ETH_LINK_FIXED 0 /**< No autonegotiation. */ > > #define ETH_LINK_AUTONEG 1 /**< Autonegotiated. */ > > > > and keep these ones to use with rte_eth_conf.link_speeds and > > rte_eth_dev_info.speed_capa: > > #define ETH_LINK_SPEED_AUTONEG (0 << 0) /**< Autonegotiate (all speeds) */ > > #define ETH_LINK_SPEED_FIXED (1 << 0) /**< Disable autoneg (fixed speed) */ > > > > Opinions? > > Agree on all of them. I can add them in the (hopefully) final v14, once all > or main drivers have been tested. It would be better to make the v14 as soon as possible to let others test the latest revision. Thanks