Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1957709lqo; Mon, 13 May 2024 03:57:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/qPExuHk7S3IRqxDTU97WR9rSWHnZapSX6ipTKtMypfq1Js7xeAEJut342WwAr3xM6T3zt0ywGyx6xoOVhNgIrQQn3qgIjNp6K0edAQ== X-Google-Smtp-Source: AGHT+IGgjkuR8QoA1Qoe2j8xLDj33EakUxaND+OjjIK2Cs2TFwx2aNvYcDTUk11F8MtswVDoHg/v X-Received: by 2002:a05:651c:23a:b0:2e1:a747:532d with SMTP id 38308e7fff4ca-2e51fc36328mr82724401fa.8.1715597868277; Mon, 13 May 2024 03:57:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715597868; cv=pass; d=google.com; s=arc-20160816; b=uZQbP6JrDUDdJvL0JEPQwtA66d9YzMlAy9EwYdCQQpY/O9Ck3p0eHUOUel5k9uMrg3 ak+xWfwyP2HKyC0mTGKqMufqqQzheEmAkOQq9vT6sk/I/abxwHkOivOoM8Y8gXvMSbU/ wQMLYN224kT82T2K20YkLdJfEGo9mqpc6VYyf0d4RbS0XmQw4BgYgi3nrxeJ5Anm2SrW nn5i+dW/n6D4k0JT3UE0inTjd73/v3WeNl/ctmxN+bwDAdt5iTgp4oocZ2uEddvF0tPh Cn26hKeH75DoJf4dtJ3iRwiR8M3y4k0RbgPmHtmPUTZPQymyCOpZ2dtffEWU3N/uJYGG Bf2A== 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=/IKQPQtPqub7ui+Etnnt9AHQ6GA4voprL9sZu9yb3zk=; fh=bmjP/KIb7yRXxywpA+4EodyCgFIr3x04cvs2nu37av8=; b=l+/ourGJpygCtTqh/Ttm1jsEeOrDS4ADpsN5ur1s/IHcgf/BU3AnsdVjrwRMftGPj5 +/5BLnPVtM9bNpwijoK9ugWjLXHGMZ/HUvb8pnKRQLAKeccNjMD4sDBDbhrS3tOkybzi JgZLoLKHP106Uf6uh3j0QpmmWlr6qK4I76L3MKTufSTcwV43+CvK5IzdrJvsl4aqdsSp riD4eXs2RZB7XON071LUwDIhftvIaaTASME3lxS6OgddQUzK8rQXIJGVK2G8UNrMjVfY S/G+RkDZOHPNiDeOk700PkoT6Qq6BLri8vOPd6/Pt4QWlvpfeEtVBYHGZKJRO6YaGeAC x/Qg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=e1dz+aRr; 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-177486-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177486-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21f68si483233866b.302.2024.05.13.03.57.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 03:57:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177486-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=e1dz+aRr; 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-177486-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177486-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 02AC31F2100C for ; Mon, 13 May 2024 10:57:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84AB1152179; Mon, 13 May 2024 10:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="e1dz+aRr" Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) (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 77EC514AD1C; Mon, 13 May 2024 10:55:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.148.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715597752; cv=none; b=Cs+X64XZszerEAsjroFtc+sRhWAoier0tofVoSkARRQaXySct8u9m6ngcddJob3HuWG1wQ4c+VlEYUsyB00aJFEUB8Hj+It20B8TjDEC6qQDE6Wk2b/jPwx25PZV1fBc/YDzbFOp+uei99a1Kro0avWSioQkBjrlP7y+msWYl2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715597752; c=relaxed/simple; bh=T24MM4FTYzjlR7AqvBt8nL8doXCXzCbcRr8aceftZ6I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=co7Fkt6KJNQ7iKeTaVKGFPP6ndhnPC1MY00C56+f9caKJ1MHHj43CiAQ9sY9j9WcN1P3FadrJEunKH07uTaVBivv7+STxTYAGE6kDQA6y3v7JA69msCM43u17No56jWa4P42Wmyulv9hJwCaPhpZMm47IYWB1eTv8e12nFIGGBg= 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=e1dz+aRr; arc=none smtp.client-ip=67.231.148.174 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 (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44D9fi2L014208; Mon, 13 May 2024 03:55:40 -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=/IKQPQtPqub7ui+Etnnt9AHQ6GA4voprL9sZu9yb3zk=; b=e1d z+aRr9/TobjsL/K4fILzkp3/N4ODn0e8enyNpY7hwCTZ2D1xHPBo9qJ6XdTpJ0Br EHOiQ6AOqRV0jgWz5kGLKSPq3a2mh/yQLiScuDGnUxQj8f9SAcRCgyNkoVvRAooN 9kWloHRXkmyAP0V/xNVL41hj2xJOw4cwMSDaGsBppYTqVfSkB8ctrBi+81HGEpHh KA5KjCVS21j7bGvD0Vp5aaN5VoL2RAqWyFaGEc1v5XRH9Oq1GQ+KMe9XhQsd7hhx wRR/63DHzwb9b91Bih81zIet648H2T/TdAuzIfKfvUQcZP2latBx8hdEfDAFTQou TB1GFtNT2Ct0oReEkAg== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3y3gf4g5k1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 May 2024 03:55:40 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 13 May 2024 03:55:39 -0700 Received: from bharat-OptiPlex-3070.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 13 May 2024 03:55:34 -0700 From: Bharat Bhushan To: , , , , , , , , , , , , CC: Bharat Bhushan Subject: [net-next,v2 8/8] cn10k-ipsec: Enable outbound inline ipsec offload Date: Mon, 13 May 2024 16:24:46 +0530 Message-ID: <20240513105446.297451-9-bbhushan2@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240513105446.297451-1-bbhushan2@marvell.com> References: <20240513105446.297451-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-ORIG-GUID: -F4mAbDP0HBLuP3rXdrF8-YBcbzPNbyy X-Proofpoint-GUID: -F4mAbDP0HBLuP3rXdrF8-YBcbzPNbyy 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_07,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 5375bffe8a90..d57bd56299c1 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