From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E1A44FD799; Mon, 28 Sep 2026 19:33:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790623989; cv=none; b=XAILR+RlUNFyKpTw3j1cef3RjrBaPirsPYXFlstvajuUxMV9Dur6UJ6TGBiSyqYBpCLH50FrMs4B2z/LVhVFMJz6X6iO6KtMZdy/788ThCTsMsy+lUM7bbO5utnUmB11V0EvY3R8NB0IZqe1iiomYianvggeVoPcQaI2FodWfqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790623989; c=relaxed/simple; bh=d+JKpOCaVjCO+56ImP8WkKP2l/kS85jXgylLfub1kPQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=ZnCbWk3n1N9LhpJO3o09olJPX4nWuf4UuOxiji3v1RlanuiH0mnM2c/M545KATJ307vmeQ6zFJOJtIPJqaKZbHzEDbJ1g6X/vRaju6FRFQXLdw5Ye7Im0Yj4qSunebdHkQXAtoF/dhk89WEqzg2Dx0KD4QtsOBIvdMOw8/wbizU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=zG0RCsAd; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="zG0RCsAd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1790623992; x=1822159992; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=d+JKpOCaVjCO+56ImP8WkKP2l/kS85jXgylLfub1kPQ=; b=zG0RCsAdw9PK1aEo7cYvCmcRu4TG+rdzdkigDeALhuqeP8pEHPtcV3Wy eBApldM1Tn/ETSyqYQ89OJtx7q87jSGrZXUj3togBX67NBD/eLKPLTFNL NRdBbPnJe0HXecUHenyvJWn7mZ4Yt+7/SpmPGc6QMp79rM+MFYi4Uopvb 7raxi/JYxpigK/bFhyswSgC7Qkj/n/DxaS3NPEP7AUteAkvyDDmsRSnaO NJHeBWzfnvP5NScjNkVXHy1jJzQntwoRfSI3DqEllqr+eGft7awbibvZC TrusT2b8git05faoC/G5XkzZIKLb887Ke7gKXHTWQjBPbKhgGxR50xAm+ A==; X-CSE-ConnectionGUID: 30PJ9v2nTjuq2+aBAhh2pw== X-CSE-MsgGUID: peHBUjjxQyOz0wPNAw/YPw== X-IronPort-AV: E=Sophos;i="6.27,129,1787036400"; d="scan'208";a="64576542" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 28 Sep 2026 12:33:11 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Mon, 28 Sep 2026 12:33:06 -0700 Received: from DEN-DL-M70577.microsemi.net (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Mon, 28 Sep 2026 12:33:02 -0700 From: Daniel Machon Date: Mon, 28 Sep 2026 21:32:50 +0200 Subject: [PATCH net-next v9 02/15] net: microchip: fdma: rename contiguous dataptr helpers Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20260928-lan966x-pci-fdma-v9-2-a17caf60f89a@microchip.com> References: <20260928-lan966x-pci-fdma-v9-0-a17caf60f89a@microchip.com> In-Reply-To: <20260928-lan966x-pci-fdma-v9-0-a17caf60f89a@microchip.com> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Horatiu Vultur , Steen Hegelund , , "Alexei Starovoitov" , Daniel Borkmann , "Jesper Dangaard Brouer" , John Fastabend , Stanislav Fomichev , Herve Codina , Arnd Bergmann , Greg Kroah-Hartman , Mohsin Bashir , "Simon Horman" CC: Richard Cochran , , , , X-Mailer: b4 0.14.3 When the FDMA library was introduced [1], two helpers to get the DMA and virtual address of a data buffer, in contiguous memory, were added. These helpers have had no callers until this series. I found the naming I initially used confusing and inconsistent. Rename fdma_dataptr_get_contiguous() and fdma_dataptr_virt_get_contiguous() to fdma_dataptr_dma_addr_contiguous() and fdma_dataptr_virt_addr_contiguous(). This makes the pair symmetric and clarifies what type of address each returns. [1]: commit 30e48a75df9c ("net: microchip: add FDMA library") Tested-by: Herve Codina Signed-off-by: Daniel Machon Reviewed-by: Simon Horman --- drivers/net/ethernet/microchip/fdma/fdma_api.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/microchip/fdma/fdma_api.h b/drivers/net/ethernet/microchip/fdma/fdma_api.h index d91affe8bd98..dea8e3cc155a 100644 --- a/drivers/net/ethernet/microchip/fdma/fdma_api.h +++ b/drivers/net/ethernet/microchip/fdma/fdma_api.h @@ -197,8 +197,8 @@ static inline int fdma_nextptr_cb(struct fdma *fdma, int dcb_idx, u64 *nextptr) * if the dataptr addresses and DCB's are in contiguous memory and the driver * supports XDP. */ -static inline u64 fdma_dataptr_get_contiguous(struct fdma *fdma, int dcb_idx, - int db_idx) +static inline u64 fdma_dataptr_dma_addr_contiguous(struct fdma *fdma, + int dcb_idx, int db_idx) { return fdma->dma + (sizeof(struct fdma_dcb) * fdma->n_dcbs) + (dcb_idx * fdma->n_dbs + db_idx) * fdma->db_size + @@ -209,8 +209,8 @@ static inline u64 fdma_dataptr_get_contiguous(struct fdma *fdma, int dcb_idx, * applicable if the dataptr addresses and DCB's are in contiguous memory and * the driver supports XDP. */ -static inline void *fdma_dataptr_virt_get_contiguous(struct fdma *fdma, - int dcb_idx, int db_idx) +static inline void *fdma_dataptr_virt_addr_contiguous(struct fdma *fdma, + int dcb_idx, int db_idx) { return (u8 *)fdma->dcbs + (sizeof(struct fdma_dcb) * fdma->n_dcbs) + (dcb_idx * fdma->n_dbs + db_idx) * fdma->db_size + -- 2.34.1