From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00080.outbound.protection.outlook.com [40.107.0.80]) by dpdk.org (Postfix) with ESMTP id 1DD831C435; Fri, 6 Jul 2018 10:12:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EISB5PGDWfeiuYZX2AudSn7MbeOKxT5/3ozuIetq9x4=; b=Zdbt2xH7VapvuNqSb7qH3Bab0ch064eNeFVtoE8e7yd3/UWQC050wIzQyHEYkI186WclFyzQW/A1WhK28iruCP+gOAw2J6ywag8sXwR/rMq1SAbCxHRhC7KVHK/SiwNypiyACGtTYhdx6BFGBHJ+rafoahHbZpPofYpyhFN6tmA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0755.eurprd04.prod.outlook.com (2a01:111:e400:8411::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.23; Fri, 6 Jul 2018 08:11:59 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: shreyansh.jain@nxp.com, stable@dpdk.org Date: Fri, 6 Jul 2018 13:40:00 +0530 Message-Id: <1530864613-11754-3-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530864613-11754-1-git-send-email-hemant.agrawal@nxp.com> References: <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> <1530864613-11754-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR01CA0076.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::16) To AM2PR04MB0755.eurprd04.prod.outlook.com (2a01:111:e400:8411::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7def8303-28d1-4d17-2e08-08d5e3182600 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0755; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 3:t04RyluLEPHfJVOXfHFAcwXocnFFwZFvVZqBrOf5xJJodS7p6LanVfmmVkfAgrNLGJ/NeDi6ivxFQ1AmOD22B2/3t4MpkWaIQGhZeOwkysDV0vdpKwqbP3DpbwSQ9f7lLXHQDrZpjZn7QJjZPFA9W/uaoYLurybQYPtM32fV96TM7asxX8VaxR/vJ/ty7WOhV7oQ0E+T+ylbuio2uIXqHz2k12/WPV9H2GYndlfoxovJzbE89EwMBv4ElCXHCvsC; 25:chkXCfu6A5+2aV6GOmQP5QcZ9P8vw2E4mZj6Bj1b7pM2oCCfUARid+cbq1rr4832jwYym9rtXL3Lnk5+0b4j+ldypC7+rzf/FA0AoK+orqPFLXytW+p8F8zs0+ML3gptI5yCCXQ428+OZl5sWJbIZqbTE3DKsU/ukYj39DtLtyU3jr0MI0OCQrT0y/7rme618oY7RU9efLlAI2p+OrbbTpK3Gu6Kim7BVrwhpn194gJq+/oqPM3EQ6v6EpZR5mLV73/w3IDpr86JftKwlrecctRdkY65Ebp0OqxntK5s7PGKVu+NxIDlwueA06267U/C+0t20q3lVU65UH4Zy6CHIg==; 31:BNe4k68US/8nz7rj5TLkZcLZ9cCbYHvagDZcYsKNeOS5yN5/xfke3+/fz5kWWaJ7taZJfooO+8Q09c3EjjxGE8Iz99oG6E6Hn95PPxiyayQCrJVywMklIgmJkgZT7WmIH/Q/107L/9Y1Gsu5/8rklYybIF+0u7nAfOKK3q3NnXwcRCf1Lx6TFBCN1l/UrkN3fmDND9uFgD3IbnJrNAaxvMIPnByvYRFtzu6gqoXN+5I= X-MS-TrafficTypeDiagnostic: AM2PR04MB0755: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 20:ybMOhB8DsDtxtzMf8bBBMQxkSGhdvNJsiVLvVYNECVBaO+3ESZ4bNu2Y3tXUqlAOqOxXBFsGvG6AA1q0V2YE+IGxwSh2qR4MDVgBRoV7v8mBc8pIq0cD/sImLTWoozddLdDwxOt+kNkfq9lCwfdzuflCWjnp9gpbUwTxy6ct2ntvMAzDl2FoXRkBqYCGkReFFN17v11pzFzSfz9dPDlotcTsg2hkWNIi7TayYlz2/mYYNRc8r24QJ1esXyZn5cObV8obH/gJf3/EFnBW0xPfY3XRYtre0KL/R8hMDXvnrkv482u+4y56rW0dGflqKYmV7bvZn2Kxeuzbt/L+JEBEzC/0t7TbgcpGHOYIilwNPzAYPlRq6qvIHWAguQOTuNjo/50Xyb4i2A17Haqc7GGJA3jhEpHCk765B6DZEOJnEc6fyf6NCluOnOfNC/406ekc0n4gomFa2x7yMOhEQVl6J/n1Ux/UTKbrr5Nu4dfj3T9y5zYQv2zqCbPV1UQy1XES; 4:zZzpPgtdM01r1K54Of+AjatzM8YIfCSGi5R6Vc/cXiICjb8N7pSC2Rdf7IB6Mn//DeQvHF4Ai/ur78s/gAHqt8K5s4s5OYNs8vBx8KHT+9+asHbThEbTWED5ruK+yH8lxqLxAZRS1SFWTZQ44UU6mRSFGM5mEbQ070uWdbooG42eQMWaCmHJ7qBEqtg06WOc9kkDsIKQYRtbg+LHz2oQe1tXqIgy+uvBk3xn0beTBBLQe96Bv7XXtPV4MeRDwKdUIzvhokG8CPGRPHk4cQtqLCZtiNb54kTt6YG7JzR7KGCQOGVkktSgoiBPnVEZnHkN X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM2PR04MB0755; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0755; X-Forefront-PRVS: 0725D9E8D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(136003)(366004)(346002)(376002)(199004)(189003)(956004)(66066001)(446003)(6116002)(2616005)(476003)(5009440100003)(6916009)(76176011)(186003)(16586007)(16526019)(105586002)(478600001)(86362001)(450100002)(44832011)(106356001)(3846002)(6666003)(4326008)(486006)(11346002)(6486002)(2906002)(25786009)(305945005)(47776003)(50466002)(2361001)(7736002)(5660300001)(6512007)(48376002)(8936002)(68736007)(36756003)(97736004)(55236004)(6506007)(53936002)(26005)(51416003)(50226002)(8676002)(2351001)(81156014)(81166006)(386003)(52116002)(316002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0755; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0755; 23:Nz2+e0cZ9FockyW39oVOuIMQMz0RrvF8WhZw44hSz?= =?us-ascii?Q?0hCPxwxaotOcn7bblFMKXimSj8+JnhA/w5skF99L6HTlrp2rEkIjo+G3kwvE?= =?us-ascii?Q?SnyMp8oSgWfjLQLmtPjqVmjUHVhmDjaF6Zb62omHgDwjs/iOGqY6dP1H1doI?= =?us-ascii?Q?81yXV2EOeWg9olin+oq2KnoYLvLp+P8tPkM6evrXFW3wg41QzXvHDAdEaCYX?= =?us-ascii?Q?a+75ePlGy6+hqEI3tsGeuDzZQcq1h6LulP9ffV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fGHuwLCehPv7YOpfGKOTlSRrSWaXvCwwuC3swt7obRVtqtPpK2MxG+bmvrMKqzDKJxEM8Ugi0THJVHQ==; 5:Ty2Q8kXu8OT9FIXXzfsrd0oobMII7iAy/qnccidZ6nyTe+HQxNNQRE6BLF8+nMHgTNXJ9Ji6pK6yJNSTtMi6ewzMo/vcqhm9VI6ZM/bnarEZ08COlf9qcTU1UogHlFOurSkklKuFliowBB10rzTfHAyb1fQ1SA/5FV3JBhH5GV4=; 24:Kl2Ef144uv8fsMH2t1QF97FreBa45RyA/PgxDFAhu3SawjQU4JOBbfC5fc7Rq5jZ1LGKKosWp1fp86O2uaHEaYoA+n0JqTs+WCNtP5UzKok= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 7:wJToOijjDRWsQhiVFIFH7fWztvq+3Gd/HK0tiiB8Yjna57CqgOjLH3IE6oj0C4/eA/eg1D9RlFTQUdxOeP2v4yn26nBCNTG2vuvrcERxSSvfC2/AGTRM/lhrSWtxWrGVn2ZWkCDCikW6vCxodXrZgUXy5gK4hzCeJrh+xejUSCfXKBOdXM9N94Czl4UDCIxiEjYjhRVdh+Othv6Jfsj6wf43wGwWlx8pSbiwQ7bJBoMf/oeGuaXeCk1B75p5CXJQ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2018 08:11:59.0262 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7def8303-28d1-4d17-2e08-08d5e3182600 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0755 Subject: [dpdk-stable] [PATCH v3 03/16] bus/dpaa: fix the buffer offset setting in FMAN X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2018 08:12:01 -0000 The buffer offset was incorrectly being set at 64, thus not honoring the packet headroom. Fixes: 6d6b4f49a155 (bus/dpaa: add FMAN hardware operations") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/base/fman/fman_hw.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c index 0148b98..7ada7fa 100644 --- a/drivers/bus/dpaa/base/fman/fman_hw.c +++ b/drivers/bus/dpaa/base/fman/fman_hw.c @@ -16,6 +16,8 @@ #include #include +#define FMAN_SP_EXT_BUF_MARG_START_SHIFT 16 + /* Instantiate the global variable that the inline CRC64 implementation (in * ) depends on. */ @@ -422,20 +424,16 @@ fman_if_set_fc_quanta(struct fman_if *fm_if, u16 pause_quanta) int fman_if_get_fdoff(struct fman_if *fm_if) { - u32 fmbm_ricp; + u32 fmbm_rebm; int fdoff; - int iceof_mask = 0x001f0000; - int icsz_mask = 0x0000001f; struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if); assert(fman_ccsr_map_fd != -1); - fmbm_ricp = - in_be32(&((struct rx_bmi_regs *)__if->bmi_map)->fmbm_ricp); - /*iceof + icsz*/ - fdoff = ((fmbm_ricp & iceof_mask) >> 16) * 16 + - (fmbm_ricp & icsz_mask) * 16; + fmbm_rebm = in_be32(&((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rebm); + + fdoff = (fmbm_rebm >> FMAN_SP_EXT_BUF_MARG_START_SHIFT) & 0x1ff; return fdoff; } @@ -502,12 +500,16 @@ fman_if_set_fdoff(struct fman_if *fm_if, uint32_t fd_offset) { struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if); unsigned int *fmbm_rebm; + int val = 0; + int fmbm_mask = 0x01ff0000; + + val = fd_offset << FMAN_SP_EXT_BUF_MARG_START_SHIFT; assert(fman_ccsr_map_fd != -1); fmbm_rebm = &((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rebm; - out_be32(fmbm_rebm, in_be32(fmbm_rebm) | (fd_offset << 16)); + out_be32(fmbm_rebm, (in_be32(fmbm_rebm) & ~fmbm_mask) | val); } void -- 2.7.4