From patchwork Fri Dec 8 05:21:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121118 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp228933qgn; Thu, 7 Dec 2017 21:22:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMYJ7U38UL0A5PvVCMBYU7b4eyqysu/A3qzuZA+98yLfxj0vLHS8uonLee0To6H2nAnHna/9 X-Received: by 10.223.180.66 with SMTP id v2mr25625484wrd.93.1512710578165; Thu, 07 Dec 2017 21:22:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512710578; cv=none; d=google.com; s=arc-20160816; b=SnCBrty+YGcu+jnJg62L1YSUZx54T09G2ISjP7bO6UxyMuCxkf4bMqY8uB2TQ8yciF i3Sm3ITxMrTLTNKeh4e+teL01Rav1Na4xSVnb3yOJGMGNkRjG/d8Bc8mxO+fh791wTSi MNY2eOhOCXHpQBNmipcvLlD2+dsiz7WXyuS/+cRqQcS+eNgeIgS0Ov36K0R6+RnjM3No KksVTzkeuy/efnMbL7ypstk/famGu48uE3QtrEJQ5ni29FrkYjn2yBO71j/JsuuwLowj 0t1c71AL3XyQtMubhKS8Bi+jub70SzamoLdgIZRT6ijRyMvHedk4+XneLQYCFF1m93Nn GD+g== 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=xe4iI+QgFvc1WKrsoIWvgdVPY1oqb8HI/IdLnikFlRY=; b=mFFLlcuSNwqlRWW5EcyhSLAkhwW8rI90Hbyj3eVp24iLOOWhyC4+t4PV/sEe34kjxk /fzp9BH2AbbOHzxhRCbtxQJEKUTOFXoTcQ2IkrcOGwq3Pd4GIH8Vgk618gho06oqvg0p fCCwG7hoXbMTH9W0tzSqYypFpKVZ7c58s1TRJ6sKbHBQ904hjGWOn9Oco7azZzbGZ/hP D7HuIiazbRkoO6lM82ITEavZmAmViq5VRPs+wVNCUV5TvvBJ/wTRxmpgh1O+QMq1TXTZ iydtvPMggRGnwourjW/TNl/WgZcH2/9ZIxg0wXpLFyixG81CbUJGy5Jd1uY2H1Ge8/3G nTsw== 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: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id d9si5048243wre.338.2017.12.07.21.22.57; Thu, 07 Dec 2017 21:22:58 -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 A9BEE1AEEE; Fri, 8 Dec 2017 06:22:36 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0065.outbound.protection.outlook.com [104.47.36.65]) by dpdk.org (Postfix) with ESMTP id 792C81AEF0 for ; Fri, 8 Dec 2017 06:22:35 +0100 (CET) Received: from DM5PR03CA0036.namprd03.prod.outlook.com (10.174.189.153) by BN6PR03MB2689.namprd03.prod.outlook.com (10.173.144.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Fri, 8 Dec 2017 05:22:34 +0000 Received: from BN1BFFO11FD024.protection.gbl (2a01:111:f400:7c10::1:165) by DM5PR03CA0036.outlook.office365.com (2603:10b6:4:3b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Fri, 8 Dec 2017 05:22:33 +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 BN1BFFO11FD024.mail.protection.outlook.com (10.58.144.87) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Fri, 8 Dec 2017 05:22:30 +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 vB85MKGb013022; Thu, 7 Dec 2017 22:22:31 -0700 From: Hemant Agrawal To: CC: , Date: Fri, 8 Dec 2017 10:51:17 +0530 Message-ID: <1512710487-32388-5-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> References: <1512710487-32388-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131571841507806394; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(376002)(346002)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(77096006)(4326008)(53936002)(50466002)(105606002)(8936002)(48376002)(50226002)(47776003)(86362001)(2906002)(356003)(305945005)(68736007)(36756003)(85426001)(2351001)(16586007)(106466001)(316002)(498600001)(6666003)(296002)(97736004)(54906003)(5660300001)(76176011)(104016004)(51416003)(2950100002)(6916009)(33646002)(8676002)(81166006)(81156014)(8656006); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2689; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD024; 1:Kzj7vTdwN1yIe4pbAGBMz+EoTqF5joJr7b54sRdoSZYPtUhFppJq8lftFhyFPmY/M3zVFzxAHcbuwO/QnYlH+yW6NDGKoR2kubnm5TLa8DWQEd8Sc3Aw3UesuQyjxQ8+ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 62d71377-6f4d-48e9-4cba-08d53dfbadfb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN6PR03MB2689; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2689; 3:yAyYbqmVpPuHnh+1r39Vr5fjyt3HCtK3FXJlfH6WJ+bxrgW9cgDlHaHlBXAS/7uB3XhPxdgp3ULgw/pk9ktQiAgEvY1A+4uCgTh+JyyjR7m/5tOj3YOtT9wFkCl+ma9LnSsNfa4wHT4m8JPqdX84EF1kMwECe+A7gZShWyeKvpoENg1GWpRSYxY3O+VTAWZkbTe8WIJA1kCJegEgzzGCJO9ED/XUwRKzkA27Etj5zw+iiOGX4+Xg/+RIBXBv6fTlSEG3VmI26TXRhtj5OXkjCePx97J4yr/RoUjv+TLfAn0+rZqIzW+lxYsXAmo2TKT3fNUWKZB7mrEcADG2qZAr6ThOrdNDA1dNo4X2jU4rVUo=; 25:IsTWlNhke2aHurBrPkMyL4rZh/Sb1hU1E8DceFRnnBj8XZ8+kqvliMErbxEOxly9lI0Xhr35ZrzMhRfbN8UoNKVUeZresHKzIPL/DGj5uCygV9H6IgWhgCp+HpERH1kvAyoIWucNnH8ziAAb0XrdDauJG3ejpsIBb7GfjPUIJz6R2cPWoHv8CAsVtrg+yZDRumayRczfjPrkRTydCwFTY9ravn1wv28RIvxP/Eirh8sJT33z6peb32sOuTXewNwSXdHg85EzwQiXYhfsEuOzT4HQVSYXeRmrMShiFv7nF8/LMNhZnIaoqU2mVk4CTzH8Fi9Z7hr1A4MieFpwkDcOyQ== X-MS-TrafficTypeDiagnostic: BN6PR03MB2689: X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2689; 31:94entJ+Q/z4hbEJGKZqqOBRHa+OafgBOeb/q3Uijj0WZO/aY7KrgrSIF6TPGeOaAzEjcGkb/xYGFnF6DtAMxKr3UXynMIalOKlu+MofYYg2aYHA9fOW2/DFzi+qiIcDt1EzJafWNN9f72q35JLI1w8z4UorjhuDW6JWRhPJ9aUTer+oJir+mA8+VYu10F5xdR173ZRC6f1e6olX9yrwRehGNEhkPZgUTp05ryjWihBo=; 4:XeyfSvroqlEjGV+A2lKCmiuekHDnjxO1OOTd8xcb06N4q0/z+Qb4OFftpQGcd9TR/br0wN/NEMHTxq9L0MMj/dn0Qw63up4GWZ9DavDvtvs95usFo2BdxmdTYlkjxvxC0L3tetZzX1AyfNiotTUOox7iQ7njQsRcNlsdakkp6D5QPg3oPjoJxLJEc4SHy9DOIXdMs+EaADSZyjuKytnyUKFxQGQIqKxs3BNwENx142zG8JMYgHrmc0ajSOcnSXg2/mebrOwCZMLZHxaKlvl7yLecQurYlA/UaB9a1gp3rl2Gq0+yeJDoxLT4W5TeBrT6 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231022)(3002001)(10201501046)(6055026)(6096035)(20161123556025)(20161123565025)(20161123561025)(20161123559100)(20161123563025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(201708071742011); SRVR:BN6PR03MB2689; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN6PR03MB2689; X-Forefront-PRVS: 0515208626 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2689; 23:66//z9/advZA7QD9MyLEx0cD54qch01DcLsu26B2S?= tkKP7eh2WCJoeWaJnNSYllRufruRLSdZuhVvKzQCcEHyJLc2IHfVM/nPLenLAHgO6s78FA47QgJY5wo+cCnuZPOwdqpQ6nGvEwIdAoQXM9EqCY6SX2KnSE9NbAlDdx69najzXXVXVr9OHxPBzfRQUcntaCkvmqqioW6e9qalFnArS/IMcu3C9TVdGTVftRnVVEWGCyAB3t18auy4hQfkDbA3Bo+8XO0MUMMToyuqVT8ZM09GUHKsD+VYHSOZSsiwJFTxruyV8lMK8FS1mU46E7H09xtjHdwfWMcazzPUuXVOG9Os+mYsFZD7AmMOn3LkHTJbbjN+vRfKf7i8yOirnXzB2wQfj/P6DoUOKMOC/hFjxHmIZhL/7qljuSYOx9m3h/eKTcsLBFIS/72ZX04O46QlgdSuROnkbyCzFHSu79/kRoBM++SKjmCjB/DOsgsR7gYYIQO7/TNyPY+fa0Bt7zsRxZMH0JBXlhKVfbL/ndB+5olVfe1W4Dbpc/TK/JTY4TjYNWVXTWgC4sUyDC4VzAqheh73rW9TwD3FSSRzBmrn7Te1Zgsh6URi+YwH0EDRZBT439dEBkUYWij2guZ9YE04Agfha/51Y5i7F/5DQ4tpnIU8U6imA5eY/+WGDz3qBMkIpMVZk54yF95EsM0CshT7DlkejRmu5ezAa0xJ1Y2oss4IbyjnM7xzv7BgK/iPnQwBavj9MdrInkNZ7+EWZZsGgov0W5mQhSTUlaqpdvq93AeK7gg5R2fzF4868mxf0+jbPGGH+wDPQMVlQKSaPT/BSt7lDpUfMH+MPFLY8oNoFgyiYZHg+inSZLxXjs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B3QoP5gxaTrsY/06WPSDRpR8N30O2VQVunupntXds1UxnSkVMSfj9Ha94O3ZydlrhK87k72jrjGNHzwFx37tSraX6vHvoYW96HJPBA4w SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 05:22:30.6090 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62d71377-6f4d-48e9-4cba-08d53dfbadfb 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: BN6PR03MB2689 Subject: [dpdk-dev] [PATCH 04/14] net/dpaa2: link status check as driver flag 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Hemant Agrawal DPDK-809 --- drivers/bus/fslmc/rte_fslmc.h | 4 ++++ drivers/net/dpaa2/dpaa2_ethdev.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h index 0c7872d..fd52e2b 100644 --- a/drivers/bus/fslmc/rte_fslmc.h +++ b/drivers/bus/fslmc/rte_fslmc.h @@ -62,6 +62,10 @@ extern "C" { #define FSLMC_OBJECT_MAX_LEN 32 /**< Length of each device on bus */ + +/** Device driver supports link state interrupt */ +#define RTE_DPAA2_DRV_INTR_LSC 0x0008 + /** Device driver supports IOVA as VA */ #define RTE_DPAA2_DRV_IOVA_AS_VA 0X0040 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 38de3d9..1cd302d 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -1872,7 +1872,6 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &dpaa2_ethdev_ops; - eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; eth_dev->rx_pkt_burst = dpaa2_dev_prefetch_rx; eth_dev->tx_pkt_burst = dpaa2_dev_tx; @@ -1976,6 +1975,9 @@ rte_dpaa2_probe(struct rte_dpaa2_driver *dpaa2_drv, dpaa2_dev->eth_dev = eth_dev; eth_dev->data->rx_mbuf_alloc_failed = 0; + if (dpaa2_drv->drv_flags & RTE_DPAA2_DRV_INTR_LSC) + eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC; + /* Invoke PMD device initialization function */ diag = dpaa2_dev_init(eth_dev); if (diag == 0) @@ -2003,7 +2005,7 @@ rte_dpaa2_remove(struct rte_dpaa2_device *dpaa2_dev) } static struct rte_dpaa2_driver rte_dpaa2_pmd = { - .drv_flags = RTE_DPAA2_DRV_IOVA_AS_VA, + .drv_flags = RTE_DPAA2_DRV_INTR_LSC | RTE_DPAA2_DRV_IOVA_AS_VA, .drv_type = DPAA2_ETH, .probe = rte_dpaa2_probe, .remove = rte_dpaa2_remove,