Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp215825lqq; Thu, 13 Jun 2024 00:21:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwD2xkD6TZm6Ps1EUMfG2SeX4zU/+aGlIoySbOEKWviHYKSBRYB1zgXTVLSjiNFnxYaC3PvCsk4QKEX8Ga+Q/5uggI1bm9d1bq+qFmPA== X-Google-Smtp-Source: AGHT+IEQP/WFKN6s1YmU6LxyOu8wBcG1X7x1mKmA6roqn08Ae/AjBMOF/IhXeOdWiCyepLWgmZHi X-Received: by 2002:a2e:7217:0:b0:2eb:fa7b:5581 with SMTP id 38308e7fff4ca-2ebfc82398dmr24527261fa.0.1718263315060; Thu, 13 Jun 2024 00:21:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718263314; cv=pass; d=google.com; s=arc-20160816; b=oIR6B1ICjrPqy/kzRq1DH9wlyq346Gws3GuDZJEkvrv3hR2It+mCk7ogjndw2yjXZq 8w1NhsUro2R6e57ojhSDZr+kIzIqfeQj/XiunqvfCRfhd/pWhojhVHlkNqQCP/7+wBiF bG/Vqvb83fvjMpiYpJUVpy31UhnZaBIWRIHykhM/+l7JeUjSK5ZgdT5b8saGOSE54GQX IACr/XfA9k+TpOOrzpO53wbv9ahxiVshAC1wJU1TCer4FxA6iOXN4HZ4RhiyBnZIS8hy ueO+pQ38eWox7DhvSjuTfMmNoFHqNyWcqbzj5HCATiFxqRNaGqfvCGNAHdn+H7dyGXPn Fmzg== 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=4Y4LL8PBTONkB0gFvC8uI7FhIhgsmlOifoX2nDKQZmw=; fh=j7UdCSvSbUmOxvkqY4yQZi9wqG46MeQhtGJgH3+ZkeE=; b=Bg7ITzMNicjFHqVPN+e3aG1n8U2+uL6H8LWetedMsg/qhQOrP9Kek0fuwyE6V/mWYz 1qjq1zdu8u2qxop+P6KHyCUwBWQSHfRHKJh+Lq/5Y52U4y5fUn/OGM0lnDwmi5nkWhNA mZjgawgq30gtFXF+f86KHtcHvM/hxSIkFs2ussPjUWauLGW2CRb2WiHQ0RsYCoR/gMrD u8NF2YP1hKvl4xUot3KXFGwMSFMalos+WuQb1JRazqV3at9ETJrOJqFr+jcIlr18WbuM ND/VvkCr0Tvsb4RThmR4fcY4PaPWqp3bhYikyyE6AWOMlDeai7Z+MqO0H1bcI3BrSS3u 5F8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=kAQfI4NB; 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-212682-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212682-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. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57cb742ce14si446254a12.277.2024.06.13.00.21.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 00:21:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212682-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=kAQfI4NB; 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-212682-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212682-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 B52331F23D48 for ; Thu, 13 Jun 2024 07:21:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03158824AA; Thu, 13 Jun 2024 07:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="kAQfI4NB" 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 9AADA629E4; Thu, 13 Jun 2024 07:20:54 +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=1718263256; cv=none; b=PU/VIBC/EF8xbHRjEvbkQsU9UhQIrCMiTWSdeqMkcYHs+7EtxSZLiY1LgZ3JJXcV7aOazSEOZVe9BE+hQ2L8zHLpu8cz3IUODjcYjxgUtmhaLSpw+FXq0YZIeD8/bmzvGGwixJDE2PIwI0A0c4EuL+AjVPBducZlndcbcl27P8Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718263256; c=relaxed/simple; bh=yMFA6rjub/hVmmdL32HESANHPl3UzVuSCHp503jaW8g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=F8rlVEXWDvxtKqjHQsD0m8/UMEsSB/Lm+3502xozYSTy1fNOkKYquuy9GrnJrklrJYSwfsL2DA0byDjaSpHkPDXq6RAtOhgR8MmOVILaH5+gDRbhLa0JJmdlnb34sMiyaXQdjtMRRksda8c1+hhv4cHIMttkMH7tnt37L5SeCqs= 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=kAQfI4NB; 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 45D0AtJp019196; Thu, 13 Jun 2024 00:20:40 -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=4 Y4LL8PBTONkB0gFvC8uI7FhIhgsmlOifoX2nDKQZmw=; b=kAQfI4NBdPxVyzC32 jDrfZUCHmKyjCS3zLS59Kvb4d46qJKMHjJ5oLosHpMdi7THJvrBTxZVeMiXuFCia lSs26r4yRXTtTN+sx99CeYpo81i0jhmDGr06wEMy1hNqJtcINVpLKMDS3Q4y7aow pinl+/Rno0AioZksDx5BBqEJ8f+pesa04Ch3ARuZIlGqDYalYqZf/Q1Vm8fnWnbK uUQDdSdGUaua+94N8RxKygWddmhwI5wMIw+xfH+L2CcHnqRGhSCsTKYg2kl6p4qN EfTduLwfT0TdvWPymRRXp7V68WZrEHSNxMt6rlPHWcww38DBv/Q7VwB8a26b0WWw EKR+A== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3yq8syw4mx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jun 2024 00:20:40 -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; Thu, 13 Jun 2024 00:20:38 -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; Thu, 13 Jun 2024 00:20:34 -0700 From: Bharat Bhushan To: , , , , , , , , , , , , CC: Subject: [net-next,v5 8/8] cn10k-ipsec: Enable outbound inline ipsec offload Date: Thu, 13 Jun 2024 12:49:55 +0530 Message-ID: <20240613071955.2280099-9-bbhushan2@marvell.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240613071955.2280099-1-bbhushan2@marvell.com> References: <20240613071955.2280099-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: 0ZJLxJqYWpHo_j2EzkyKLWCK3pEVTQif X-Proofpoint-ORIG-GUID: 0ZJLxJqYWpHo_j2EzkyKLWCK3pEVTQif X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-12_12,2024-06-13_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 0db769199303..0cf411974eb2 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c @@ -837,10 +837,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