From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1BF1627E7C6; Tue, 27 May 2025 17:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748366022; cv=none; b=NxXVw0b79SMnC2y0VYqMeCXvPaCFwSsy27Q0RgKr0b/8d8B+YAMt8i55YOU3d0KKiPm9VxZfeIugMvKVGWyvQBM6cbdEeEDgPbmo/7EZIzvB2mmxhzuayS0FMXMKSiiMUaSVv0PSlSu2lvP19DMJFZZNLGCArWJh6oirhDb4uVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748366022; c=relaxed/simple; bh=3vZztVMH8Huh0xM2VRe9tWljBrhmDsVI5/O3KTCk8to=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HNCXaEePwlRxy8MFJnNtO94S3Tt/VxBBLv/Akd4YhZv8mvwGvi9zMC0Bx+szuyIf9IaqqrJg/RGLbI+fS04r1TR8j8OPEYUiY/Yyycgq6qUr35vhvxdzXScSag21njhY3M405Ln9hNX1IfRmpGrR+Wc2Jzbf7dr/Mz9h64QayY8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Xw2ZrlGF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Xw2ZrlGF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97C09C4CEE9; Tue, 27 May 2025 17:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748366022; bh=3vZztVMH8Huh0xM2VRe9tWljBrhmDsVI5/O3KTCk8to=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xw2ZrlGFiq+QSxcBSzKtlnylskvYiVb5t3MTYhFWbmPwm8YISDiSIOAZLaEc5LAnW 2l/r1S2C/FC1S9AfwgYMPLnzJOateSNijp0AhI1uRCfWGawYa40nRhqR9Tm4C21rRN qy2MRZp/nZsuU9qLRm1nsn4mygHd3qGAYmABchds= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Suman Ghosh , Paolo Abeni , Sasha Levin Subject: [PATCH 6.12 565/626] octeontx2-pf: Add AF_XDP non-zero copy support Date: Tue, 27 May 2025 18:27:38 +0200 Message-ID: <20250527162507.923049592@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250527162445.028718347@linuxfoundation.org> References: <20250527162445.028718347@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Suman Ghosh [ Upstream commit b4164de5041b51cda3438e75bce668e2556057c3 ] Set xdp rx ring memory type as MEM_TYPE_PAGE_POOL for af-xdp to work. This is needed since xdp_return_frame internally will use page pools. Fixes: 06059a1a9a4a ("octeontx2-pf: Add XDP support to netdev PF") Signed-off-by: Suman Ghosh Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index 7510a918d942c..f75afcf5f5aef 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -988,6 +988,7 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx) int err, pool_id, non_xdp_queues; struct nix_aq_enq_req *aq; struct otx2_cq_queue *cq; + struct otx2_pool *pool; cq = &qset->cq[qidx]; cq->cq_idx = qidx; @@ -996,8 +997,13 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx) cq->cq_type = CQ_RX; cq->cint_idx = qidx; cq->cqe_cnt = qset->rqe_cnt; - if (pfvf->xdp_prog) + if (pfvf->xdp_prog) { + pool = &qset->pool[qidx]; xdp_rxq_info_reg(&cq->xdp_rxq, pfvf->netdev, qidx, 0); + xdp_rxq_info_reg_mem_model(&cq->xdp_rxq, + MEM_TYPE_PAGE_POOL, + pool->page_pool); + } } else if (qidx < non_xdp_queues) { cq->cq_type = CQ_TX; cq->cint_idx = qidx - pfvf->hw.rx_queues; -- 2.39.5