Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751874AbdFFPDi (ORCPT ); Tue, 6 Jun 2017 11:03:38 -0400 Received: from mail-sn1nam01on0044.outbound.protection.outlook.com ([104.47.32.44]:48685 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751432AbdFFPAr (ORCPT ); Tue, 6 Jun 2017 11:00:47 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; From: Ioana Radulescu To: CC: , , , , , , , , Subject: [PATCH 16/18] staging: fsl-dpaa2/eth: Errors checking update Date: Tue, 6 Jun 2017 10:00:39 -0500 Message-ID: <20170606150041.10955-17-ruxandra.radulescu@nxp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> References: <20170606150041.10955-1-ruxandra.radulescu@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131412348453861960;(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)(336005)(39860400002)(39450400003)(39850400002)(39840400002)(39410400002)(39380400002)(39400400002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(9170700003)(2950100002)(2906002)(77096006)(6916009)(54906002)(4326008)(15650500001)(53936002)(38730400002)(110136004)(47776003)(50986999)(76176999)(189998001)(6666003)(39060400002)(85426001)(8656002)(86362001)(33646002)(50466002)(81166006)(8676002)(8936002)(50226002)(36756003)(104016004)(498600001)(5003940100001)(7416002)(5660300001)(305945005)(48376002)(1076002)(356003)(2351001)(106466001)(105606002);DIR:OUT;SFP:1101;SCL:1;SRVR:BL2PR03MB163;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD045;1:wrA0EvlqptxqJ0JQP21rIG5WT3ORDfvAjlCiqYR2Ix/zxc+TroOFviVNHVqo1EFFxA4IVWvY4VN4vvHOngXZY2s3Byx+vC2junIeZMd2Dr46MvZVcXh0bqObAf3JMtuN+JE1YPR3/FJ2btc5tFilPZki6A0aQE1hfzemmhAP1xicSjJ2LwBmyxc6YwLtVuEz76l/7xbynVCwq7irBpeIP7W3L4g1LVvyOEtDjDyrnKdT/mtv6zFIJBrFbdDEBWCMhElKkFGmW0jmCIjIMZSt4wXkMQvY26LV2pRG5CS6GKN37H8fHUZaA6z9jtd1dNIJ5r3SU4FkMDsYiZM9m+Tp7tT8trsKCYE+pAX9E4LJmUS01yDVAgSJsrW4QdTJ1gU+CvRsODdtoFPKNos/N5o+jPFLwQub7G8u2b4q5M+LODScO2t+N40Ez7Q0XnKl70VmJG87l3yNq1X7UXuhGan4HzhesGT4dk6DfO9kBqEBwyYIqA3U/sdSrB2f8lWBxBvmMORq8n4oQL2EMkQkQ2KbyFJ7AhklpQeZk7gCVKPOZjL9q9QqlTOtbRjT+aMV2c2XBsm7SVdD2UtIxHVkV53JntARBBYZCEvKv+ZjsjAxEQFo8KJNE7a7hVwuN/WbSBoFAD2oCoyhS6V3hv4s3reStWkANSKDWRjkgtj2Cqcokc7OcWjpYL4JdVnZ2eU4KOJC MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL2PR03MB163: X-MS-Office365-Filtering-Correlation-Id: f0e1b1e8-a765-43cc-d8ea-08d4aceccf25 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BL2PR03MB163; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB163;3:82XE7rjPB5c/3z3EAcbYv5AXnxmvqWeZDE+rH7O3+cC19hEjpC9O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k2wGdRZco97KbvLMrpawasK1Y+V+6MfrE38joyhwTJMirlNVVBqsfYIm0bOSSJGdJ+zUCz+Nw89jCwJyu2YllgTMiwzxy665uOHtiEtMq/iwR4aRgNFCbfUaoLdO2f4me+orOsX2Swc4rjw= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123559100)(20161123561025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123565025)(20161123556025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BL2PR03MB163;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BL2PR03MB163; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB163;4:cIUrFaV2B6HLv2teuGfEwTvBAA31zT3JP+qt8xr/wgt?= =?us-ascii?Q?B/q4bsujufauJRJItoWMp+AS4Pd9ZYhhEWN54S8aycKMS//mnuyBcx5DK0vX?= =?us-ascii?Q?d6g4Ae8FmYWrP0nAT3q4IbXBB92mpOzMB216gAoVGzWYYC5gWl0QAOzmCM+y?= =?us-ascii?Q?V/qis/wVDcO3clHFt8VNM8hRrLsKG5zWO3M5FPHfeQm/NFvTy5PUc9RPUxCp?= =?us-ascii?Q?rXMj6aDUmDGw23X55VZNWf6kqYFGJzqVXzBs28LiyEWGGrpG4vshu9cFlH/m?= =?us-ascii?Q?a6pePsMXFFff2VdWY66SQOc7t+xqbcHTSrklXPsNZcWSHRkjZOdeStAU5FeG?= =?us-ascii?Q?TGpWLJjhu3LnYPzLFtwp3b0+KD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=?us-ascii?Q?p2DqB8G8uIM2ZW9gi9fOJnxkWngdiPuczv7+A?= X-Forefront-PRVS: 033054F29A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB163;23:dwOX4cyGUGqSetVjQo0id+rsWlLu8i55F8JaZ15EKV?= =?us-ascii?Q?GzfGwo+xC5Lb3k1+Ir34NNQNS4QCklgmza+B3eDp9N4z1JZgEb0y3TRonK6w?= =?us-ascii?Q?I73p5cguBOPujiCBbLolzDBTtgYsCL29pDyPiy5la3NbL9MLnL1uN5Oh5kb1?= =?us-ascii?Q?Ljc8GZ4cYuV5KYi0V8WPPz2BeUjdTuHo1GGUEMjbgUqeNPzoXat9n+Q1gZWN?= =?us-ascii?Q?1P2pUJyneiH2ASqs91Ud2xQesbu+k7THrGIVCTYMZA1PvdhUEaK5SbiinLde?= =?us-ascii?Q?uEjFICBKRvh3JwckZW2agVXaDsC9H163LueOBNupo+s7TMv1NUL+QpEga3bk?= =?us-ascii?Q?bn08VEvn5vgltuWh7VvxfWW5gy9M7oCtjYI0jBvebffQykMEt80J/ATx7Rcq?= =?us-ascii?Q?wrVCoKBwL8W6SDM90MXaDcZZKqcgd8XARWbsajlkfeJ0BCHpMjBSnaoYaxUW?= =?us-ascii?Q?WmGBWVAjyC+qa5mrT22B8AUmgcmVnD5NhjU8yQKnyVW2EozvN6tiVQ+O/x2f?= =?us-ascii?Q?l2394nB+jWI2a9NqWwPpW0y6nE8EcB19tn3l0iBo50bvBTNyIEf9TpxmrrEu?= =?us-ascii?Q?PjCDoRakuwqEJQAW6OjKiSxGGDM11eAbXXJNP5Ravul6gb6EzsAgMSDqOXvG?= =?us-ascii?Q?H3Tmx1EMYMktg8dzTDCGuwGPbuck1a9h9qtwzWsA8OfH8rMpGIdjW3zOiwz1?= =?us-ascii?Q?d0aXtpxj62x0cN0jIkYcns0/zAIVmIOR4E8jhrQy43Q51MVSXXPKrkZQV1Mi?= =?us-ascii?Q?5+Aos5vYC034gyZKDF/Bg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V48p2WmRgRewnjADoWF2QjHsMkE15asxfrHs5d+7vjDFic8GjkQmdSq8xVejh5P3fFtILZNIDKaejvU4fJypHaRMpJvSQX1wetQI3XO+wNpcVh54ohfMrGMjAbi8IGCLgxFj9drYV/Yk7fDhzVByUH+qk4Cm9omG6d8wfWby3+GpjYorjtS6w X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB163;5:CvgIHQjnmR3nOYi4X01ljLU+2JC3vV2Xy0yuZOLYk3rbJmPtO0hPJPg3AfleO3rYV4XiztBJTgPf677CfXGNj6eplAdPyuT/Jionh62HGdVbxGaYroim/zgigONiq5a/o+7GlVPg6baBmDTnWj4687Hmxlz3kryvdklu+25MUaJT9rZPuZZi/XjMdMQhYKKv242DXijyx/70+dgyETEeOP1k59iyJQQFVullPvLDBlJ7v8e+n87ucnnRrdMdeKv7NuBiSEInH279tb3rG8Ail779Gizzf2n/i5RHORYfEbi7B6ivJ5YpPF1jl7bVJ/jZuJF5kZGsHGay6QsSiOnPFtlzT4MbkUhJYob5QtTVDG/+UrVcmsMWFmwX/7tFWQeSDSSHkfJncdLEVnTN554DU+OBtiWRX3JWfcxrodkD32liEEXvbxzmxdnkyUMxihcg9KQelabsnUAIaU2r1/PUnduSF/HQJrnLUuf9PISsDjIKOSaRxY5U7s1Dij/lfl5gTqBGCL9h+gcPgrXi+RW/+g==;24:GRt5XUNSQHRgppuiClzLGokIPSpgDFgXuirRQCjRK4ghmcYgb1wMp+Me9uBkiidyXtUkSBkruQjOanX6UYgEGi5awN8dcqGTLFEH8XlEr+o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB163;7:zKn19FXJtIy5Nk77OH/C1fawYkbUN1C8/T3bWhO/qmBehu04lsUHplk80leuCOOklrp582Qz4nswS7ZyTTV3HLTrOyZ4GIPSaeNXwUCuRAktYpM7jQYMPuuE9o0He+aRRA+bhRwWs+2Hi5EUUCCj53LDAe3thdXWAEJwR7v+NKHZc9slNvgTkdZaeN0jAhE0Zo7kBln8Ba/smm+fzkhRPgDx7z1tzPgds+wRlSvLpsFOjublIDyXi0JUvCcKM5GmHBfZk1vmfTorIwV1smKDrOr+FX5T+GLGUL4b6o38Dv/DY2hLQ2R9XyWUYiDtKVPPdrY9CGAoEKFSF47EQqT7yA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2017 15:00:45.2145 (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: BL2PR03MB163 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4968 Lines: 129 On the egress path, frame errors are reported using both a FD control field and the frame annotation status. The current code only handles FAS errors. Update to look at both fields when accounting Tx errors. Signed-off-by: Bogdan Purcareata Signed-off-by: Ioana Radulescu --- Note: Checkpatch complains about a macro(DPAA2_FAS_RX_ERR_MASK) being too complex. It's just a bitmask with all possible Rx FAS error bits and I'm not sure how the extra parantheses recommended by checkpatch would help, so leaving it as is. drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 36 ++++++++++++++++++++------ drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 17 ++++++++++-- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 26f209c78ff9..7dca8c2e5ff9 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -534,7 +534,7 @@ static void free_tx_fd(const struct dpaa2_eth_priv *priv, * buffer but before we free it. The caller function is responsible * for checking the status value. */ - if (status && (dpaa2_fd_get_frc(fd) & DPAA2_FD_FRC_FASV)) + if (status) *status = le32_to_cpu(fas->status); /* Free SGT buffer kmalloc'ed on tx */ @@ -638,6 +638,8 @@ static void dpaa2_eth_tx_conf(struct dpaa2_eth_priv *priv, struct rtnl_link_stats64 *percpu_stats; struct dpaa2_eth_drv_stats *percpu_extras; u32 status = 0; + u32 fd_errors; + bool has_fas_errors = false; /* Tracing point */ trace_dpaa2_tx_conf_fd(priv->net_dev, fd); @@ -646,13 +648,31 @@ static void dpaa2_eth_tx_conf(struct dpaa2_eth_priv *priv, percpu_extras->tx_conf_frames++; percpu_extras->tx_conf_bytes += dpaa2_fd_get_len(fd); - free_tx_fd(priv, fd, &status); - - if (unlikely(status & DPAA2_ETH_TXCONF_ERR_MASK)) { - percpu_stats = this_cpu_ptr(priv->percpu_stats); - /* Tx-conf logically pertains to the egress path. */ - percpu_stats->tx_errors++; + /* Check frame errors in the FD field */ + fd_errors = dpaa2_fd_get_ctrl(fd) & DPAA2_FD_TX_ERR_MASK; + if (unlikely(fd_errors)) { + /* We only check error bits in the FAS field if corresponding + * FAERR bit is set in FD and the FAS field is marked as valid + */ + has_fas_errors = (fd_errors & DPAA2_FD_CTRL_FAERR) && + !!(dpaa2_fd_get_frc(fd) & DPAA2_FD_FRC_FASV); + if (net_ratelimit()) + netdev_dbg(priv->net_dev, "TX frame FD error: %x08\n", + fd_errors); } + + free_tx_fd(priv, fd, has_fas_errors ? &status : NULL); + + if (likely(!fd_errors)) + return; + + percpu_stats = this_cpu_ptr(priv->percpu_stats); + /* Tx-conf logically pertains to the egress path. */ + percpu_stats->tx_errors++; + + if (has_fas_errors && net_ratelimit()) + netdev_dbg(priv->net_dev, "TX frame FAS error: %x08\n", + status & DPAA2_FAS_TX_ERR_MASK); } static int set_rx_csum(struct dpaa2_eth_priv *priv, bool enable) @@ -2069,7 +2089,7 @@ static int bind_dpni(struct dpaa2_eth_priv *priv) netdev_err(net_dev, "Failed to configure hashing\n"); /* Configure handling of error frames */ - err_cfg.errors = DPAA2_ETH_RX_ERR_MASK; + err_cfg.errors = DPAA2_FAS_RX_ERR_MASK; err_cfg.set_frame_annotation = 1; err_cfg.error_action = DPNI_ERROR_ACTION_DISCARD; err = dpni_set_errors_behavior(priv->mc_io, 0, priv->mc_token, diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index c760e9b77e22..b492c8723bb6 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -120,6 +120,19 @@ struct dpaa2_eth_swa { #define DPAA2_FD_FRC_FASWOV 0x0800 #define DPAA2_FD_FRC_FAICFDV 0x0400 +/* Error bits in FD CTRL */ +#define DPAA2_FD_CTRL_UFD 0x00000004 +#define DPAA2_FD_CTRL_SBE 0x00000008 +#define DPAA2_FD_CTRL_FSE 0x00000010 +#define DPAA2_FD_CTRL_FAERR 0x00000020 + +#define DPAA2_FD_RX_ERR_MASK (DPAA2_FD_CTRL_SBE | \ + DPAA2_FD_CTRL_FAERR) +#define DPAA2_FD_TX_ERR_MASK (DPAA2_FD_CTRL_UFD | \ + DPAA2_FD_CTRL_SBE | \ + DPAA2_FD_CTRL_FSE | \ + DPAA2_FD_CTRL_FAERR) + /* Annotation bits in FD CTRL */ #define DPAA2_FD_CTRL_ASAL 0x00020000 /* ASAL = 128 */ #define DPAA2_FD_CTRL_PTA 0x00800000 @@ -177,7 +190,7 @@ struct dpaa2_fas { /* L4 csum error */ #define DPAA2_FAS_L4CE 0x00000001 /* Possible errors on the ingress path */ -#define DPAA2_ETH_RX_ERR_MASK (DPAA2_FAS_KSE | \ +#define DPAA2_FAS_RX_ERR_MASK (DPAA2_FAS_KSE | \ DPAA2_FAS_EOFHE | \ DPAA2_FAS_MNLE | \ DPAA2_FAS_TIDE | \ @@ -191,7 +204,7 @@ struct dpaa2_fas { DPAA2_FAS_L3CE | \ DPAA2_FAS_L4CE) /* Tx errors */ -#define DPAA2_ETH_TXCONF_ERR_MASK (DPAA2_FAS_KSE | \ +#define DPAA2_FAS_TX_ERR_MASK (DPAA2_FAS_KSE | \ DPAA2_FAS_EOFHE | \ DPAA2_FAS_MNLE | \ DPAA2_FAS_TIDE) -- 2.11.0