From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40FE3428F8 for ; Sun, 9 Apr 2023 17:28:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B06E42BFE; Sun, 9 Apr 2023 17:28:07 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2064.outbound.protection.outlook.com [40.107.102.64]) by mails.dpdk.org (Postfix) with ESMTP id 5FB0542BD9 for ; Sun, 9 Apr 2023 17:28:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vezmo1SKkyDGLub5qkUExnxfuFX/BLFY301LYlVcooO6oowKJDpJVEaZSQuUK0ETHP+V9VBfD4htT4eyNkf+DT2ibHZ9EII7RhG3Eq3QwNz0Xj58h6hXkJ03D2dj1njQn1kQ73MzX/CH6UpxXpbYS38cXFfp10dvvEgggoaD4Ivoang6D3SnZIbJqZgcPLR4OX2RaUcQiRXz/r3XaWHWxa0dyiSsGhdCMvCZe3Sf/gYbAD8o7mislYeN9qcj/JNSnUjgNicC5/Ta54ioKdsxMXgwHMdfpftlXkAjiKMA0Q67sGTnIFHhbchUlLLgAnZ9599y8x9T/ZxdAUI3UEwXUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JQElLyThe/aBZMms7kMNLodq3RscNgFxD29JYDADLsY=; b=b15/smxWcxTy8XXXsnIZmarg7ZpP2t/ZwegQKSEE//z95xzc/En/GACPClfn8S65gyXLjQGie8KvnpqX1PGsT4Lr/YBmjdFzWcZ4K8YCrjk9EhAe95hbUMT8iDHdjU+hKyD5gTvW6len+AMLUsEhMlX/mY0M24J9pz9W8IiPGtF9Hf3MImvHCvzaU7CV4pU/Q9wnTamWNINDAY3Lu4+YE5kZfdSnHLTabFT51Q0CRV+3VxN/aEYJ3eUjHuidV0OFCpusdm9qK05/pl7cDHAEASHu+D3wk7GUHRgZn9XGfuSZddq7V0PrxSjxpKfJUc7puBb0QW9L4+FkqCPMZViF6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=corigine.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JQElLyThe/aBZMms7kMNLodq3RscNgFxD29JYDADLsY=; b=lOYEcyULB7kp2cw144/p7RagJMOo7aMAZo2kPf8g23I0hjkH6px8uQ7hjhllIVh+eQqvn6MtkUemApTlzXro4dSXGqz5cmmLUBVxgG+qN4BCxvJYIcwmZ7OpZp14+TF5UHOjG23uO41hhMdeZh9+K7L+whIyMeYQrY3d2UwaTHtkEEuiYQghjj4f7VOCD4mRNIEsUcsm+7328HzmtTtJ1UCToxuWtyKQTM7DMLCpqeMnq2CQeae76Af+oquTo2fulclCe8mgq2Y2lfs+sIhIp03TgFBfhJrRCeUzVZfhy0udepdaT/of78zwQIZjm9oCJ61pYvgEhh/jH5omyWGp5Q== Received: from DM6PR12CA0005.namprd12.prod.outlook.com (2603:10b6:5:1c0::18) by SA1PR12MB6799.namprd12.prod.outlook.com (2603:10b6:806:25b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Sun, 9 Apr 2023 15:28:03 +0000 Received: from DM6NAM11FT103.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1c0:cafe::f5) by DM6PR12CA0005.outlook.office365.com (2603:10b6:5:1c0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:28:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DM6NAM11FT103.mail.protection.outlook.com (10.13.172.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.20 via Frontend Transport; Sun, 9 Apr 2023 15:28:02 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 9 Apr 2023 08:27:59 -0700 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 9 Apr 2023 08:27:57 -0700 From: Xueming Li To: Peng Zhang CC: Chaoyong He , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , "dpdk stable" Subject: patch 'net/nfp: fix 48-bit DMA support for NFDk' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:23:37 +0800 Message-ID: <20230409152529.5308-30-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT103:EE_|SA1PR12MB6799:EE_ X-MS-Office365-Filtering-Correlation-Id: bc2c2566-38cb-4610-05a3-08db390f024f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 34uPJ9JvRaTZkpWlUkF2lHBIPi41ts5ylcbXvOluOMLFzeLT+fMS3TnmCEMw4w1c61sqdmnrVeMCY7r8tOmwPuPfJm+tiVbV4CGvFP0bpTHsOp+SimFcpWi8drehD2XTvfTaX3l9h6Uudb8KYAEl5QDWIi+2hn9OfcW+6LuWA+UlEVfqHNlu1ToCmvy2ms30HxxOvoBdICK7ybL/ljA7//9cqGOw7M56JJ+P2WD5dERL6FS3vsWzgnsORHdVf60kluaZkBlLtPSSBxUamn1143rXOw9PAtj5u9+9ipGLmqF+kobuqG+nXeC5YGWmevJEOqRpC4g7iNL8WdMoMEi5anl3/YNvIK1YOcDVpKA/avcSwFXG4hqQoWQTs8jAz/Kv9NUkfTrCfpoGTflCyhsQZ64yQLnj60SQbvt5paZP3ekwlExN+Q72zoQz4tXy8W9AgudR2IN+ayz8/tgWOCfsf6DYqgpEXLTLbvL0A8PsZin4Dr55mT7ngZ+wGsV7AmzhAvLQo3d55hAYIWxlJPOdxQPoI95oN2k8nfbR1rlaxgUrN8GxMwIc8JK1cua6D0PdJc00l2Si/Y9DD+EyVApuuPCK+X6A9LTETq570ajUvIoqM5GQdWAARiHgWDVIFGjzTYKfTIZadhAN+ermn0Gc8DTXd+1SeKL4w/zIk6qIHAvYY3VD5YHd656IvVUPkSNpfoup7wMDsAGdjLhqZ8QDQXATppRpIvmxHHhCCi7bD2HyIFDB0kS2bInA2ELtKvSSL+wmt0pg4Q7cJ/LICpFmaUax/1gawqb2MEX/jBwlIXusXm8cngAjY2lKt6q4hD00zQ7qqLhr1YRKLd+N003nYQ== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(136003)(396003)(346002)(376002)(451199021)(40470700004)(36840700001)(46966006)(316002)(82310400005)(54906003)(7636003)(356005)(36860700001)(82740400003)(70586007)(70206006)(8676002)(86362001)(19627235002)(478600001)(4326008)(6916009)(83380400001)(66574015)(426003)(336012)(47076005)(2616005)(186003)(6286002)(16526019)(26005)(41300700001)(36756003)(2906002)(53546011)(1076003)(7696005)(30864003)(40460700003)(40480700001)(8936002)(6666004)(55016003)(5660300002)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:28:02.7520 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc2c2566-38cb-4610-05a3-08db390f024f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT103.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6799 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/90f12bb74f7da67b998d9ee233ac651e1cbdd11b Thanks. Xueming Li --- >From 90f12bb74f7da67b998d9ee233ac651e1cbdd11b Mon Sep 17 00:00:00 2001 From: Peng Zhang Date: Mon, 20 Feb 2023 17:02:54 +0800 Subject: [PATCH] net/nfp: fix 48-bit DMA support for NFDk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit fd392f844abc825d0ff2e8418a2f5ba9a76e4e14 ] Initializing of the NFP PMD fails when a NFDk device is used in a PCIe slot that supports 48-bit DMA address. The failure is due to an incorrect check by the PMD that limits the support to 40-bit DMA address. While this check is correct for NFD3 devices, it is incorrect for NFDk that can support 48-bit DMA address. Fix this by correcting the DMA mask check at initialization to allow for different DMA address masks for NFD3 and NFDk. The RX free list descriptor code is also updated to allow for 48-bit DMA address. While this code is shared by the NFD3 and NFDk code paths, this is not an issue as for 40-bit address the top bits are always 0. Fixes: c73dced48c8c ("net/nfp: add NFDk Tx") Signed-off-by: Peng Zhang Reviewed-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/flower/nfp_flower.c | 12 ++++-------- drivers/net/nfp/flower/nfp_flower_ctrl.c | 2 +- drivers/net/nfp/nfp_common.c | 18 ++++++++++++++++++ drivers/net/nfp/nfp_common.h | 1 + drivers/net/nfp/nfp_ethdev.c | 11 +++-------- drivers/net/nfp/nfp_ethdev_vf.c | 11 +++-------- drivers/net/nfp/nfp_rxtx.c | 4 ++-- drivers/net/nfp/nfp_rxtx.h | 4 ++-- 8 files changed, 34 insertions(+), 29 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index e447258d97..6857732028 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -451,7 +451,7 @@ nfp_flower_pf_recv_pkts(void *rx_queue, rxds->vals[1] = 0; dma_addr = rte_cpu_to_le_64(RTE_MBUF_DMA_ADDR_DEFAULT(new_mb)); rxds->fld.dd = 0; - rxds->fld.dma_addr_hi = (dma_addr >> 32) & 0xff; + rxds->fld.dma_addr_hi = (dma_addr >> 32) & 0xffff; rxds->fld.dma_addr_lo = dma_addr & 0xffffffff; nb_hold++; @@ -631,13 +631,6 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type) pf_dev = hw->pf_dev; pci_dev = hw->pf_dev->pci_dev; - /* NFP can not handle DMA addresses requiring more than 40 bits */ - if (rte_mem_check_dma_mask(40)) { - PMD_INIT_LOG(ERR, "Device %s can not be used: restricted dma mask to 40 bits!\n", - pci_dev->device.name); - return -ENODEV; - }; - hw->device_id = pci_dev->id.device_id; hw->vendor_id = pci_dev->id.vendor_id; hw->subsystem_device_id = pci_dev->id.subsystem_device_id; @@ -666,6 +659,9 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type) hw->mtu = hw->max_mtu; hw->flbufsz = DEFAULT_FLBUF_SIZE; + if (nfp_net_check_dma_mask(hw, pci_dev->name) != 0) + return -ENODEV; + /* read the Rx offset configured from firmware */ if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 2) hw->rx_offset = NFP_NET_RX_OFFSET; diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c index 3631e764fe..1c6340f3d7 100644 --- a/drivers/net/nfp/flower/nfp_flower_ctrl.c +++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c @@ -123,7 +123,7 @@ nfp_flower_ctrl_vnic_recv(void *rx_queue, rxds->vals[1] = 0; dma_addr = rte_cpu_to_le_64(RTE_MBUF_DMA_ADDR_DEFAULT(new_mb)); rxds->fld.dd = 0; - rxds->fld.dma_addr_hi = (dma_addr >> 32) & 0xff; + rxds->fld.dma_addr_hi = (dma_addr >> 32) & 0xffff; rxds->fld.dma_addr_lo = dma_addr & 0xffffffff; nb_hold++; diff --git a/drivers/net/nfp/nfp_common.c b/drivers/net/nfp/nfp_common.c index 71711bfa22..c962ed0fc0 100644 --- a/drivers/net/nfp/nfp_common.c +++ b/drivers/net/nfp/nfp_common.c @@ -1413,6 +1413,24 @@ nfp_net_set_vxlan_port(struct nfp_net_hw *hw, RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE); RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE); RTE_LOG_REGISTER_SUFFIX(nfp_logtype_cpp, cpp, NOTICE); +/* + * The firmware with NFD3 can not handle DMA address requiring more + * than 40 bits + */ +int +nfp_net_check_dma_mask(struct nfp_net_hw *hw, char *name) +{ + if (NFD_CFG_CLASS_VER_of(hw->ver) == NFP_NET_CFG_VERSION_DP_NFD3 && + rte_mem_check_dma_mask(40) != 0) { + PMD_DRV_LOG(ERR, + "The device %s can't be used: restricted dma mask to 40 bits!", + name); + return -ENODEV; + } + + return 0; +} + /* * Local variables: * c-file-style: "Linux" diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h index 36c19b47e4..8cf99c0eae 100644 --- a/drivers/net/nfp/nfp_common.h +++ b/drivers/net/nfp/nfp_common.h @@ -447,6 +447,7 @@ void nfp_net_close_rx_queue(struct rte_eth_dev *dev); void nfp_net_stop_tx_queue(struct rte_eth_dev *dev); void nfp_net_close_tx_queue(struct rte_eth_dev *dev); int nfp_net_set_vxlan_port(struct nfp_net_hw *hw, size_t idx, uint16_t port); +int nfp_net_check_dma_mask(struct nfp_net_hw *hw, char *name); #define NFP_NET_DEV_PRIVATE_TO_HW(adapter)\ (&((struct nfp_net_adapter *)adapter)->hw) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index f22ae24b53..cf7a4389b3 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -517,14 +517,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev) /* Use backpointer to the CoreNIC app struct */ app_fw_nic = NFP_PRIV_TO_APP_FW_NIC(pf_dev->app_fw_priv); - /* NFP can not handle DMA addresses requiring more than 40 bits */ - if (rte_mem_check_dma_mask(40)) { - RTE_LOG(ERR, PMD, - "device %s can not be used: restricted dma mask to 40 bits!\n", - pci_dev->device.name); - return -ENODEV; - } - port = ((struct nfp_net_hw *)eth_dev->data->dev_private)->idx; if (port < 0 || port > 7) { PMD_DRV_LOG(ERR, "Port value is wrong"); @@ -572,6 +564,9 @@ nfp_net_init(struct rte_eth_dev *eth_dev) hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION); + if (nfp_net_check_dma_mask(hw, pci_dev->name) != 0) + return -ENODEV; + if (nfp_net_ethdev_ops_mount(hw, eth_dev)) return -EINVAL; diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index d1427b63bc..865cac7741 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -291,14 +291,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev); - /* NFP can not handle DMA addresses requiring more than 40 bits */ - if (rte_mem_check_dma_mask(40)) { - RTE_LOG(ERR, PMD, - "device %s can not be used: restricted dma mask to 40 bits!\n", - pci_dev->device.name); - return -ENODEV; - } - hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); hw->ctrl_bar = (uint8_t *)pci_dev->mem_resource[0].addr; @@ -312,6 +304,9 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev) hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION); + if (nfp_net_check_dma_mask(hw, pci_dev->name) != 0) + return -ENODEV; + if (nfp_netvf_ethdev_ops_mount(hw, eth_dev)) return -EINVAL; diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c index 9e20917b5e..ac0fa80d4c 100644 --- a/drivers/net/nfp/nfp_rxtx.c +++ b/drivers/net/nfp/nfp_rxtx.c @@ -48,7 +48,7 @@ nfp_net_rx_fill_freelist(struct nfp_net_rxq *rxq) rxd = &rxq->rxds[i]; rxd->fld.dd = 0; - rxd->fld.dma_addr_hi = (dma_addr >> 32) & 0xff; + rxd->fld.dma_addr_hi = (dma_addr >> 32) & 0xffff; rxd->fld.dma_addr_lo = dma_addr & 0xffffffff; rxe[i].mbuf = mbuf; PMD_RX_LOG(DEBUG, "[%d]: %" PRIx64, i, dma_addr); @@ -361,7 +361,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxds->vals[1] = 0; dma_addr = rte_cpu_to_le_64(RTE_MBUF_DMA_ADDR_DEFAULT(new_mb)); rxds->fld.dd = 0; - rxds->fld.dma_addr_hi = (dma_addr >> 32) & 0xff; + rxds->fld.dma_addr_hi = (dma_addr >> 32) & 0xffff; rxds->fld.dma_addr_lo = dma_addr & 0xffffffff; nb_hold++; diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h index ced05fde90..e2b48374fe 100644 --- a/drivers/net/nfp/nfp_rxtx.h +++ b/drivers/net/nfp/nfp_rxtx.h @@ -227,8 +227,8 @@ struct nfp_net_rx_desc { union { /* Freelist descriptor */ struct { - uint8_t dma_addr_hi; - __le16 spare; + __le16 dma_addr_hi; + uint8_t spare; uint8_t dd; __le32 dma_addr_lo; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:39.550102500 +0800 +++ 0029-net-nfp-fix-48-bit-DMA-support-for-NFDk.patch 2023-04-09 21:45:38.609042200 +0800 @@ -1 +1 @@ -From fd392f844abc825d0ff2e8418a2f5ba9a76e4e14 Mon Sep 17 00:00:00 2001 +From 90f12bb74f7da67b998d9ee233ac651e1cbdd11b Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit fd392f844abc825d0ff2e8418a2f5ba9a76e4e14 ] @@ -23 +25,0 @@ -Cc: stable@dpdk.org @@ -40 +42 @@ -index 42014295ab..2c797ae751 100644 +index e447258d97..6857732028 100644 @@ -43 +45 @@ -@@ -452,7 +452,7 @@ nfp_flower_pf_recv_pkts(void *rx_queue, +@@ -451,7 +451,7 @@ nfp_flower_pf_recv_pkts(void *rx_queue, @@ -52 +54 @@ -@@ -629,13 +629,6 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type) +@@ -631,13 +631,6 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type) @@ -66 +68 @@ -@@ -664,6 +657,9 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type) +@@ -666,6 +659,9 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type) @@ -77 +79 @@ -index 6e7545bc39..3e083d948e 100644 +index 3631e764fe..1c6340f3d7 100644 @@ -80 +82 @@ -@@ -122,7 +122,7 @@ nfp_flower_ctrl_vnic_recv(void *rx_queue, +@@ -123,7 +123,7 @@ nfp_flower_ctrl_vnic_recv(void *rx_queue, @@ -90 +92 @@ -index ac05aba92d..907777a9e4 100644 +index 71711bfa22..c962ed0fc0 100644 @@ -93,4 +95,4 @@ -@@ -1566,6 +1566,24 @@ nfp_net_set_vxlan_port(struct nfp_net_hw *hw, - return ret; - } - +@@ -1413,6 +1413,24 @@ nfp_net_set_vxlan_port(struct nfp_net_hw *hw, + RTE_LOG_REGISTER_SUFFIX(nfp_logtype_init, init, NOTICE); + RTE_LOG_REGISTER_SUFFIX(nfp_logtype_driver, driver, NOTICE); + RTE_LOG_REGISTER_SUFFIX(nfp_logtype_cpp, cpp, NOTICE); @@ -119 +121 @@ -index 56b7edc951..980f3cad89 100644 +index 36c19b47e4..8cf99c0eae 100644 @@ -122,4 +124,4 @@ -@@ -454,6 +454,7 @@ int nfp_net_rx_desc_limits(struct nfp_net_hw *hw, - int nfp_net_tx_desc_limits(struct nfp_net_hw *hw, - uint16_t *min_tx_desc, - uint16_t *max_tx_desc); +@@ -447,6 +447,7 @@ void nfp_net_close_rx_queue(struct rte_eth_dev *dev); + void nfp_net_stop_tx_queue(struct rte_eth_dev *dev); + void nfp_net_close_tx_queue(struct rte_eth_dev *dev); + int nfp_net_set_vxlan_port(struct nfp_net_hw *hw, size_t idx, uint16_t port); @@ -131 +133 @@ -index 3527804785..fed7b1ab13 100644 +index f22ae24b53..cf7a4389b3 100644 @@ -134 +136 @@ -@@ -519,14 +519,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev) +@@ -517,14 +517,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev) @@ -140,2 +142,2 @@ -- PMD_INIT_LOG(ERR, -- "device %s can not be used: restricted dma mask to 40 bits!", +- RTE_LOG(ERR, PMD, +- "device %s can not be used: restricted dma mask to 40 bits!\n", @@ -149 +151 @@ -@@ -574,6 +566,9 @@ nfp_net_init(struct rte_eth_dev *eth_dev) +@@ -572,6 +564,9 @@ nfp_net_init(struct rte_eth_dev *eth_dev) @@ -160 +162 @@ -index cbe5c5c5c8..c1f8a0fa0f 100644 +index d1427b63bc..865cac7741 100644 @@ -169,2 +171,2 @@ -- PMD_INIT_LOG(ERR, -- "device %s can not be used: restricted dma mask to 40 bits!", +- RTE_LOG(ERR, PMD, +- "device %s can not be used: restricted dma mask to 40 bits!\n", @@ -189 +191 @@ -index abecff3a87..17a04cec5e 100644 +index 9e20917b5e..ac0fa80d4c 100644 @@ -201 +203 @@ -@@ -454,7 +454,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +@@ -361,7 +361,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) @@ -211 +213 @@ -index cb67657014..5e651518ed 100644 +index ced05fde90..e2b48374fe 100644 @@ -214 +216 @@ -@@ -288,8 +288,8 @@ struct nfp_net_rx_desc { +@@ -227,8 +227,8 @@ struct nfp_net_rx_desc {