From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by dpdk.org (Postfix) with ESMTP id 1F0082BD7 for ; Wed, 30 Mar 2016 09:59:50 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id y184so3968550lfd.3 for ; Wed, 30 Mar 2016 00:59:50 -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=eRcNL7tmhlKVsnVzJUgFkp/s5iXo0QztIa8+m191VH0=; b=r++osWVcn8Dn6pMMZl2aBc8Gqr080d0BhCH5cWAFNHEis3fXmEzqSKuHdeA23wCdd4 i00paO0VursIM74HxYBN1xWGeiBJhGCp8CUcanzbjhiOYctLgy1R4LOJ2cAO9T3aJkOc QcTAh+aU3PbKw0T1WFMttjIJ84Skg/T8Ms1QYNJNPnm/LerY6T5e6xWp7biRsg9CETpe 9RQC8lNpqt2uq49kArj5hmFZd525SJ3CwOGfwm38gELWSwq6nr9TZDAdEODGZrtltT30 kmokTCZF/WkZ1+m9OymIQICVQyXfiGwb50GaLsQgSWOutRRaAHiQXzv5/ZjWCNjnueYq NZkA== 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=eRcNL7tmhlKVsnVzJUgFkp/s5iXo0QztIa8+m191VH0=; b=gbk7APvs/YUzP4sXzdjdEe7iFAi9V7ChnNZR0g6GTr3QjoAuE8Tn22ODhVb9uLPRox rNL7o6VJzBUq/8F7uivXM5wvBTjfOT4Aka0GuTIMJb88CPE/HpuPxESdkWTfxsVIAFcI D7hF5oiJTdUHZfsNKGwPwKxr3rT7oGla+TUUGzvnV+53dS03hmHcq71eEQybSg9nkoNW +c0/AvpeSZ2K5McqNfMnBjNduAXJdegdJRZZnRn3nVErqZrmKB2P32tbMY+WQJYxycth bUoRm853oSYL1rJIqimXWRAg8Lxe2mJ96VKi5cAZ6HZ2zCId7FNxjBiE6YEkR9IGZpXz Yh/Q== X-Gm-Message-State: AD7BkJLezoR7jN0qtXcOZuSHt56MWsqifZDv6pDaWTc0pWdjPcPJezxKjF/VDDAZOBe8Z8DPYuBw1kn32eUEvw== X-Received: by 10.25.41.140 with SMTP id p134mr3262825lfp.15.1459324789691; Wed, 30 Mar 2016 00:59:49 -0700 (PDT) MIME-Version: 1.0 Sender: marc.sune@gmail.com Received: by 10.25.168.201 with HTTP; Wed, 30 Mar 2016 00:59:30 -0700 (PDT) In-Reply-To: <94479800C636CB44BD422CB454846E01332447@SHSMSX101.ccr.corp.intel.com> References: <1458934950-23333-1-git-send-email-thomas.monjalon@6wind.com> <1458955640-22951-1-git-send-email-marcdevel@gmail.com> <1458955640-22951-7-git-send-email-marcdevel@gmail.com> <94479800C636CB44BD422CB454846E01332447@SHSMSX101.ccr.corp.intel.com> From: Marc Date: Wed, 30 Mar 2016 09:59:30 +0200 X-Google-Sender-Auth: TxPdBsrgkorLcyuCPeyjg__xAjo Message-ID: To: "Xing, Beilei" Cc: Thomas Monjalon , "Xu, Qian Q" , "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 v13 6/8] ethdev: redesign link speed config 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: Wed, 30 Mar 2016 07:59:50 -0000 On 29 March 2016 at 08:18, Xing, Beilei wrote: > > > > -----Original Message----- > > From: Marc Sune [mailto:marcdevel@gmail.com] > > Sent: Saturday, March 26, 2016 9:27 AM > > To: Thomas Monjalon ; Xu, Qian Q > > ; Xing, Beilei ; > dev@dpdk.org; > > Ananyev, Konstantin ; Lu, Wenzhuo > > ; Richardson, Bruce ; > > Glynn, Michael J > > Cc: Marc Sune > > Subject: [PATCH v13 6/8] ethdev: redesign link speed config > > > > > a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c > > index a98e8eb..6cc2da0 100644 > > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > > @@ -2193,32 +2195,21 @@ ixgbe_dev_start(struct rte_eth_dev *dev) > > if (err) > > goto error; > > > > + speed = 0x0; > > + if (*link_speeds & ETH_LINK_SPEED_10G) > > + speed |= IXGBE_LINK_SPEED_10GB_FULL; > > + if (*link_speeds & ETH_LINK_SPEED_1G) > > + speed |= IXGBE_LINK_SPEED_1GB_FULL; > > + if (*link_speeds & ETH_LINK_SPEED_100M) > > + speed |= IXGBE_LINK_SPEED_100_FULL; > > + > > err = ixgbe_setup_link(hw, speed, link_up); > > if (err) > > goto error; > > Hi Marc, > According to ixgbe HW, link speed shouldn't be 0 when setting up, > Otherwise device will start fail. So we need to set speed if link_speed > is ETH_LINK_SPEED_AUTONEG. Following code is for reference. > > speed = 0x0; > if ((*link_speeds & 0x1) == ETH_LINK_SPEED_AUTONEG) > speed = (hw->mac.type != ixgbe_mac_82598EB) ? > IXGBE_LINK_SPEED_82599_AUTONEG : > IXGBE_LINK_SPEED_82598_AUTONEG; > else { > if (*link_speeds & ETH_LINK_SPEED_10G) > speed |= IXGBE_LINK_SPEED_10GB_FULL; > if (*link_speeds & ETH_LINK_SPEED_1G) > speed |= IXGBE_LINK_SPEED_1GB_FULL; > if (*link_speeds & ETH_LINK_SPEED_100M) > speed |= IXGBE_LINK_SPEED_100_FULL; > } > Beilei, OK, thanks. Can you/someone please try v13 + this modification, so that we make sure this is the final version for ixgbe? Regards Marc > > Beilei Xing > Thanks >