All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Washington <joshwash@google.com>
To: Shai Brandes <shaibran@amazon.com>,
	Evgeny Schemeilin <evgenys@amazon.com>,
	Amit Bernstein <amitbern@amazon.com>,
	Wajeeh Atrash <atrwajee@amazon.com>
Cc: dev@dpdk.org, Joshua Washington <joshwash@google.com>
Subject: [PATCH v2 11/14] net/ena: use common division round up macro
Date: Thu, 13 Aug 2026 10:22:36 -0700	[thread overview]
Message-ID: <20260813172241.964736-12-joshwash@google.com> (raw)
In-Reply-To: <20260813172241.964736-1-joshwash@google.com>

The RTE_DIV_ROUND_UP in rte_common.h makes DIV_ROUND_UP redundant.

Signed-off-by: Joshua Washington <joshwash@google.com>
---
 drivers/net/ena/base/ena_eth_com.h   | 4 ++--
 drivers/net/ena/base/ena_plat_dpdk.h | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ena/base/ena_eth_com.h b/drivers/net/ena/base/ena_eth_com.h
index f773699467..4c82415181 100644
--- a/drivers/net/ena/base/ena_eth_com.h
+++ b/drivers/net/ena/base/ena_eth_com.h
@@ -160,8 +160,8 @@ static inline bool ena_com_is_doorbell_needed(struct ena_com_io_sq *io_sq,
 
 	if (num_descs > llq_info->descs_num_before_header) {
 		descs_after_first_entry = num_descs - llq_info->descs_num_before_header;
-		num_entries_needed += DIV_ROUND_UP(descs_after_first_entry,
-						   llq_info->descs_per_entry);
+		num_entries_needed += RTE_DIV_ROUND_UP(descs_after_first_entry,
+						       llq_info->descs_per_entry);
 	}
 
 	ena_trc_dbg(ena_com_io_sq_to_ena_dev(io_sq),
diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index c84420de22..9c8a96c918 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -304,7 +304,6 @@ ena_mem_alloc_coherent(struct rte_eth_dev_data *data, size_t size,
 			rte_write64_relaxed(*from, to);			       \
 	} while(0)
 
-#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
 
 #define ENA_FFS(x) ffs(x)
 
-- 
2.55.0.691.gc56d675ccc-goog


  parent reply	other threads:[~2026-08-13 17:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 22:30 [PATCH] eal: introduce division round up macro Joshua Washington
2026-08-13  1:29 ` Stephen Hemminger
2026-08-13 17:22 ` [PATCH v2 00/14] Introduce RTE_DIV_ROUND_UP Joshua Washington
2026-08-13 17:22   ` [PATCH v2 01/14] eal: introduce division round up macro Joshua Washington
2026-08-13 17:22   ` [PATCH v2 02/14] net/i40e: use common " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 03/14] net/idpf: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 04/14] net/ice: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 05/14] net/qede: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 06/14] net/rnp: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 07/14] net/hns3: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 08/14] net/hinic: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 09/14] net/bnx2x: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 10/14] net/cxgbe: " Joshua Washington
2026-08-13 17:22   ` Joshua Washington [this message]
2026-08-13 17:22   ` [PATCH v2 12/14] raw/ifpga/base: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 13/14] drivers: " Joshua Washington
2026-08-13 17:22   ` [PATCH v2 14/14] app/procinfo: " Joshua Washington
2026-08-15 15:32   ` [PATCH v2 00/14] Introduce RTE_DIV_ROUND_UP Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260813172241.964736-12-joshwash@google.com \
    --to=joshwash@google.com \
    --cc=amitbern@amazon.com \
    --cc=atrwajee@amazon.com \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=shaibran@amazon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.