Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1513027rdb; Wed, 31 Jan 2024 00:19:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHcDbvsmbZRcIZKMLwYI6Dt/jWyz1y2E52vIj8nMUXSbl9qWkbDW4KuPmXwNdQUbTRWSd18 X-Received: by 2002:a17:906:68d7:b0:a36:5657:5a29 with SMTP id y23-20020a17090668d700b00a3656575a29mr564023ejr.48.1706689195530; Wed, 31 Jan 2024 00:19:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706689195; cv=pass; d=google.com; s=arc-20160816; b=RKPMnTDOwviUYkCxXB3gsUB4T+RZ+PNQdpwe/2SjOfR3YF3uEkuN7KEVYPw+NVd2mI aVkc74dvEqdd6P6fi9EGlLrdkR/gUC6Az1au4c64ZSmU63EB1ZBKqe6ourWg+Yj0216Y DKLRmIDuIO0kHNdCp1LIiOflXS3S6yKoQ/dlY9b7fLVGq7gpWRyLpFhcXIQQROEAtzIh bVJ2HU2WMY5oZSuKlyDnxadUICZQaiSFghspetes1OefFFlMYvCAtzD0nPDVYowV0Vg1 JKqfA+4KdtrpFhXe4l8DsfqA6U1EwvfdXZxZnhen/mbMz/DQECDgh9NeDo6SCP+sWPeW Nt0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=ddK/t4zmxUxGOtboW7SIg6Tqsmf8tZCG4JAxK5QM2fE=; fh=ZTrVS+p82ddbDVf1/eIEp7WVbz1odeA/7D4yBaZ8W1E=; b=psf6Gc18TAJKjn7j1gB17nEagnWxdoSXkkubFCXlAfK97PSWpFUKpl8ZeUbNB3sYgC 13DMJiJ8wG+QWz+ES/1o/fhEV3/sErLYE3gamIKcwr7QoWszzGy0zaACxW+cHnGPs7Hk Du0wWz8mrcnIjPZn4Uaw/X9nz4lDQq6rHubDWryrH6WcvqgUpbXL/iPOcgaLJuC3u0HA 8T5LsEJakRNgXwGSep/h2TSq+fYwgKg69GZnFSOzqXmdb6E/fEy5a2taSl5s5LfEQTFd NjZcZYhgLUPuUaShydYAso2QGmG9HuiIa3v9uaWmNbllPYpCwHLGCvaOI7c3wmnLC0s/ gvdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=cw8YYKqN; 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-45983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45983-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com X-Forwarded-Encrypted: i=1; AJvYcCXIBHALV9ksJjMERTYvC2NN9ObSDz7y21GX37lBwSa6CsBbwUPFnW3PprflLLDA/8Fn0eAgzFXSBmUK3IWXEax1mxcqQBx3v8oEwdNTlA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dt16-20020a170906b79000b00a3600b03138si1876841ejb.1003.2024.01.31.00.19.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 00:19:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45983-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=cw8YYKqN; 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-45983-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45983-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 4A1E71F25CAE for ; Wed, 31 Jan 2024 08:19:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6341558206; Wed, 31 Jan 2024 08:19:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="cw8YYKqN" 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 ECA1B5D739; Wed, 31 Jan 2024 08:19:41 +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=1706689183; cv=none; b=hr6Rx34ZnCLBTNHFAaV4vT5j3mqhaBAHF4JMW+Y0ce9+DRnwaKEL3YMmC+IiFcMdJLQ1LR5eVGhlA+eEHJue46eGM7pJWJC6CiFUCClDJpp1zSxu6ECm1csc0BcXXE1NKvR8SSn0j8sAHRW0+A32M/WVKcTXv1I8l2YVO8NtVtw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706689183; c=relaxed/simple; bh=roonl72rZoCY0eRCPNI1fFfaZaXU4SJaWKrmE9lbXwk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=pdCCt6DGxK8PHNYfFfz342stInc/AGARE8rgIj9fp33uTDrOruzwdviYEKHIbc0Trtx+vYIU7tyGq071ZdsLLUv1g8ZiNWzN7juXiPYD2qtIx0X+61UEU9TAMWPQGD4MlVx1G1vAiaMOBfQMnCZkk3E53feF48yyu8+N/TjgRxo= 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=cw8YYKqN; 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.17.1.24/8.17.1.24) with ESMTP id 40V5BJEn005588; Tue, 30 Jan 2024 23:54:47 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= pfpt0220; bh=ddK/t4zmxUxGOtboW7SIg6Tqsmf8tZCG4JAxK5QM2fE=; b=cw8 YYKqNyUhXdOYA7Qjp2mPYh5bKzsRJDX4BCq2fyKstYvGE9Kltwas/7EaoEiLwpxL YMYrB+A8Ana9ZGVsqJ/rA6dut1E6vGMOxsYCLqFyTMYujdYPvklzDXgeQsSwiOqk I4/JRIwcDNw+RkeDFGxjajvm6rsCrOooisEylvPXnZPux8db8txvMoNdtlNXgUuy 02iWv3iZCaEQAA6feQ65FvQZ6E05WCKtPgnv37QmtPug7/tu7OAUCvHfyjJO6k/6 MuzEwFo/bbbiH8BePda+XgBh6jav5oPIzVJUHmT6RaB+g1oMmpEN0ERmwZJt3HGn S8muNXelSqnOondhN+A== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3vy64ka98x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 30 Jan 2024 23:54:47 -0800 (PST) Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 30 Jan 2024 23:54:45 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 30 Jan 2024 23:54:45 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 398525B694D; Tue, 30 Jan 2024 23:54:41 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [PATCH v2 0/2] Dynamically allocate BPIDs for LBK Date: Wed, 31 Jan 2024 13:24:39 +0530 Message-ID: <20240131075441.17227-1-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: -Log7YDWi1FvVNTg10i6h1ki5MJTJ8hp X-Proofpoint-ORIG-GUID: -Log7YDWi1FvVNTg10i6h1ki5MJTJ8hp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-31_03,2024-01-30_01,2023-05-22_02 In current driver 64 BPIDs are reserved for LBK interfaces. These bpids are 1-to-1 mapped to LBK interface channel numbers. In some usecases one LBK interface required more than one bpids and in some case they may not require at all. These usescas can't be address with the current implementation as it always reserves only one bpid per LBK channel. This patch addresses this issue by creating free bpid pool from these 64 bpids instead of 1-to-1 mapping to the lbk channel. Now based on usecase LBK interface can request a bpid using (bp_enable()). v1 -> v2: - Modified commit message. - Dropped patch2, as for now rvu netdev have no usecase. Will be upstream along with the CPT driver. - Addressed review comments by Simon Horman. Geetha sowjanya (2): octeontx2-af: Create BPIDs free pool octeontx2-af: Cleanup loopback device checks .../net/ethernet/marvell/octeontx2/af/mbox.h | 2 + .../net/ethernet/marvell/octeontx2/af/rvu.c | 14 +- .../net/ethernet/marvell/octeontx2/af/rvu.h | 21 +- .../ethernet/marvell/octeontx2/af/rvu_nix.c | 179 ++++++++++++++---- .../ethernet/marvell/octeontx2/af/rvu_npc.c | 8 +- .../ethernet/marvell/octeontx2/af/rvu_reg.h | 3 + .../ethernet/marvell/octeontx2/af/rvu_sdp.c | 6 +- 7 files changed, 181 insertions(+), 52 deletions(-) -- 2.25.1