From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0067.outbound.protection.outlook.com [104.47.34.67]) by dpdk.org (Postfix) with ESMTP id 37E941B024 for ; Fri, 9 Mar 2018 09:43:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QKyYy1kkwfKx9l4ARnmnWptndasexFQ20D9tzCt61as=; b=MCJ3s8r4Cr9yap8SZeZm5egyck0EFy6/eZuoi1Mc5j4jLQBWUx+FxDHL2nM2p6mWAou17mAJW5Rjvb85PkpK+/iz1BsV6+0fslz2MToitxVLBDrc+cx51fZhaUfcfZLvgo4hvIv5GVm0XB541uu3315+8LulWvlO/CpnzkVDB50= Received: from wallaby-smavila.amd.com (202.56.249.162) by MWHPR12MB1517.namprd12.prod.outlook.com (2603:10b6:301:b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.12; Fri, 9 Mar 2018 08:43:24 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 9 Mar 2018 03:42:32 -0500 Message-Id: <1520584954-130575-16-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> References: <1515145938-97474-1-git-send-email-Ravi1.kumar@amd.com> <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: BM1PR0101CA0057.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::19) To MWHPR12MB1517.namprd12.prod.outlook.com (2603:10b6:301:b::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8dd61824-5034-4bb7-1fe1-08d58599d2f0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:MWHPR12MB1517; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1517; 3:WETE6YlgNGizXx7a7SxkZ9GVMIvprl9IqKeECw2ES524hOZchSBYl3xNMqMPScrlVM61htY//IfaNdtBfHZdgPd//2RISk92D/JXvq9jYuZAw1n/wCXSd9/XEgajdIa0EC1bhcxR7oWNuzkgs+qO4DKoFf36f7SCpfUWaKxg/jA5QWO4sw+J4C9rgEx2ZdeloSsEp6J+WsqXH2LSXp50FJ4Db5/WDHnK6ERMNDhDNhmqlWZz9e6Cik7zXFTxHaF4; 25:NvPOrLaFiZJe0yy5YhKEWeeHaSTCRvO+ZFhOmNZ/+awasd/risgX63mJh4MHJJAoUf/seXwutvCXtyv/J4nRqcLm6ghrx2hPbSwH0phZY7JUgUoCO+bqm73dCaap7uDZorrd+1qmSRZKNxfmGMrkarr2Ah2/Y8V/qH0JXyWf4JANXJrGmQkFa/i/2ZqvcIfwC/hYw2Q3hmy7KGop8yrHL0V9J7mSRt5kYNfr3nBG4V0M1Acgf7KTPNMh8dSnTBX/tHPXhtGYw3DoBc2+06g8p63NU8yhX51pXWa/5Ya6CCDCTLPkEZ8cej71KuM3xv+vcYnXjaLVkOMMiexOvTYQrw==; 31:4fVBgrWW0cdN3Zwb4purq0P5+JCeHhbdhoMxwWyWwabmvo1HqqzADZ/47K9UwdSZBPDgkPsEn+bmQvvY0IqKergW/Mt8/NSPqgcIzQPjzmpuLxleAJl6vaR+WdLaC644kR/yMq0np5vz3e9klBndUIt1eDW1wZjvdPaDIuzODEf62HMHd5NnQoVUXizR9GXor+KhrFQtoGduXuvohcxBMzfaKG9xxHZ+LEFdi3RTzGw= X-MS-TrafficTypeDiagnostic: MWHPR12MB1517: X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1517; 20:w8O0d2ZbbqUXLfCI9lKItaTS2qLLHwh7D1AcH7I+93MysZYNeFj1IKk1lgK+6ogIgmaZTdaNvsmeyHbH4yYBhouBUoFe8Dd3xFsmaYOir8i4cS8JAjCRsqWAopgtJCx9uAGs7VW7FCJ5KP6p7wW1ZziPGd2+9KoE4YRNRLW+LBQW9xYZyheCt2RK5BcTsA2f2KtCY/68KtSvS11Qzs6s4j2t5/nseuuu9jhicYT919gpEWYzBPyUc+89KcYiTqg+YBE12G0lhSjY/IZ1fLIXdqYIIgbDrFG9S/IRAXsJ6plJ8YvZV/BFT3DRcxRaG73iEVlNO9ECB2e0o3hRTZNtA2IeZ232h8jiBH1JiTWbyvi/KBQtou1IDImk9mkmgMgfZJSVrdxzD1kkQ/KS1RXwUKRLIAS4Kt3H8lC4dGK0Fi4/N3qcb593rEQDW/VQd/EiY8CP7KCrVbJXdleTk04U9vX3+Np6jgPjmDPFOo6UoFtr3F7ofAmsnOgxzYZwlPjI; 4:OIWD+ECUi2UfxN9xy/r8qzErPMdiGrKVX6T2d5vaUb7WIu9c5OheAgl9Wnrn8EBUTk5HqR1I9ol3gbZznk4ONr2Kj6UblP6yRxYeFALau/n9MXJyzwiDexCq5Ivfsio+mdCvnMMQKI5B7fmZpeLQdkcHoTFtzDrTGrsJR4DN1Q5HSVlzNxoPKNGNYA8Lr/6DBHqrIxjP0+dJF6/ZK+3kez385T+GtzFUtl0C0n8vJgfs2bby1pJriUrabRYQvKg2fomGlplLnqsMMV+bU9BMiubmaG8VOUo6Tc+/WEuCYd9lF+8Deo8aFPSK+dVxeDrH X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231220)(944501244)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:MWHPR12MB1517; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1517; X-Forefront-PRVS: 0606BBEB39 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39380400002)(396003)(39860400002)(366004)(376002)(199004)(189003)(305945005)(50226002)(386003)(6346003)(26005)(36756003)(97736004)(25786009)(7736002)(50466002)(8936002)(4326008)(16586007)(86362001)(81156014)(81166006)(6666003)(2950100002)(6916009)(16526019)(186003)(5660300001)(59450400001)(316002)(8676002)(76176011)(52116002)(51416003)(7696005)(53416004)(48376002)(478600001)(106356001)(6116002)(3846002)(68736007)(2351001)(2906002)(6486002)(66066001)(47776003)(105586002)(72206003)(53936002)(2361001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1517; H:wallaby-smavila.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1517; 23:aCGNdaRtLE3B6aTrzEGD3gQKRa4lBL1PGDo/EdaKP?= =?us-ascii?Q?VhMBoeXMHNyb+VwfVUMt+ikF/uZlwCW7RuAJlGPYhlfSda7Q1yu1wnUSV8tY?= =?us-ascii?Q?XCKEjIfksjZpmj060G3mtkjQQ0PwSHzry8IB9kLI2nYs2veyNHizqQMEyccM?= =?us-ascii?Q?FvKGSxVfwLayTQ5jtJ5AV0KApy74GY7isZWu+EGheYDZVUxUv5tUqyP6AXXY?= =?us-ascii?Q?Li6wdFdrlNg0St2T9KxH0Zp09oChakMw5KhYC214eK/o0gA+V2DhTknVIrMK?= =?us-ascii?Q?s8opabEpo0HL8/IEvWkVt5OufDvAhrzEYsmCNS2qm/5YBW4LpcEi96mdbqn/?= =?us-ascii?Q?2W0b8DgPCtR4P/ltBdqwo+pW7G8xVR/rj4TFkjZkKYzI2wnFWLCGP+JhyQ3O?= =?us-ascii?Q?IwEpN5DgcvlcXK4va8RsJAjf56oSNVtLlwoT6UmEXx0o7MPZ1V3oEbb+gL6G?= =?us-ascii?Q?7xJKxz2tija32DuB9lxhDLnjfAZGAywkqcfJGmRZ2piMMz4BvDDVTMNT+ic9?= =?us-ascii?Q?xT/+XwhqIQxyMmjv0heuJKll0xfY/rm6NsT9zumN+XM4KJJFlMPURDGDBFet?= =?us-ascii?Q?W4cU8neDBa2mSuYNc4F9S/fcrc3k8qSMRayILv0wJ2F4heMtNFlgWTvXwdiA?= =?us-ascii?Q?oTguCmXy9YSSPMyRp3Z1SbgZl9Fdf0HHsUTfLSUkbrJDVTNvm8WtGYGkCwAM?= =?us-ascii?Q?HNmz3jUwxeEJyz4Th1OiLzP6Ehaouc9SlI186G+3d0s8BdGMxeKsFV8okJbw?= =?us-ascii?Q?LX1edNc0+Y8bjPOxH0F1hPFOUpcbFrmlRt5s9oq0Him7P6+PKB+tz64qTVkd?= =?us-ascii?Q?PVyDDPA2m6OValCeU7TPZsDk4cnI4+eJVI49HvtqRehlRDuzEyC5CTgKlWHQ?= =?us-ascii?Q?bS4/B1c98PPq4JWg3FXvMJQvU5VeYFTfRaKLnP+WoEtGdFoOxo7Thpq8QpIy?= =?us-ascii?Q?y7HTbyn5TcjkI3toKoNycdwMNnZWkLaV1cL5CWTvnP47vq/VYozWH/j+N20k?= =?us-ascii?Q?doWZjL794jja1j22dfOn9ue5Owfby/Tm6xqAb39qhHeECwJGAX84UENJubVN?= =?us-ascii?Q?KMbZzM/MKduEqYLNd9nTZ51NDxILbI4w0dO9JX+Gi8jlaQWypsCQrn1CCiWt?= =?us-ascii?Q?b/7vLdP9v5qnxlfLYH+ADKcxw5J4M3PSH9F4mo/XEyKTBafxaeopVuT+0y5m?= =?us-ascii?Q?K7cnydOuy5t+18HNO7SVlmdWmguBlhDfKoy?= X-Microsoft-Antispam-Message-Info: ZT0u4tunQTNCPbEO7XisUNegvLXkVd8IMyFauIpuh4aZrDCoVl9vMP8CMOeR/oipGaruTJ2o4LUBV9Gc2DL4faz2ocolmr3rzKXKT5b3Ai8IE0IugX1WU5+kEpvkF7l0ftwdefupmct13lhd4RtwBJ/mFB00FzVapcDHyyZSS0yI7LR932BQaHG+RHLhgLKk X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1517; 6:14YynDiqtRu/5FWIsXPLxIeURXmA48wxxxxdZuVeUBisAU7qj0BMFda/J/ci/0PX+5Lh45PlE9A6mxa6mMR7ulysZkNePz//w8YFJFLj2b3mf5va9D3OzjhBKmJMGjwfTX4f0hcYuIJvIaYmRQAx7BHoADtrb2M819hYPp12UvLZ9PB14On/HZyFGMOSPlIM49sseVrjbfOaoz5Q0fpKAjQD/a6w4xz6sIxlD8s8wF84UgffopWSWq62wmB2O7sF5hnBvaDFVzteXM2s42oClM7RTdnoX275CuJT92TjUaIzRiSHppiEkpYoyi4LJEzcNdsTSjoTeQoAsNCa04ow8xFL4CtostjKk4I9f6vONEU=; 5:7+PpAj4HLvVau55dVcxZeQNHl7qL2mtT49muaEja1vq64wqwFWtosVncKj0a+Jf0SOxuNoHjCqfZ3ljW9J1OvnK/uWqs1dplXR5fmQs5lVFxt97rPuXdyr4gf0hJeZg3ULIKzIUj9GDjk4ko0epWsNePdjPvHi7vH87oyHgmHZ8=; 24:KlaFAlnQICn7BlBXeHOvzx6Vod3Lria084vUZIOUfXpmnh8iWtD3dNi2IJ5RA5Numr04S6z6eXY1w1LsounTwGKq8sY7Atm+DwDY/yuuP8c=; 7:nyeJNh8rltVMYviIdKa6O8vRog2cbYfrrXopmYIi4f94LS+iG+txL5t8GAZrH2ihZTRMjR0gTk7Lh4VLS72Yd7j3g7aYqkkZSxeTYCRDrRgxYaB3msxQHmAhKjMHKcgZebUrdp5FdfOKp8q/SjaxuKY3ntaaVnyqiXnTUQ3SoL8AaOAEt6uY4xbKRNKF/LVhhbBtW3/Q+TfESu4OBQuOBQnK2XVgAnt/j5OQOE2h+hke5C3ZvgObQmQ1DdsHjybA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1517; 20:MHfGNJEO0KSgOlYa4Rpf4/Wao1IkGebRD2VVsOVuQlMfnr5ckeRjAdaXnpdiCN/fyHHRKh+QjREBbgNRZF6Bh74ulYMf6RDA7tM9t2diFjrpcnJ4RgY9PscXhHiBouTxNysOS+1E/Jx0HDbf5ew2U8FhGNf5w/EYgL20MKgz5OSQPhUJfUEBUTMHnQee8CornNi2OTS86ca80kHw1K3aVdjIjFA2bNCPEdubd/s2Qe8YvF4DksYcpQ5OOys6beNF X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2018 08:43:24.8392 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8dd61824-5034-4bb7-1fe1-08d58599d2f0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1517 Subject: [dpdk-dev] [PATCH v3 16/18] net/axgbe: add support for build 32-bit mode 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: Fri, 09 Mar 2018 08:43:28 -0000 Signed-off-by: Ravi Kumar --- doc/guides/nics/features/axgbe.ini | 1 + drivers/net/axgbe/axgbe_common.h | 53 ++++++++++++++++++++++---------------- drivers/net/axgbe/axgbe_ethdev.c | 10 ++++--- drivers/net/axgbe/axgbe_ethdev.h | 8 +++--- drivers/net/axgbe/axgbe_rxtx.c | 12 ++++----- drivers/net/axgbe/axgbe_rxtx.h | 4 +-- 6 files changed, 50 insertions(+), 38 deletions(-) diff --git a/doc/guides/nics/features/axgbe.ini b/doc/guides/nics/features/axgbe.ini index 042ff1e..ab4da55 100644 --- a/doc/guides/nics/features/axgbe.ini +++ b/doc/guides/nics/features/axgbe.ini @@ -15,4 +15,5 @@ L3 checksum offload = Y L4 checksum offload = Y Basic stats = Y Linux UIO = Y +x86-32 = Y x86-64 = Y diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index 294f2e4..189139b 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -1507,7 +1507,7 @@ do { \ * register definitions formed using the input names */ #define AXGMAC_IOREAD(_pdata, _reg) \ - rte_read32((void *)((_pdata)->xgmac_regs + (_reg))) + rte_read32((uint8_t *)((_pdata)->xgmac_regs) + (_reg)) #define AXGMAC_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(AXGMAC_IOREAD((_pdata), _reg), \ @@ -1515,7 +1515,8 @@ do { \ _reg##_##_field##_WIDTH) #define AXGMAC_IOWRITE(_pdata, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xgmac_regs + (_reg))) + rte_write32((_val), \ + (uint8_t *)((_pdata)->xgmac_regs) + (_reg)) #define AXGMAC_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1531,8 +1532,8 @@ do { \ * base register value is calculated by the queue or traffic class number */ #define AXGMAC_MTL_IOREAD(_pdata, _n, _reg) \ - rte_read32((void *)((_pdata)->xgmac_regs + \ - MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg))) + rte_read32((uint8_t *)((_pdata)->xgmac_regs) + \ + MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg)) #define AXGMAC_MTL_IOREAD_BITS(_pdata, _n, _reg, _field) \ GET_BITS(AXGMAC_MTL_IOREAD((_pdata), (_n), (_reg)), \ @@ -1540,8 +1541,8 @@ do { \ _reg##_##_field##_WIDTH) #define AXGMAC_MTL_IOWRITE(_pdata, _n, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xgmac_regs + \ - MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg))) + rte_write32((_val), (uint8_t *)((_pdata)->xgmac_regs) +\ + MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg)) #define AXGMAC_MTL_IOWRITE_BITS(_pdata, _n, _reg, _field, _val) \ do { \ @@ -1557,7 +1558,7 @@ do { \ * base register value is obtained from the ring */ #define AXGMAC_DMA_IOREAD(_channel, _reg) \ - rte_read32((void *)((_channel)->dma_regs + (_reg))) + rte_read32((uint8_t *)((_channel)->dma_regs) + (_reg)) #define AXGMAC_DMA_IOREAD_BITS(_channel, _reg, _field) \ GET_BITS(AXGMAC_DMA_IOREAD((_channel), _reg), \ @@ -1565,7 +1566,8 @@ do { \ _reg##_##_field##_WIDTH) #define AXGMAC_DMA_IOWRITE(_channel, _reg, _val) \ - rte_write32((_val), (void *)((_channel)->dma_regs + (_reg))) + rte_write32((_val), \ + (uint8_t *)((_channel)->dma_regs) + (_reg)) #define AXGMAC_DMA_IOWRITE_BITS(_channel, _reg, _field, _val) \ do { \ @@ -1590,16 +1592,18 @@ do { \ _prefix##_##_field##_WIDTH, (_val)) #define XPCS32_IOWRITE(_pdata, _off, _val) \ - rte_write32(_val, (void *)((_pdata)->xpcs_regs + (_off))) + rte_write32(_val, \ + (uint8_t *)((_pdata)->xpcs_regs) + (_off)) #define XPCS32_IOREAD(_pdata, _off) \ - rte_read32((void *)((_pdata)->xpcs_regs + (_off))) + rte_read32((uint8_t *)((_pdata)->xpcs_regs) + (_off)) #define XPCS16_IOWRITE(_pdata, _off, _val) \ - rte_write16(_val, (void *)((_pdata)->xpcs_regs + (_off))) + rte_write16(_val, \ + (uint8_t *)((_pdata)->xpcs_regs) + (_off)) #define XPCS16_IOREAD(_pdata, _off) \ - rte_read16((void *)((_pdata)->xpcs_regs + (_off))) + rte_read16((uint8_t *)((_pdata)->xpcs_regs) + (_off)) /* Macros for building, reading or writing register values or bits * within the register values of SerDes integration registers. @@ -1615,7 +1619,7 @@ do { \ _prefix##_##_field##_WIDTH, (_val)) #define XSIR0_IOREAD(_pdata, _reg) \ - rte_read16((void *)((_pdata)->sir0_regs + (_reg))) + rte_read16((uint8_t *)((_pdata)->sir0_regs) + (_reg)) #define XSIR0_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XSIR0_IOREAD((_pdata), _reg), \ @@ -1623,7 +1627,8 @@ do { \ _reg##_##_field##_WIDTH) #define XSIR0_IOWRITE(_pdata, _reg, _val) \ - rte_write16((_val), (void *)((_pdata)->sir0_regs + (_reg))) + rte_write16((_val), \ + (uint8_t *)((_pdata)->sir0_regs) + (_reg)) #define XSIR0_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1635,7 +1640,7 @@ do { \ } while (0) #define XSIR1_IOREAD(_pdata, _reg) \ - rte_read16((void *)((_pdata)->sir1_regs + _reg)) + rte_read16((uint8_t *)((_pdata)->sir1_regs) + _reg) #define XSIR1_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XSIR1_IOREAD((_pdata), _reg), \ @@ -1643,7 +1648,8 @@ do { \ _reg##_##_field##_WIDTH) #define XSIR1_IOWRITE(_pdata, _reg, _val) \ - rte_write16((_val), (void *)((_pdata)->sir1_regs + (_reg))) + rte_write16((_val), \ + (uint8_t *)((_pdata)->sir1_regs) + (_reg)) #define XSIR1_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1658,7 +1664,7 @@ do { \ * within the register values of SerDes RxTx registers. */ #define XRXTX_IOREAD(_pdata, _reg) \ - rte_read16((void *)((_pdata)->rxtx_regs + (_reg))) + rte_read16((uint8_t *)((_pdata)->rxtx_regs) + (_reg)) #define XRXTX_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XRXTX_IOREAD((_pdata), _reg), \ @@ -1666,7 +1672,8 @@ do { \ _reg##_##_field##_WIDTH) #define XRXTX_IOWRITE(_pdata, _reg, _val) \ - rte_write16((_val), (void *)((_pdata)->rxtx_regs + (_reg))) + rte_write16((_val), \ + (uint8_t *)((_pdata)->rxtx_regs) + (_reg)) #define XRXTX_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1691,7 +1698,7 @@ do { \ _prefix##_##_field##_WIDTH, (_val)) #define XP_IOREAD(_pdata, _reg) \ - rte_read32((void *)((_pdata)->xprop_regs + (_reg))) + rte_read32((uint8_t *)((_pdata)->xprop_regs) + (_reg)) #define XP_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XP_IOREAD((_pdata), (_reg)), \ @@ -1699,7 +1706,8 @@ do { \ _reg##_##_field##_WIDTH) #define XP_IOWRITE(_pdata, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xprop_regs + (_reg))) + rte_write32((_val), \ + (uint8_t *)((_pdata)->xprop_regs) + (_reg)) #define XP_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1724,7 +1732,7 @@ do { \ _prefix##_##_field##_WIDTH, (_val)) #define XI2C_IOREAD(_pdata, _reg) \ - rte_read32((void *)((_pdata)->xi2c_regs + (_reg))) + rte_read32((uint8_t *)((_pdata)->xi2c_regs) + (_reg)) #define XI2C_IOREAD_BITS(_pdata, _reg, _field) \ GET_BITS(XI2C_IOREAD((_pdata), (_reg)), \ @@ -1732,7 +1740,8 @@ do { \ _reg##_##_field##_WIDTH) #define XI2C_IOWRITE(_pdata, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xi2c_regs + (_reg))) + rte_write32((_val), \ + (uint8_t *)((_pdata)->xi2c_regs) + (_reg)) #define XI2C_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c index 9e5114b..d4d437a 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -712,10 +712,12 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) pdata->pci_dev = pci_dev; pdata->xgmac_regs = - (uint64_t)pci_dev->mem_resource[AXGBE_AXGMAC_BAR].addr; - pdata->xprop_regs = pdata->xgmac_regs + AXGBE_MAC_PROP_OFFSET; - pdata->xi2c_regs = pdata->xgmac_regs + AXGBE_I2C_CTRL_OFFSET; - pdata->xpcs_regs = (uint64_t)pci_dev->mem_resource[AXGBE_XPCS_BAR].addr; + (void *)pci_dev->mem_resource[AXGBE_AXGMAC_BAR].addr; + pdata->xprop_regs = (void *)((uint8_t *)pdata->xgmac_regs + + AXGBE_MAC_PROP_OFFSET); + pdata->xi2c_regs = (void *)((uint8_t *)pdata->xgmac_regs + + AXGBE_I2C_CTRL_OFFSET); + pdata->xpcs_regs = (void *)pci_dev->mem_resource[AXGBE_XPCS_BAR].addr; /* version specific driver data*/ if (pci_dev->id.device_id == 0x1458) diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h index 4091d1a..91260ca 100644 --- a/drivers/net/axgbe/axgbe_ethdev.h +++ b/drivers/net/axgbe/axgbe_ethdev.h @@ -567,10 +567,10 @@ struct axgbe_port { struct axgbe_version_data *vdata; /* AXGMAC/XPCS related mmio registers */ - uint64_t xgmac_regs; /* AXGMAC CSRs */ - uint64_t xpcs_regs; /* XPCS MMD registers */ - uint64_t xprop_regs; /* AXGBE property registers */ - uint64_t xi2c_regs; /* AXGBE I2C CSRs */ + void *xgmac_regs; /* AXGMAC CSRs */ + void *xpcs_regs; /* XPCS MMD registers */ + void *xprop_regs; /* AXGBE property registers */ + void *xi2c_regs; /* AXGBE I2C CSRs */ /* XPCS indirect addressing lock */ unsigned int xpcs_window_def_reg; diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c index c616fc1..4c38e47 100644 --- a/drivers/net/axgbe/axgbe_rxtx.c +++ b/drivers/net/axgbe/axgbe_rxtx.c @@ -192,9 +192,9 @@ int axgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, rxq->queue_id = queue_idx; rxq->port_id = dev->data->port_id; rxq->nb_desc = rx_desc; - rxq->dma_regs = pdata->xgmac_regs + DMA_CH_BASE + - (DMA_CH_INC * rxq->queue_id); - rxq->dma_tail_reg = (volatile uint32_t *)(rxq->dma_regs + + rxq->dma_regs = (void *)((uint8_t *)pdata->xgmac_regs + DMA_CH_BASE + + (DMA_CH_INC * rxq->queue_id)); + rxq->dma_tail_reg = (volatile uint32_t *)((uint8_t *)rxq->dma_regs + DMA_CH_RDTR_LO); rxq->crc_len = (uint8_t)((dev->data->dev_conf.rxmode.hw_strip_crc) ? 0 : @@ -509,9 +509,9 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, txq->desc = tz->addr; txq->queue_id = queue_idx; txq->port_id = dev->data->port_id; - txq->dma_regs = pdata->xgmac_regs + DMA_CH_BASE + - (DMA_CH_INC * txq->queue_id); - txq->dma_tail_reg = (volatile uint32_t *)(txq->dma_regs + + txq->dma_regs = (void *)((uint8_t *)pdata->xgmac_regs + DMA_CH_BASE + + (DMA_CH_INC * txq->queue_id)); + txq->dma_tail_reg = (volatile uint32_t *)((uint8_t *)txq->dma_regs + DMA_CH_TDTR_LO); txq->cur = 0; txq->dirty = 0; diff --git a/drivers/net/axgbe/axgbe_rxtx.h b/drivers/net/axgbe/axgbe_rxtx.h index 45aaf89..e7b3cfd 100644 --- a/drivers/net/axgbe/axgbe_rxtx.h +++ b/drivers/net/axgbe/axgbe_rxtx.h @@ -202,7 +202,7 @@ struct axgbe_rx_queue { /* Ring physical address */ uint64_t ring_phys_addr; /* Dma Channel register address */ - uint64_t dma_regs; + void *dma_regs; /* Dma channel tail register address*/ volatile uint32_t *dma_tail_reg; /* DPDK queue index */ @@ -249,7 +249,7 @@ struct axgbe_tx_queue { /* Physical address of ring */ uint64_t ring_phys_addr; /* Dma channel register space */ - uint64_t dma_regs; + void *dma_regs; /* Dma tail register address of ring*/ volatile uint32_t *dma_tail_reg; /* Tx queue index/id*/ -- 2.7.4