From patchwork Wed Jan 8 22:06:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wei X-Patchwork-Id: 13931620 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16AAF204687 for ; Wed, 8 Jan 2025 22:07:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736374027; cv=none; b=Ugl3BaJRDuS3MDodrvw909LWVylbxXocGPE4CjRy9bqBGe38k6HYD2QMdI660VJCyd3RcgGHKIGq1liQjKvyPXqd8+kbeeYgcaqDM38P3kV9MJdUEPlfJsiYJgjXatw5GdmRrQqCpo9qKCPxDxE8q0sbfK8v1HL6mUxnLXn2nv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736374027; c=relaxed/simple; bh=RN9FRieTmgxqv0c+YKrWG+l7gQJLp/gap7HunHQoqkE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gxRyjSGLWbdLxhZXLhqNer7cpvcVz8j88MXnQS0uqBpfICEhAO9sFdp1A2xdazxujZgy90wlqgr+SfrbeUpDj/PJY2/UOhmY5URlHe/yFLR1SU5fgbCgCAWs30AuYxrZnsnLxxGFa81tV+OzmBVelHpFebNaHhvrOTLXtwGXk8Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidwei.uk; spf=none smtp.mailfrom=davidwei.uk; dkim=pass (2048-bit key) header.d=davidwei-uk.20230601.gappssmtp.com header.i=@davidwei-uk.20230601.gappssmtp.com header.b=BAV2BZ3k; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidwei.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=davidwei.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=davidwei-uk.20230601.gappssmtp.com header.i=@davidwei-uk.20230601.gappssmtp.com header.b="BAV2BZ3k" Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2ee709715d9so401655a91.3 for ; Wed, 08 Jan 2025 14:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=davidwei-uk.20230601.gappssmtp.com; s=20230601; t=1736374025; x=1736978825; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4BJhQIF+q/BdwFZrWY61E+04UcDJKhF4LPhTAqO37Wg=; b=BAV2BZ3kQYK6YyEsezI1M8hrzvZs5pJh8WP2ve3NvkeKK60GuSHIblp91jGSHwB1mM nky2Hg/boYDQVEyGdpcpfbYfFYcUq8wr7LyUS1lc9oYWTmQqwXiCV1Uz0oTJsNS5PB5r vf/cRwig1oVZ4TGSqOgLlZ8tmQQ+CqRXB+HDG8sIADBE2hFxGi9cqNPahffFib4uKQ2y QavVf+isq3xY/ZF5+zswvCXJAV2WrFnkTW17qsju8cJROYRiEt6HDlVGPz8wbO+2BSUi iHVw4Rc31Y8KxkrEV24leFxHvM+JM9Rs4QpTNADFe1EZYiY4aaRrl6zghwq/A6/GQk7Q Cb3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736374025; x=1736978825; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4BJhQIF+q/BdwFZrWY61E+04UcDJKhF4LPhTAqO37Wg=; b=NnEmptrjZOXKQKLiYtLHLbmzdZHvWt5J3U0w8MQPWGy1yyuBMr5qIEHuFRD8iZAG/k Bt75ThMYU92muHTEaOn9dNQL9Kx1/s873swGnPU80sHJvR4MMFRJDRJveP2aZHbPkDXJ hmQxBif2t1bJ4iS8hCdqhElNlBNeewXBfvGKM0kiufWLqzfb06xFBCCH6vI5txFBNh5y KmQB8wUtvS7mQ5S26abZyS1CQEel+Y9yeyRUmfTPoyBdITzmP6aSpHLHixAbKGkG1ffa t/ubXQ5tagaVVJIlJ/qnl8eDIdLvkIqvU24GvNFGeyGfIVh74E+wbpHmZvEl1k3ieIXR CeGQ== X-Forwarded-Encrypted: i=1; AJvYcCWHDsqE559G0jTcqXlBTU0IeJrtYoeoezQ4BRe7NvVQQtykncfD3UYpYdcVH1ZeqeKK/Ef+mKI=@vger.kernel.org X-Gm-Message-State: AOJu0YyrQ6bh3yN7MDebuDpG2FAd8WOS5akPnTTIfK4abHHjFNsPq3cm uJAPUXxeqo1IQ2Zed/klqvLKvs8SCCbGASK0ifpCcpJPyjlzvPBElej+XjJ8A0Y= X-Gm-Gg: ASbGncvk9jsiaWedLA/nT1qUE06X0dZT5bB5NbZ71N40dqclw8L5xqKc0h/tgWDIqGc /mfe9NO1tjzhhisivHoZ8eWtJ0wn+HJ65vb/BD4dtyTaLDopvq3Pw4p0pFNKcaSLXypBuy+tbsr IeC7/ppRmglGxnMZmfZF7NYSCtXVrRNpEd0p4iSCgBXwO4zQeojBeoQRVgJPXNVOUp8c+DVCos+ 61sWg8P2nRXoEF8/v1Pf72ebv51bbTAbDDS5yTsGQ== X-Google-Smtp-Source: AGHT+IG30t7WuCDSwHCzEWAOGT9TEAdPgdISqVX1a/HXZhmUwyes9kCEGDD0QvKCmgEhlrcZgDT4AA== X-Received: by 2002:a17:90b:2f0e:b0:2f4:49d8:e718 with SMTP id 98e67ed59e1d1-2f548eac0bfmr6895925a91.9.1736374025407; Wed, 08 Jan 2025 14:07:05 -0800 (PST) Received: from localhost ([2a03:2880:ff:17::]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f54a2ab6e8sm2096423a91.23.2025.01.08.14.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 14:07:05 -0800 (PST) From: David Wei To: io-uring@vger.kernel.org, netdev@vger.kernel.org Cc: Jens Axboe , Pavel Begunkov , Jakub Kicinski , Paolo Abeni , "David S. Miller" , Eric Dumazet , Jesper Dangaard Brouer , David Ahern , Mina Almasry , Stanislav Fomichev , Joe Damato , Pedro Tammela Subject: [PATCH net-next v10 02/22] net: page_pool: don't cast mp param to devmem Date: Wed, 8 Jan 2025 14:06:23 -0800 Message-ID: <20250108220644.3528845-3-dw@davidwei.uk> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250108220644.3528845-1-dw@davidwei.uk> References: <20250108220644.3528845-1-dw@davidwei.uk> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Pavel Begunkov page_pool_check_memory_provider() is a generic path and shouldn't assume anything about the actual type of the memory provider argument. It's fine while devmem is the only provider, but cast away the devmem specific binding types to avoid confusion. Reviewed-by: Jakub Kicinski Reviewed-by: Mina Almasry Signed-off-by: Pavel Begunkov Signed-off-by: David Wei --- net/core/page_pool_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/page_pool_user.c b/net/core/page_pool_user.c index 48335766c1bf..8d31c71bea1a 100644 --- a/net/core/page_pool_user.c +++ b/net/core/page_pool_user.c @@ -353,7 +353,7 @@ void page_pool_unlist(struct page_pool *pool) int page_pool_check_memory_provider(struct net_device *dev, struct netdev_rx_queue *rxq) { - struct net_devmem_dmabuf_binding *binding = rxq->mp_params.mp_priv; + void *binding = rxq->mp_params.mp_priv; struct page_pool *pool; struct hlist_node *n;