From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 79B797CC2 for ; Wed, 26 Jul 2017 16:13:35 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2017 07:13:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,415,1496127600"; d="scan'208";a="997424249" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 26 Jul 2017 07:13:34 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Jul 2017 07:13:33 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 26 Jul 2017 07:13:33 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.146]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.122]) with mapi id 14.03.0319.002; Wed, 26 Jul 2017 22:13:31 +0800 From: "Lu, Wenzhuo" To: "Dai, Wei" , "Ananyev, Konstantin" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 Thread-Index: AQHTBfHFapidJPd1a0e+hHMHclrqbaJmGUqQ//+GeoCAAIZaAA== Date: Wed, 26 Jul 2017 14:13:30 +0000 Message-ID: <6A0DE07E22DDAD4C9103DF62FEBC09093B67CC50@shsmsx102.ccr.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> <49759EB36A64CF4892C1AFEC9231E8D650B68C20@PGSMSX106.gar.corp.intel.com> In-Reply-To: <49759EB36A64CF4892C1AFEC9231E8D650B68C20@PGSMSX106.gar.corp.intel.com> Accept-Language: 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: [10.239.127.40] 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:13:36 -0000 Hi Wei, > -----Original Message----- > From: Dai, Wei > Sent: Wednesday, July 26, 2017 10:10 AM > To: Lu, Wenzhuo ; Ananyev, Konstantin > > Cc: dev@dpdk.org > Subject: RE: [PATCH v2] net/ixgbe: add support of 2.5G and 5G on X550 >=20 > 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? >=20 > IXGBE_LINK_SPEED_82599_AUTONEG is defined in > drivers/net/ixgbe/base/ixgbe_type.h . > Normally, the base driver code in this file is provided and maintained by > another 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 mac= ro is > introduced. No. I'm talking about changing the base code. You can add a macro in any .h= or even .c file you like. Then when there's a macro in base code, it's easier to replace a macro by a= nother macro. >=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