From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 062EF7CCE for ; Wed, 26 Jul 2017 16:12:13 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 26 Jul 2017 07:12:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,415,1496127600"; d="scan'208";a="883034308" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jul 2017 07:12:10 -0700 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.158]) by PGSMSX108.gar.corp.intel.com ([10.221.44.103]) with mapi id 14.03.0319.002; Wed, 26 Jul 2017 22:10:07 +0800 From: "Dai, Wei" To: "Lu, Wenzhuo" , "Ananyev, Konstantin" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 Thread-Index: AQHTBfHFkmSh2OPoz0+uJ4mgdzYpKKJlk30AgACRKUA= Date: Wed, 26 Jul 2017 14:10:07 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D650B68C20@PGSMSX106.gar.corp.intel.com> References: <1500948053-70541-1-git-send-email-wei.dai@intel.com> <1501061376-41938-1-git-send-email-wei.dai@intel.com> <6A0DE07E22DDAD4C9103DF62FEBC09093B67CB9F@shsmsx102.ccr.corp.intel.com> In-Reply-To: <6A0DE07E22DDAD4C9103DF62FEBC09093B67CB9F@shsmsx102.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjA4ZWY1MzUtMThkYy00Y2FkLWEzYjgtN2I3YTcwMTk5MTYyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkwwTUxOUlZVRlpkY2xyU3NJQkw0WUJ1anptaTJnMmtITjVBaEZyUDUwSkU9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 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: Wed, 26 Jul 2017 14:12:14 -0000 Hi, Wenzhuo > > speed =3D 0x0; > > if (*link_speeds =3D=3D ETH_LINK_SPEED_AUTONEG) { > > - speed =3D (hw->mac.type !=3D ixgbe_mac_82598EB) ? > > - IXGBE_LINK_SPEED_82599_AUTONEG : > > - IXGBE_LINK_SPEED_82598_AUTONEG; > > + switch (hw->mac.type) { > > + case ixgbe_mac_82598EB: > > + speed =3D IXGBE_LINK_SPEED_82598_AUTONEG; > > + break; > > + > > + case ixgbe_mac_82599EB: > > + case ixgbe_mac_X540: > > + speed =3D IXGBE_LINK_SPEED_82599_AUTONEG; > > + break; > > + > > + case ixgbe_mac_X550: > > + case ixgbe_mac_X550EM_x: > > + case ixgbe_mac_X550EM_a: > > + speed =3D IXGBE_LINK_SPEED_100_FULL | > > + IXGBE_LINK_SPEED_1GB_FULL | > > + IXGBE_LINK_SPEED_10GB_FULL | > > + IXGBE_LINK_SPEED_2_5GB_FULL | > > + IXGBE_LINK_SPEED_5GB_FULL; > Thanks for the patch. It looks good to me. A suggestion, why not define a > macro like IXGBE_LINK_SPEED_82599_AUTONEG for x550? IXGBE_LINK_SPEED_82599_AUTONEG is defined in drivers/net/ixgbe/base/ixgbe_t= ype.h . Normally, the base driver code in this file is provided and maintained by a= nother team. I will ask them to add similar macro in it. Currently, I'd like do this way. And I will replace it till a similar macro= is introduced. >=20 > > + break; > > + default: > > + speed =3D IXGBE_LINK_SPEED_82599_AUTONEG; > > + } > > } else { > > if (*link_speeds & ETH_LINK_SPEED_10G) > > speed |=3D IXGBE_LINK_SPEED_10GB_FULL; @@ - > > 3972,6 +3991,14 @@ ixgbe_dev_link_update_share(struct rte_eth_dev > *dev, > > link.link_speed =3D ETH_SPEED_NUM_1G; > > break; > > > > + case IXGBE_LINK_SPEED_2_5GB_FULL: > > + link.link_speed =3D ETH_SPEED_NUM_2_5G; > > + break; > > + > > + case IXGBE_LINK_SPEED_5GB_FULL: > > + link.link_speed =3D ETH_SPEED_NUM_5G; > > + break; > > + > > case IXGBE_LINK_SPEED_10GB_FULL: > > link.link_speed =3D ETH_SPEED_NUM_10G; > > break; > > -- > > 2.7.5