From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0072.outbound.protection.outlook.com [104.47.32.72]) by dpdk.org (Postfix) with ESMTP id 922801B1A6 for ; Thu, 21 Sep 2017 14:58:17 +0200 (CEST) Received: from BN6PR03CA0075.namprd03.prod.outlook.com (10.164.122.141) by DM5PR03MB2700.namprd03.prod.outlook.com (10.168.197.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 21 Sep 2017 12:58:16 +0000 Received: from BY2FFO11FD009.protection.gbl (2a01:111:f400:7c0c::142) by BN6PR03CA0075.outlook.office365.com (2603:10b6:405:6f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.56.11 via Frontend Transport; Thu, 21 Sep 2017 12:58:15 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Thu, 21 Sep 2017 12:58:14 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8LCwCuC000942; Thu, 21 Sep 2017 05:58:13 -0700 To: Ferruh Yigit CC: , References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170909112132.13936-29-shreyansh.jain@nxp.com> <3c4802aa-e86b-9a16-0f94-707c3297f48e@intel.com> From: Shreyansh Jain Message-ID: <5d58d8c5-c8cc-740d-a009-d6e5eb58509f@nxp.com> Date: Thu, 21 Sep 2017 18:39:09 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <3c4802aa-e86b-9a16-0f94-707c3297f48e@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131504722949233806; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7966004)(336005)(346002)(39860400002)(376002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(3190300001)(24454002)(189002)(199003)(377454003)(86362001)(4326008)(104016004)(189998001)(77096006)(36756003)(31686004)(2906002)(47776003)(356003)(305945005)(8936002)(64126003)(6916009)(50466002)(6246003)(53936002)(68736007)(229853002)(8676002)(2950100002)(81156014)(81166006)(31696002)(6666003)(15650500001)(97736004)(33646002)(230700001)(5660300001)(65826007)(85426001)(83506001)(58126008)(23676002)(93886005)(316002)(53546010)(106466001)(54906003)(498600001)(8656003)(54356999)(76176999)(50986999)(105606002)(65956001)(65806001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2700; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:tKcVVoXX99Z+qlVtqDBHJCD8Gm+3iTKdiaQoHF+jlK/oS5cicwKclGLSDvLHJmHX4DTAiidsJuYrBAp9A2Eaz0Pt8zKZn34NSKahcwpmZwV1xs+1LUo2hfUxk2r1qf+3 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b7164e1c-22db-4f0b-7b2d-08d500f06c21 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM5PR03MB2700; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2700; 3:9icjDJeywZoX6tLmCoB0a29jzeUGEmF7KCwOkuiSF7M/m7/lGSUZ8oHlbhfKTYiAj1XJYmErymmNNMEjgdSskcNkSRVnKIowCtKF70cDvC/HXEz+BxSh+x9xB5fBmg7VGDac5kMzg6ZKs5NlKyNK7Dp1Ex3vDC0yDiR/jKW2rzNXYVp9hFuf1KILCRwPIM9bEEIjaiKX/mY5zxT1CW9lA9ndcvYXQe8oJdHNubV180Isr3W+bSrzYXfwL0RQgYPAz/eyL1LdtRQarXx5k5Zltzz86Pqw9/hyH+HGnsLiflLwl6I7NY77UGSs/tpuFBO2HUXA3E96Anc7VkSPqLjAqVW8t5W70VSRjdbnZRvflF8=; 25:i6rIc5H4yNIiJto6todSLzNevdtLbiCkPHSLWKJSNevQbMTVgmQ9E42GJvLjAC0R8N68FJ4PR0cdU23SyY8YApkcaxOhXZLZ69v0gUNTdGHN5BPYGZyx7Co1bR5YwrhKHnm3KZ4P+LIUCIv9w2Zoh1w27e0NTC8JOfsF2d+zmB3K6yfPMHz/GPAP4aIKFZFCsB+suMxETeKtB9+XbM07Qk0roESyYwgjVNCb/GT4nRT9PylGGDKPw6/NR37EL5RbqwJlbjMd2tUDA5Ed08HjoteYbbtjE46G4dtNRPsoqqAM4IBZefw4OGPS0nZXYLmkfh/Te4BRDmPF8F2+sEVJiA== X-MS-TrafficTypeDiagnostic: DM5PR03MB2700: X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2700; 31:UOwHU0IXH6HUF65nTv9VpFxfHz2MnlKltYSxh830mwuTWW5RLPxqOqdrQOC3zj/S60a5KigM/SP1ARh4Qx+l2SZUew4rXzAOnXSVMAzs2dXQZoPd1bSfv/JntGHM42ZJXAjOL0PDVDF1ASy86mDWKNtQAFffJOsM9P9mW48cvgrzhA8NE/kwequnx2JSGyGPhWEDmxzZWLmFKiReEoz4dIj/GbA1OIom1o/eQkNLhEU=; 4:Q+LYC4REtVai43pB8zCnKtFPmprOLmaNLsLZqvlJQwpj7U/ZpuC45pXweMzwVpxwLtmEwi850xPn/0PSS9LShb4YTeAo5dbUImNRvN6i0wMrgI6Xkhfk4kfNXUJTx24FK817Tu4p4U44MrgfzFLRUSTjxbLvfh3RQY4NFc2ZtNAMTKM6OpQsc40VxbrrBwvhVx824HsGEl+lGLcGjZ7kc4jpAfsqCrqOWMFMwXPNXgpPXs2CNpBI2FwK2vzxeZGt+TuWoYqBae7NbXoxhFzMYvm4tJ8D5/w4KsiEU2ngB2A= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123561025)(20161123556025)(20161123559100)(20161123563025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR03MB2700; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR03MB2700; X-Forefront-PRVS: 04371797A5 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjAzTUIyNzAwOzIzOkZlSDJieWFzM2tlb1F0UlhaajMvVWZqOW5Y?= =?utf-8?B?MkpLRlM5N2RCYWV2K0RMU2g2Y1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XJ7Q3Edgi+5p6yaTGMfnfM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2017 12:58:14.7205 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2700 Subject: Re: [dpdk-dev] [PATCH v4 28/41] net/dpaa: add support for link status update 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: Thu, 21 Sep 2017 12:58:18 -0000 On Monday 18 September 2017 08:26 PM, Ferruh Yigit wrote: > On 9/9/2017 12:21 PM, Shreyansh Jain wrote: >> Signed-off-by: Hemant Agrawal >> Signed-off-by: Shreyansh Jain > > <...> > >> +static int dpaa_eth_link_update(struct rte_eth_dev *dev, >> + int wait_to_complete __rte_unused) >> +{ >> + struct dpaa_if *dpaa_intf = dev->data->dev_private; >> + struct rte_eth_link *link = &dev->data->dev_link; >> + >> + PMD_INIT_FUNC_TRACE(); >> + >> + if (dpaa_intf->fif->mac_type == fman_mac_1g) >> + link->link_speed = 1000; >> + else if (dpaa_intf->fif->mac_type == fman_mac_10g) >> + link->link_speed = 10000; >> + else >> + DPAA_PMD_ERR("invalid link_speed: %s, %d", >> + dpaa_intf->name, dpaa_intf->fif->mac_type); >> + >> + link->link_status = dpaa_intf->valid; >> + link->link_duplex = ETH_LINK_FULL_DUPLEX; >> + link->link_autoneg = ETH_LINK_AUTONEG; > > Shouldn't this function go and get link information from hardware? Our currently hardware interfaces don't support these operations explicitly. For the "fman_mac_1g" and "fman_mac_10g", these are the default sets which are exposing. Overtime, we will get more such interfaces exposed from Linux kernel to Fman library and update this code. > >> + return 0; >> +} >> + >> static >> int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, >> uint16_t nb_desc __rte_unused, >> @@ -216,6 +238,22 @@ static void dpaa_eth_tx_queue_release(void *txq __rte_unused) >> PMD_INIT_FUNC_TRACE(); >> } >> >> +static int dpaa_link_down(struct rte_eth_dev *dev) >> +{ >> + PMD_INIT_FUNC_TRACE(); >> + >> + dpaa_eth_dev_stop(dev); > > Drivers tend to do revers, make link down on device stop. Just to double > check if stop() is intended for link down. fman_if_disable_rx is equivalent to "link down" as well as stop (because it flushes the queues). That is why these APIs are linked. > >> + return 0; >> +} >> + >> +static int dpaa_link_up(struct rte_eth_dev *dev) >> +{ >> + PMD_INIT_FUNC_TRACE(); >> + >> + dpaa_eth_dev_start(dev); >> + return 0; >> +} > > <...> >