Message ID | 1515581201-29784-4-git-send-email-hemant.agrawal@nxp.com |
---|---|
State | Accepted |
Commit | a8e78906afba01d60a86c19c50ba0e43c5c1d13b |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5178813qgn; Wed, 10 Jan 2018 03:55:31 -0800 (PST) X-Google-Smtp-Source: ACJfBosvblgzaBWrtK/1j/oZzKXlDJVVH0twQwfVu0TugBHromNOL/UG/YIIN0qRrK+NNTzU+z03 X-Received: by 10.28.129.70 with SMTP id c67mr4153160wmd.160.1515585331845; Wed, 10 Jan 2018 03:55:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515585331; cv=none; d=google.com; s=arc-20160816; b=zLgmVGFgjZHP8x3mjivPwxk1iSD1tst7GubXDi9dnRcdhcmYXHzRh68MVmW6GPkwD6 NeUJ86euB9u4uRIYxOidDJyoOaOAkbz9xP0fJEzLdTOAVGBevBMQdlzMXqeKAt6xu1av /8y/E+CXUGkxa40bIa8HkooG+UybheAaK5IKOjiXtYrP9HyMIrUR61WOoK4DZ3eUV+ZU xIQl53uBX7CbYv5gEcml1IMoUR2pMcKiwW3nENYX2o6LxGbdMb1X9OVaR1UEHuaD7wRQ pDyMBO+vrEfz/o9mYjSHj789P8z1JRBMdb226BJ3UorztJps4gULiQ4O6igUP1pGDlKn xFHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=Jwr26lLFblI0f3M1bBrEH3DyhmqIKFiczEXpJ+STi2s=; b=kq2IVC/J7PaOBagSz/376ttlJFrjdIPB8PVQTTz8T0lnCvixBmEnjJFNVRMjVy/FPw KAURS+qPnGw8suDuAC2nNTOodFPGMJ5OO3ZBzYB5XKMzP8Za5wO831JGdUWY6w07yVEs pA49T1XR9QovcDq8kHE0fVs6U6W5DFQhn+PkxxQl/GGQ7qUx1Vq28zgmZRm93EDIwOKA j8FITXhtrU1/m30U+C51HkT7tXjlsOQe/+DC9Y3ef9V3HzOfaKYc0v92bck0zrhKdQpk zvk3qXuvjrmaT2hbUJDvdcROVk1JAn8gqOwFwiXDRxNnpaA4YY5lRvqXw8tphN0wOrcs 9bAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: <dev-bounces@dpdk.org> Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id 65si12401063wrm.414.2018.01.10.03.55.31; Wed, 10 Jan 2018 03:55:31 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC60F1B2A0; Wed, 10 Jan 2018 12:51:16 +0100 (CET) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0040.outbound.protection.outlook.com [104.47.33.40]) by dpdk.org (Postfix) with ESMTP id 4A4691B1A3; Wed, 10 Jan 2018 11:47:57 +0100 (CET) Received: from BN3PR03CA0094.namprd03.prod.outlook.com (2603:10b6:400:4::12) by SN2PR03MB2365.namprd03.prod.outlook.com (2603:10b6:804:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 10:47:56 +0000 Received: from BL2FFO11FD055.protection.gbl (2a01:111:f400:7c09::166) by BN3PR03CA0094.outlook.office365.com (2603:10b6:400:4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Wed, 10 Jan 2018 10:47:56 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BL2FFO11FD055.mail.protection.outlook.com (10.173.161.183) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Wed, 10 Jan 2018 10:47:24 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0AAljSL007124; Wed, 10 Jan 2018 03:47:53 -0700 From: Hemant Agrawal <hemant.agrawal@nxp.com> To: <dev@dpdk.org> CC: <ferruh.yigit@intel.com>, <shreyansh.jain@nxp.com>, <stable@dpdk.org> Date: Wed, 10 Jan 2018 16:16:25 +0530 Message-ID: <1515581201-29784-4-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515581201-29784-1-git-send-email-hemant.agrawal@nxp.com> References: <1515504186-13587-1-git-send-email-hemant.agrawal@nxp.com> <1515581201-29784-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131600548451462659; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(376002)(346002)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(86362001)(575784001)(6916009)(5660300001)(2950100002)(6666003)(81166006)(97736004)(36756003)(85426001)(8676002)(498600001)(81156014)(48376002)(76176011)(51416003)(4326008)(53936002)(106466001)(104016004)(8936002)(77096006)(47776003)(2351001)(54906003)(50466002)(16586007)(305945005)(50226002)(8656006)(356003)(2906002)(105606002)(68736007)(316002)(296002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2365; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD055; 1:3TkbxQS8JTOEa5Bne977mrBn7B/8vvDNc9EFqGIJvxbP2G34gOEpU3k5aNd0HP/T1sZsGqfWFbv1I0hXzLCc5M4eNz+23DmcIs53KDaqQcT4qYO8MN4426uPcqaUECas MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d95e142-f6fd-48f0-2e03-08d558178929 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:SN2PR03MB2365; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 3:Sg5LQOxspTA+7IqjgnDxdY1YvtoE8f9mZSV0KsQ/YM/vsNjAnI+rBHZABWtWpy19aixyt8Gpf7viwGt7xi7UoizePaIWhj+CIbAbTwONu6t8po2a7umaQfkstwqfm19Xv8qH0KVOWM5WeKzG7wRrwnkhehtOer4gQrJHtmwrwN1GQ2f8C3/nXPFy9uqRHwJVJeRdQ25Fo96+3o7uhBFXQWHP8ivlWVM3T9klNaae1NJwU2Oo6Jx4IpZWDfr3QC4hmQ8Mx9TnYaH1UYVQ7Y88V9p4YC8/xXsUoucVOJeZ8hlpKqp+HCXbeu139RYM2CJnqjCNJhqR0F3TrDslpaTLlP+WN1hpYRPEpzCkS3sNfuI=; 25:7T2flTLXLwHnzxUFb5pyUwGtIylxTuH7WlqObyoRMLLflTnY9dltskTqvHmmyIWoNBvA4zO8mod/Fh5KUys41RgxVseXc8T18V5sVo8x1KPbn2yM0Q21CvELidL0+LjvUCK2GTy2AY6O3pTdQoR63Pp1Do1s4KuruccqCUWASHGfNJcz7o47qtYg9//hdwhXWAJftv3XiVSdG+35XW1kXmhYLM05wla1ndFLOXHmk+tP2C+aWgGJcsW/EP9mac+btqp4DiY7+NbhTVraqJB72Fzsx9d2pchfpfzAaO1z30HZzKMPtVSmfxFDVx9YqL9V3g4T2C2si1XhAVEVFMZFpA== X-MS-TrafficTypeDiagnostic: SN2PR03MB2365: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 31:EFSvQ5YcMSpKDV6QsTRTOMkW9Yv3w1b0FphEY1z7cVVjMS1pIHHg7VUEUi/XwFIlWXIMyaGoue2zjCb2s5AeROfJxxigJTl0A1mhqGo9nVndmP4yHWNb8luBJeNovtuwCLp/lygOpQcNRG2GiiYulsXLBNQ9qbGyVWxQzxLpmC8U7VUJPs7AKaApS1Qwr0LhRZUGM2BbXlggHrtCjcBhSD0aWhonz8hV9zpHAstY+Fg=; 4:UA1QLbb8rVVtAWJ1zkh86gFTpCYatzX60lhrZ/+mIHkSct58mjpdhsL9yDW4icarnau+KYiEQwV1XzPUTAYawZPymoBQljoENhjiKZ9QqgoUGiW6j6voA5FBv+L4Mqdi47MFe2JLzmu6z7Eb9cXpCaGGxakhwRNWPr7ZJEgMxL2fCDpBaZico7J8/UZaAqyN6U4C5yVSF+QzJWR7iAzpD116+q2xcV1HGUra0ZWBzlbuWzclMHokZazRYaGfWvQV9UWi0EtuvKbkyxwkxBLySC0q6VDljjM/J/5UsPPRpQZr9wxk4Ydj9w6cIp+2YwL/ X-Microsoft-Antispam-PRVS: <SN2PR03MB2365BEA6FBFA92148FFFB06789110@SN2PR03MB2365.namprd03.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231023)(944510075)(944921075)(946801075)(946901075)(10201501046)(6055026)(6096035)(20161123559100)(201703131430075)(201703131520075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(20161123565025)(20161123556025)(20161123561025)(201708071742011); SRVR:SN2PR03MB2365; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2365; X-Forefront-PRVS: 0548586081 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2365; 23:+Sqjwa0cA95iq1Jc/BJHUamjeq5Kfy0IOFpNrqFqX?= zeWu6W8kn8oBRaZilj+nqQhznwiYPrUPzcqV/86hDYE2pJUfkrSNv2N7JD9vd2lwsUF1MmEcajUSzgy/ba2mmD4noObqeh+x+ST4qX8+XQY94zzB+480jZnubBjgJtzuf1YIL2/5KgF5Xe+XBsHZDoMfs9rZtqHC0pB7tHLetCx5gAyac/gpnYCGYV5CmoyTKNQqnQEkEvTL/Xw+CJ7mtDYVExXTjME9ye3GAMvtC6c5qKp3NmrCs8uwcF3ioIa3SlQgdgEEi3IRQ87SVM+FIXgjC7qOmeu9aB4GFbf7NqSD+XXzdOklvg9mOsJpI7UccVWtEJpgJrg9PMyLTh1rdxPUw9KKkIH37fohg11RInqBoahVwAv/RfC5knANmsLX2KrLdU761UATcXEBnieNXizKQRYhs4L+GuTeqSWmZgONSF/Y/HwIZvrrzKWiMT/Q6z+WJPlhZFe3/i+UG/TYit2h1WNyMRgbnF7wwZL86XSu7ZoHDtesDKTdkPQI2Mcf9Ho24QmL08FldH0G6d0xcsBHYSzY9FWaZu56C7XYnPVvzPYZTOUnWzmQ0cApCIyqJ3YMpTe27Oecj2m25UE8n9dppnvP20LlfE4snSOEWQ1XOZBHLv7NfdNgtnvj//fOI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5pc+chjssPdVq4whtqldILM1FRIGHpJIvzXk=; 7:snwsEGOCSryThz0xpNNsWV8Pq63SCMYotAiM+2dsMfeO6bdDta7Xr9cFC/cGrCFSRUI9NUtrmR1nxUApWKjX1qIKvRAxtIkuF1ZLE/WZWqnHE5mfO0SRrV6izXTIstFwf9vCg1arMgVq3nxLMlJ/roDR7ucO0bcO4dYDlfayj4Cd9rXZtR59efsiDFs67sDu+4coaiPMhU4Y0Yhn5uTnRiK5e6mv7GybRxx0/fUF1D7Dhq0PRwLN5JSRnycUTNC5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 10:47:24.9434 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9d95e142-f6fd-48f0-2e03-08d558178929 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: SN2PR03MB2365 Subject: [dpdk-dev] [PATCH v3 03/19] net/dpaa: fix FW version code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
DPAA PMD improvements
|
expand
|
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 7b4a6f1..db6574f 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -186,19 +186,15 @@ dpaa_fw_version_get(struct rte_eth_dev *dev __rte_unused, DPAA_PMD_ERR("Unable to open SoC device"); return -ENOTSUP; /* Not supported on this infra */ } - - ret = fscanf(svr_file, "svr:%x", &svr_ver); - if (ret <= 0) { + if (fscanf(svr_file, "svr:%x", &svr_ver) <= 0) DPAA_PMD_ERR("Unable to read SoC device"); - return -ENOTSUP; /* Not supported on this infra */ - } - ret = snprintf(fw_version, fw_size, - "svr:%x-fman-v%x", - svr_ver, - fman_ip_rev); + fclose(svr_file); + ret = snprintf(fw_version, fw_size, "SVR:%x-fman-v%x", + svr_ver, fman_ip_rev); ret += 1; /* add the size of '\0' */ + if (fw_size < (uint32_t)ret) return ret; else diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index bd63ee0..254fca2 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -20,7 +20,7 @@ /* DPAA SoC identifier; If this is not available, it can be concluded * that board is non-DPAA. Single slot is currently supported. */ -#define DPAA_SOC_ID_FILE "sys/devices/soc0/soc_id" +#define DPAA_SOC_ID_FILE "/sys/devices/soc0/soc_id" #define DPAA_MBUF_HW_ANNOTATION 64 #define DPAA_FD_PTA_SIZE 64
fix the soc id path and missing fclose Fixes: cf0fab1d2ca5 ("net/dpaa: support firmware version get API") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> --- drivers/net/dpaa/dpaa_ethdev.c | 14 +++++--------- drivers/net/dpaa/dpaa_ethdev.h | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) -- 2.7.4