Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1840353lqo; Sun, 12 May 2024 22:48:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXltoqgAXVU9bWa8J0oqz34/+PIytkALYWK/Rj20t/Q0FwRyJUWcgKlAZRjROlt6tgQEY9vvdEUUhTWpSQBiPuCZTpideBPAdjvqfzSDg== X-Google-Smtp-Source: AGHT+IGxDIFD230xYZgkkh14cHTxG7gHd9tdzxRlu2OQJBYfM4mA9zamDt++kuKabL1akE37CRG4 X-Received: by 2002:a05:6214:5781:b0:6a0:d56e:4b30 with SMTP id 6a1803df08f44-6a168388726mr130614446d6.53.1715579335644; Sun, 12 May 2024 22:48:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715579335; cv=pass; d=google.com; s=arc-20160816; b=KwBLIeHk+bXytkh9/FForUeY+YLbsW0Qssm1OHfwavuFckJQJdAKaEkM/NQYRd7N7n 28yhogD5TkUYSQtZ/5QFD4riwyCxte4q69BeRULV/YbyGYZuBnJKLF3dv3qDaoukjSNq a50KJ1qc72BCvPzr+5VQZ21tbYiJAD+qXERow6wTFSmdyo1/znE/wzs4vAu3HS6WVRU5 O88/ORDWm5M5AGPmE2BctJcJ2wAEVXSvFgZF61/qE2wkIJ1a7TdXzCRwdeUoCaEbuvk+ EDDEuWMRnAHxH+3WYeweejQNXr56bxQCa8cNTBiARo9o/7OKto7MdlKZboqIN+9weXHj r2jw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=OZvmT2boOq9u2LiX64FnJgQxbVh/mRv404o2yXm+es8=; fh=gRl1jDjFaQrE5E7yP3UhNvXh3favzrfGz7jimd0QwiM=; b=fgj76uQQSiJnmz55zQb9AW0hOIwiRG6qtv9CN+09m7fclEP1RGJb6fwxGufi9BOnbb H9RTvi6UQbDIWeThnfLudPNNmqBayEIVg/vpSUbqRUH8iVpDwS9LiLp4fdu/6sdIPzIn HjRj9TnpEq8puHO1qqlyVS+P4ixfp9flwXYmA5WF9f8y9Vn/37UEJQBYAUz5fDnaiY4V 7/hdqgHYhLa1yGc3WlIN7CXgPbe+FuFMolIzxLPFYCxMRhv3evf2m/8O709dFUj+ruFC 5xkmT6v3poY2Dxo5aDfWjLwmLr8FL3KRXuAkcoCy0k2WySN5XeRYCH+JJHYEW+u41ILA /oAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=CY1e+wNP; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-177177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177177-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f3053e3si90458896d6.568.2024.05.12.22.48.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 22:48:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=CY1e+wNP; arc=pass (i=1 spf=pass spfdomain=marvell.com dkim=pass dkdomain=marvell.com dmarc=pass fromdomain=marvell.com); spf=pass (google.com: domain of linux-kernel+bounces-177177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177177-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5C3501C20481 for ; Mon, 13 May 2024 05:48:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F7FE146A68; Mon, 13 May 2024 05:47:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="CY1e+wNP" Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) (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 5BFFF1465B5; Mon, 13 May 2024 05:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.156.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715579232; cv=none; b=QiuyPxbg+KVty33+XJSRgAo8sNeXI4AfmVpI1GES4Zxoi10dwMrnd/QzfmOubMt/qO93HXIFIzXsVXT7CV9pYkUtT4aHITKAFhivXNe9BBULJnPkpUO1Ev4QdgzblNE3znawtl3bmJYUfkRTE+dEXPOyUe74qU0s7QOG3VCkz7c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715579232; c=relaxed/simple; bh=ZQb2+jnuLXwJoGH1fK4C6Xh429KIdyV1ARItZI6ro50=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cLg4n1HSdM+nhy3X+tqcfasE4naaCNJsHtsrt1i4CqlVbDvNL0H2JJ3ZyhVeZwOjWNILWTGmL6RZOgMdqYj7Tf/H7Xtr1FB6T67LxtDy4624Orcho359RTnvGtWmZSjNwFbnK1aIyHyWegmcUiorKQ93kcf7Ct362DHzv33U89w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com; spf=pass smtp.mailfrom=marvell.com; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b=CY1e+wNP; arc=none smtp.client-ip=67.231.156.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44CLjKqH018797; Sun, 12 May 2024 22:47:03 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= pfpt0220; bh=OZvmT2boOq9u2LiX64FnJgQxbVh/mRv404o2yXm+es8=; b=CY1 e+wNPHELeunGA50eMJYEfzztw0vciWmpPU7xXmOa363HKXrz+NuOUc5eU98KJzLA jJvqfHb9Ul/ZxfaUlqvxaDya7tnGdocVwZrPBW0v6PNI1Ns2e4+RzpDT2TrcCpve jCkAP/AVMCJPVtYXbWdG4zkajq7kbdXHI6oUCVPk+eCuAJ8gT8sOwckUrzXTFt2n 3VDl1JpjcxzQQE6xvVBtPU/o6ZlD9YVW7/jpISlfQhC3Rvbl4B83vyVASOUc/miF he2uyVpnXhlHa/4z2YgjGf24/SocG+0sKfCGQKk1ZQXhwhsDawnSU2MkZ7JYox1n qX6DlFhYVgmBV7B4PdQ== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3y286jb8p7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 12 May 2024 22:47:03 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 12 May 2024 22:47:01 -0700 Received: from bharat-OptiPlex-3070.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Sun, 12 May 2024 22:46:58 -0700 From: Bharat Bhushan To: , , , , , , , , , CC: Bharat Bhushan Subject: [PATCH 8/8] cn10k-ipsec: Enable outbound inline ipsec offload Date: Mon, 13 May 2024 11:16:23 +0530 Message-ID: <20240513054623.270366-9-bbhushan2@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240513054623.270366-1-bbhushan2@marvell.com> References: <20240513054623.270366-1-bbhushan2@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: SZjpRS813UyoNJY7Q_fmAacuwnNUMSl5 X-Proofpoint-ORIG-GUID: SZjpRS813UyoNJY7Q_fmAacuwnNUMSl5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-13_04,2024-05-10_02,2023-05-22_02 Hardware is initialized and netdev transmit flow is hooked up for outbound inline ipsec, so finally enable ipsec offload. Signed-off-by: Bharat Bhushan --- drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c index 8fbe39458e22..71208582cac0 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c @@ -825,6 +825,11 @@ int cn10k_ipsec_init(struct net_device *netdev) memset(pf->ipsec.outb_sa->base, 0, sa_size * CN10K_IPSEC_OUTB_MAX_SA); bitmap_zero(pf->ipsec.sa_bitmap, CN10K_IPSEC_OUTB_MAX_SA); + /* Set xfrm device ops */ + netdev->xfrmdev_ops = &cn10k_ipsec_xfrmdev_ops; + netdev->hw_features |= NETIF_F_HW_ESP; + netdev->hw_enc_features |= NETIF_F_HW_ESP; + mutex_init(&pf->ipsec.lock); return 0; } -- 2.34.1