From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0044.outbound.protection.outlook.com [104.47.34.44]) by dpdk.org (Postfix) with ESMTP id D2D7E1B231 for ; Fri, 5 Jan 2018 10:53:18 +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=cTMVESyFCWPYDWm0RFCgdXv1bB2mPBsaeP6ROzZBimE=; b=FdSy4xb1vOwWu9jlja6cW07mORlioSURdnddQOqFBbHhLE2IMXHwI7r42fYIAU7blG80HGEtRIjujjNncc1aVzAlbMPYVNzBsLIUDOLEln2KdB8XgJeZBdVOVo2/orbeFgpHEUbIRWIHCBj96qbCaWyrwR0BdDa3AlYZo8MK264= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by BN6PR12MB1506.namprd12.prod.outlook.com (10.172.24.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 5 Jan 2018 09:53:15 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 5 Jan 2018 04:52:18 -0500 Message-Id: <1515145938-97474-16-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515145938-97474-1-git-send-email-Ravi1.kumar@amd.com> References: <1512047472-118050-1-git-send-email-Ravi1.kumar@amd.com> <1515145938-97474-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: BM1PR0101CA0031.INDPRD01.PROD.OUTLOOK.COM (10.174.221.17) To BN6PR12MB1506.namprd12.prod.outlook.com (10.172.24.147) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: db55c03f-f3bb-45fb-44dd-08d554222513 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BN6PR12MB1506; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1506; 3:scKXyjkG/2TDsgpN/MrCqu44Vk+9M7QPsYwPK0vkwz1qOlMekjTT31xV8IGQ2b39zQptHEgx5b/UOY6AmkBiplIGbXQl7v1zmu4e6Zsn3zeBdWDvM/votuDgyHYQZccwOiZ1LT6hK7OdUrvg437ySnHFv6YWYPHQ7PAqu7PB/rPlTAdESiYtaHOIxvw8JIctuFdtV976QwN0a/4By5iGwr+v7eP54cBvMAbyAOPL7CU6KlHPW3+z0cfwbv0JZueA; 25:xykOnlxKDqSFbGdn6Qx2NPFzGaJzjBf/BtyqSCFWUUeYixytmiDGHTFr0RNfFE8SUKerge/X/7MvfaetKLlTFDjcn45AlxcNBtzaHVL+wvE5tsWf37Yziof255JORJlsSYLeERenzZB2R5H5CrUc03/W4seUy6Q5c5Q5jfHd8i+ymXghQsWfGzsq0jAkqnC13ykEaqdEdM9+X9uebtPYaDml8du/Wk4o41JaE27lAbfhBd/V4Zv5tbNu8PS3wLTkqHWFX6OTrZXe+uFgIglxQpJuivbFH75CypUtPxxQf0D0amQ07LzRZMGA6Tp5DB/GTH73yFzjSryasMrwKoJJCw==; 31:pacsHvmMRmNS5X2cnITNfCF+NEUU+lo3HgFFZvlVIeoSb1HTnpSJHcCS5PtpSncNwhdFVIXTBO2munQaW3wyWfK1HBVcHv/vZ0Q+xI5E52OHqLRzQA/VydMjP+o3tzoS3n7C45C3tqgywUhvspwqYB0QAd8sSqo4lDkQwUKnlACd83tj7ZJBNlJwDAfpn2/3HyCGdDerUbDsGKswLjU0IlagBkQiJ5AOhYzFAn989i4= X-MS-TrafficTypeDiagnostic: BN6PR12MB1506: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1506; 20:YJIsoG9IeObx1V3oDKYhOnyBSgKxi2eTHQj7p1LVknIhVNZtg71SPYgLE/bqsIJFYkEEjNt94gTYZMLgm/79WMxRU1IVq1L+JQ/VX4eKDvrahoKAJrZIQJqSB5EIMYJ7ynKsjnCWzNnes0WuTZ6w3zMx15QOeNMMD5mLmGZEAgi/YQE2Mt54vC3SqtAdmpnORttmgerYiC9nKolBT90aLPZZgslN9Z/rTQ7x2AKHejtaQXxlkYQ+4VjKFSkbpQd0suqBHLPUIjFozrws2qKbQY53wOFJM1Vev3xuRLwrqx+z3N2huHndkL2rniOlsN+QhZXfazcrHwRGtG5rkcyAocdR7TqzdPOLy9YBBR/XFac+VQsfSeV1kcg6hroEcThExyuTQfAjTUgpPNWmE9FdLMsy096OODt3R7FPAnibdK5y7eYJkuBBRnywnAMyglCvGRoprXPWsj4LsVEblnWFcqoZOPui7E+tf9lct/KbYx2DdEfqqCbE4+/8XZbJQWD6; 4:drtKTy5xIAMKF8PYRyKhwGd7VAF2myILIUKOP4bIxMQ1kr09Ft+YOkNA+TzvvO54BtE4Wl/JZSVivbn8mRkRXCPuCFNp1BVLRPj1664L4BS1j7QJ5WbR7beCbf2fQ7yX17gnIo2roC7clOMgwUrw1T5V5lpmvCRsSjv1iJujqStKxLinq4rsZnzxoKLBiKXny8knD6ll5NAQLSA1yb3vunHhLc4X+Ut0ovTnslRMJDTpPyXEfszu/dPWVhkhSMHshEB1mJMMAIJkbCRr5EyG2gtzXwvZt1BKM/STlnEWuHor1jYuhvJoVVu595WzZ2HD X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231023)(944501075)(6055026)(6041268)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:BN6PR12MB1506; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR12MB1506; X-Forefront-PRVS: 05437568AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(366004)(396003)(39860400002)(376002)(199004)(189003)(105586002)(4326008)(53936002)(36756003)(68736007)(50226002)(7696005)(8676002)(51416003)(52116002)(25786009)(3846002)(106356001)(8936002)(2906002)(53416004)(6116002)(81156014)(2361001)(6486002)(81166006)(47776003)(97736004)(16586007)(316002)(66066001)(305945005)(48376002)(2351001)(478600001)(7736002)(16526018)(6916009)(2950100002)(86362001)(59450400001)(76176011)(50466002)(386003)(5660300001)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1506; 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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1506; 23:zv1cETvSxz+mBqmIBtyAoDn0oEACh774bjrwczyPB?= =?us-ascii?Q?51+oa3bSuqUhQ0Rv7BCpolbTIe8kMrIYo8nGX9r9hpMVMIsm3pmXwZwH4RDp?= =?us-ascii?Q?xfYOulJ5sejxB5ZJ2SFZQFuHykGpCyNWOSYifQkktF1vJMqOfjnUpfH36UYO?= =?us-ascii?Q?069yrfiDkgR0G/QqBqtP7tZgGBlSt1YPp0UkfvLs0gDypy9levLU/BCpkZoN?= =?us-ascii?Q?0AM0RZFpo2XlZjBIAXWOW33M7BweNvtknOZyErn6rDT6dTXQ5mLg9UET2sp7?= =?us-ascii?Q?LmcQmIFKdXBVt0F7v67auEBYBNsMEM3gsPuN1a/ggz0wPMbDtM00xtiUNyUw?= =?us-ascii?Q?wPMNWLv89BbmlwR3imEmwkGpc60GH14VtE5GfR/lkZlw3d0tVo+Ug3wlBdkh?= =?us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Pf8TRSIRYctCoGiABVz2k2sAcQajsneSmRSEWTNJJotJ2+Es+ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2018 09:53:15.9340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db55c03f-f3bb-45fb-44dd-08d554222513 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1506 Subject: [dpdk-dev] [PATCH v2 16/16] 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, 05 Jan 2018 09:53:19 -0000 Signed-off-by: Ravi Kumar --- doc/guides/nics/features/axgbe.ini | 1 + drivers/net/axgbe/axgbe_common.h | 49 ++++++++++++++++++++++---------------- 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, 48 insertions(+), 36 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..78a055d 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((void *)((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), \ + (void *)((uint8_t *)((_pdata)->xgmac_regs) + (_reg))) #define AXGMAC_IOWRITE_BITS(_pdata, _reg, _field, _val) \ do { \ @@ -1531,7 +1532,7 @@ 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 + \ + rte_read32((void *)((uint8_t *)((_pdata)->xgmac_regs) + \ MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg))) #define AXGMAC_MTL_IOREAD_BITS(_pdata, _n, _reg, _field) \ @@ -1540,7 +1541,7 @@ do { \ _reg##_##_field##_WIDTH) #define AXGMAC_MTL_IOWRITE(_pdata, _n, _reg, _val) \ - rte_write32((_val), (void *)((_pdata)->xgmac_regs + \ + rte_write32((_val), (void *)((uint8_t *)((_pdata)->xgmac_regs) +\ MTL_Q_BASE + ((_n) * MTL_Q_INC) + (_reg))) #define AXGMAC_MTL_IOWRITE_BITS(_pdata, _n, _reg, _field, _val) \ @@ -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((void *)((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), \ + (void *)((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, \ + (void *)((uint8_t *)((_pdata)->xpcs_regs) + (_off))) #define XPCS32_IOREAD(_pdata, _off) \ - rte_read32((void *)((_pdata)->xpcs_regs + (_off))) + rte_read32((void *)((uint8_t *)((_pdata)->xpcs_regs) + (_off))) #define XPCS16_IOWRITE(_pdata, _off, _val) \ - rte_write16(_val, (void *)((_pdata)->xpcs_regs + (_off))) + rte_write16(_val, \ + (void *)((uint8_t *)((_pdata)->xpcs_regs) + (_off))) #define XPCS16_IOREAD(_pdata, _off) \ - rte_read16((void *)((_pdata)->xpcs_regs + (_off))) + rte_read16((void *)((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((void *)((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), \ + (void *)((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((void *)((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), \ + (void *)((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((void *)((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), \ + (void *)((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((void *)((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), \ + (void *)((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((void *)((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), \ + (void *)((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