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 4327543C5B; Wed, 6 Mar 2024 13:26:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C353342DE4; Wed, 6 Mar 2024 13:25:15 +0100 (CET) Received: from smtp-fw-52004.amazon.com (smtp-fw-52004.amazon.com [52.119.213.154]) by mails.dpdk.org (Postfix) with ESMTP id BBA3042E32 for ; Wed, 6 Mar 2024 13:25:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1709727914; x=1741263914; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=2vVSjWSRvxszLqtLMVmYotpoM0VZkDq60QhuYD8vM90=; b=vsZ9HQQgmE41aaJqnkT8/HzB+XhsBUWCix7kL9NEqumUIpdGZ681zeVR rGoxl8QL5Hh7NaZa5dGCpFBaJGkL/Kd1kbaNSWRy/qSpX6Eo6DK/7pwpe eWoXR5MeIElc7zfL3diibmUeqg16EaRLU/frEM1YlKYRLwZZrl2FB4fkQ U=; X-IronPort-AV: E=Sophos;i="6.06,208,1705363200"; d="scan'208";a="189623241" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO smtpout.prod.us-east-1.prod.farcaster.email.amazon.dev) ([10.43.8.2]) by smtp-border-fw-52004.iad7.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2024 12:25:12 +0000 Received: from EX19MTAEUA001.ant.amazon.com [10.0.43.254:25084] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.9.254:2525] with esmtp (Farcaster) id c54c7c9b-7216-49ef-86c1-df64a58279fd; Wed, 6 Mar 2024 12:25:11 +0000 (UTC) X-Farcaster-Flow-ID: c54c7c9b-7216-49ef-86c1-df64a58279fd Received: from EX19D007EUB001.ant.amazon.com (10.252.51.82) by EX19MTAEUA001.ant.amazon.com (10.252.50.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 6 Mar 2024 12:25:10 +0000 Received: from EX19MTAUWA001.ant.amazon.com (10.250.64.204) by EX19D007EUB001.ant.amazon.com (10.252.51.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 6 Mar 2024 12:25:10 +0000 Received: from HFA15-CG15235BS.amazon.com (10.1.213.21) by mail-relay.amazon.com (10.250.64.204) with Microsoft SMTP Server id 15.2.1258.28 via Frontend Transport; Wed, 6 Mar 2024 12:25:09 +0000 From: To: CC: , Shai Brandes Subject: [PATCH v3 10/33] net/ena/hal: added a bus parameter to ena memcpy macro Date: Wed, 6 Mar 2024 14:24:22 +0200 Message-ID: <20240306122445.4350-11-shaibran@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240306122445.4350-1-shaibran@amazon.com> References: <20240306122445.4350-1-shaibran@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Shai Brandes ENA_MEMCPY_TO_DEVICE_64 macro needs pci bus id in order to write to the device memory when using llq. Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/hal/ena_eth_com.c | 3 ++- drivers/net/ena/hal/ena_plat_dpdk.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ena/hal/ena_eth_com.c b/drivers/net/ena/hal/ena_eth_com.c index 32090259cd..d6811c7b48 100644 --- a/drivers/net/ena/hal/ena_eth_com.c +++ b/drivers/net/ena/hal/ena_eth_com.c @@ -74,7 +74,8 @@ static int ena_com_write_bounce_buffer_to_dev(struct ena_com_io_sq *io_sq, wmb(); /* The line is completed. Copy it to dev */ - ENA_MEMCPY_TO_DEVICE_64(io_sq->desc_addr.pbuf_dev_addr + dst_offset, + ENA_MEMCPY_TO_DEVICE_64(io_sq->bus, + io_sq->desc_addr.pbuf_dev_addr + dst_offset, bounce_buffer, llq_info->desc_list_entry_size); diff --git a/drivers/net/ena/hal/ena_plat_dpdk.h b/drivers/net/ena/hal/ena_plat_dpdk.h index 14bf582a45..5f7cbd1ee7 100644 --- a/drivers/net/ena/hal/ena_plat_dpdk.h +++ b/drivers/net/ena/hal/ena_plat_dpdk.h @@ -301,11 +301,12 @@ ena_mem_alloc_coherent(struct rte_eth_dev_data *data, size_t size, #define ENA_WAIT_EVENTS_DESTROY(admin_queue) ((void)(admin_queue)) /* The size must be 8 byte align */ -#define ENA_MEMCPY_TO_DEVICE_64(dst, src, size) \ +#define ENA_MEMCPY_TO_DEVICE_64(bus, dst, src, size) \ do { \ int count, i; \ uint64_t *to = (uint64_t *)(dst); \ const uint64_t *from = (const uint64_t *)(src); \ + (void)(bus); \ count = (size) / 8; \ for (i = 0; i < count; i++, from++, to++) \ rte_write64_relaxed(*from, to); \ -- 2.17.1