Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2665245lqb; Tue, 28 May 2024 07:02:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVty3rqeotN8GYmUJenhO2H5QDr5Q7qETUL1OJziXKX4dI1vcV7bFeOIQorNipREAXBd63Cbw9pXO+HxrDPo1asPsAxEctcV9WUIP0C+w== X-Google-Smtp-Source: AGHT+IEQxu1kRP/SAfmnjvT7hd4ZJBTmDeMDr9ieRCY5MUYHnUGLeoG0TrChx1R2FLdtVauIP9/8 X-Received: by 2002:a05:6a20:1581:b0:1a7:94ea:a9b4 with SMTP id adf61e73a8af0-1b212dc269fmr14638150637.32.1716904938265; Tue, 28 May 2024 07:02:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716904938; cv=pass; d=google.com; s=arc-20160816; b=Y8Ish58GoJFDaiFl208UJcixnYyGkz22vfESxVJuZutBC52CW+P2cvxQTXDgqW6t7S bb5RakBiUmd9RK8jolLw0ibVZVgwl9e6zus3ZoH3aBf95XmSIRLi8gKbymvGcIOVEN3x qKbtwaoymppKwmsC/bEc2i8HD+6qt+QJHV8vrcWWwUuktefKPLEKZhtYCHS9ahM4F3Rg V1k0R+d/2Vuylvw6wl8Lwvw2CysSmqhiElgV2cP2bfs8NYxKhBJboPpopqXB4oOl7iw5 A8MaVVOMNlZAex+Mo94ChNoz9ACLmhIUrpTUtBe5sZFmaBcGDNNYppQrmtfmuTZeGYBb pJIw== 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=IEnWp14u9UbM1IL7j9aMjnmhDh9rwFviGPqlrup4LAc=; fh=j7UdCSvSbUmOxvkqY4yQZi9wqG46MeQhtGJgH3+ZkeE=; b=SazLoV4Nwf84vBuT3KxBGpx3NseC4coDp/pCYqCDIh50bVGFj5FWDKMu0n1NGwM6a5 QJAAv1btnOOMjj/gb7Ma3KxjZijEWzQoGVk4vsK0bE5pL3x58UWvmvZ0wb5hEqCo35P7 bpq90/SvTdnsZxPMRplZxI7SFiceFKHOry7Gm9xUA6EOq7ZEakFY2bX/22WepxVH3+d1 E6vGbslVnP9xbQkHu7Aw4cZukt0HHx5B2hTj8JEscsBTm2urafUjqcyrXVsH47S9/XdD WWxuGzS3wajt/OCrpG9hKheBlue2REURZpA5HSCxfSOZV5PfOMDfZdZ00zUSYbMG/wcM 9XdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=d8jzvVBz; 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-192477-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192477-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-682287f20dcsi8263941a12.437.2024.05.28.07.02.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 07:02:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192477-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=d8jzvVBz; 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-192477-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192477-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0C6AEB213DC for ; Tue, 28 May 2024 13:56:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8BE5E17166E; Tue, 28 May 2024 13:55:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="d8jzvVBz" 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 28A3016F27C; Tue, 28 May 2024 13:55:05 +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=1716904508; cv=none; b=UFbBkbQqCXiBO2papAUQhrqKL79ShLNPxGk02uEHjRveUAjJbYmDpZmM+HBmyEXlgdhDd+ci/taqM47DT30HAbA4UVjvEK92KHD7IodjRnqFpMHd1A6YmmUbJCPrA6LGNmByfgnGJwqJDkusYUM6sSyhvPYWll3SlUPNdSPGUMk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716904508; c=relaxed/simple; bh=9922eDFCfXY0roYiZAm+GU+PhvSKQjhYDQzw9J1N8fs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DsaA3CsoK6Fcw3uM+WnRnjyOXIKRUsID8InilHknSXo8zPP/dQh+Qy4+j/dHwS6ZvggIZjTk4QdsZeMYRVOFayzneVd+zrNyGIgFo6y/gjXOiExoWXsy0/2D/oSllcxqKagIvMYhrmGyAY9pMqrk2Cxw/timcSTZ6IUyGOXP8Xc= 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=d8jzvVBz; 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 44SAbsFc001366; Tue, 28 May 2024 06:54:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=I EnWp14u9UbM1IL7j9aMjnmhDh9rwFviGPqlrup4LAc=; b=d8jzvVBzdjkMMwa1b 2nWlXrB/UVAGey2YESQyVTK+VzIcM5LCTAiB+bXN5pX/Sn1uuzA0r5l0nWTHNSy1 iCQuwA4tJKwV2DC1KVyA+0PyPnaeTCglqOh/kkhUD/mLcEGjG44ZjBmDi8gOYuqv 4HhhErI1k0VMFskFRRC9QxzitTL5ROjfO+9FMi4Y0rsn4GfuBXpzEa0r+qD3ebW6 4v4Gk6JFY/H79LQcNtdsdi+5ONRzd8kvQNvoSs3jrUZvJ+mibInu8Yfy/osxwo9v ebofraVK+/yraLDLq7/jjwNTMTvD7C5tEeVhR7/TmG9GS48DI0DbkyqKfFO3nB2O iGmHA== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3yddnv8pcx-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 May 2024 06:54:59 -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; Tue, 28 May 2024 06:54:42 -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; Tue, 28 May 2024 06:54:37 -0700 From: Bharat Bhushan To: , , , , , , , , , , , , CC: Subject: [net-next,v3 8/8] cn10k-ipsec: Enable outbound inline ipsec offload Date: Tue, 28 May 2024 19:23:49 +0530 Message-ID: <20240528135349.932669-9-bbhushan2@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240528135349.932669-1-bbhushan2@marvell.com> References: <20240528135349.932669-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: fbgg8i0dcEAxw6PXo8EutoeHjrj5ratB X-Proofpoint-ORIG-GUID: fbgg8i0dcEAxw6PXo8EutoeHjrj5ratB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-28_09,2024-05-28_01,2024-05-17_01 Hardware is initialized and netdev transmit flow is hooked up for outbound inline ipsec, so finally enable ipsec offload. Signed-off-by: Bharat Bhushan --- v2->v3: - Moved "netdev->xfrmdev_ops = &cn10k_ipsec_xfrmdev_ops;" to previous patch This fix build error with W=1 drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c index 81f1258cd996..c9a1c494be6b 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c @@ -841,10 +841,10 @@ 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 - * NETIF_F_HW_ESP is not set as ipsec setup is not yet complete. - */ + /* 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