From patchwork Sat Dec 23 13:39:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinas Rasheed X-Patchwork-Id: 18500 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1676749dyi; Sat, 23 Dec 2023 05:40:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGv0aiWzhShU96+C7vGRtlT+y4tX7JZqaKRYH2BwDybHHHvpCwb8ETDd4WKYd0ZsXY1Nvtp X-Received: by 2002:a17:903:258b:b0:1d2:eb13:5cd5 with SMTP id jb11-20020a170903258b00b001d2eb135cd5mr1531809plb.42.1703338853289; Sat, 23 Dec 2023 05:40:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703338853; cv=none; d=google.com; s=arc-20160816; b=ph8cYtnzzUNIGrLRc4q1hF9n/tkoETkGSL/W/WVEWgVk5NneGSbvRwvoDYQK7W+jDh yWj88dKyYioJy9g4JQWW8B5DXW/DtvmQTYbZrUUukFg5gfWpZk/ribdGWDf7M/XUOZSE lPW4OWo1gXSSx2mYzvCxVXV/cyOe5hJZV7mXbR5tk/N00UBBlZqFzLFi8v8MD4nV6Bbu 91yL3MARSwZOcDQyXcPgrsEXgASuNrd5twJEor3OYx+3gg/Q/bWqYxXprcaE/+BXCxq7 xQzqWHny0tawQsuZoaLd2Y6l7R1qTuw1jPQLz0hgSN/BFS0+cVGlucCfYCzOi9tMWjGE zBSA== ARC-Message-Signature: i=1; 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:message-id:date:subject:cc:to :from:dkim-signature; bh=lX8YURiGITqZVl4eN7Nqst0RXg0e6i6f6bCuPtfWJjo=; fh=VEmtmbrSMAf7klXCiVn/miqlL6KvgVnlb9qrYPH8GrU=; b=iUoqXGtUevII6aomQwt+lcxT63+IQ99nMNSN9NqijTtrHxqRyPx1bMdcJGs0zTPqht dwqRLhXmjWitr9y3DVEq82FPdpDbJg4eaVRaErQ6fuqE7TNyHrtvVPXcziR912j49XDy veHcs8vV3dkQJ7x15DLxFXG7Dj+elhD2J6/89Wi46rXsJG4iRwwNTM4YLMXE7jPAPakQ XfQ6ukHhZKkrKiQS0xcRhQsLU6V+V3yPOW1Q3gwh58s+KiyKne6RATcFtFeYfnMiGexQ hrOfNSOksAzBnd1F4PMUXZfb6qg13CF0fpuzpJr8Q1yQn6mZZfmEUf7QKGGqKFTWYrhB 1dQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=bQ4xY7K0; spf=pass (google.com: domain of linux-kernel+bounces-10422-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10422-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id me13-20020a170902fc4d00b001d3e11b91eesi5011323plb.375.2023.12.23.05.40.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 05:40:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10422-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=bQ4xY7K0; spf=pass (google.com: domain of linux-kernel+bounces-10422-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10422-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0F2F7283277 for ; Sat, 23 Dec 2023 13:40:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E24BBDDD2; Sat, 23 Dec 2023 13:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="bQ4xY7K0" X-Original-To: linux-kernel@vger.kernel.org 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 D3B06D300; Sat, 23 Dec 2023 13:40:23 +0000 (UTC) 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 3BNDe5eZ030737; Sat, 23 Dec 2023 05:40:05 -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-transfer-encoding:content-type; s=pfpt0220; bh=lX8YURiG ITqZVl4eN7Nqst0RXg0e6i6f6bCuPtfWJjo=; b=bQ4xY7K0uJ+5IN4lwNGg5NQH wDpd8z+uEWhRowkhGzWN7VdQH/HQf4nlI9ahl9ilWKr/rFmuG9lc/Ua+Y8jyecma r8ysEd0C7/0pbfB7Iq2Yc7cnoD5SCrmTrfTxLMTT4bbQsTHmHwxB9jLsMPq5IDNp oyK5L6LrBTOeSb5TH9cJrgUlpxRzGFuxdrwLq7tiYr5anCgZIuON0HoJ2QxYqEXT 6aBDWha8QYVMf7tgR9E8/6h8TOoxTNSrQK2Irn+fCfzESIgTKpcr1H7AY7VJ+79N TAKKatfHpdqQyGVvCqPVOEdcJ0Cgii4uDaukSKlm1TGBeJyAUeZVsaRVKkrmkA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3v5wspg81x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sat, 23 Dec 2023 05:40:04 -0800 (PST) Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 23 Dec 2023 05:40:03 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sat, 23 Dec 2023 05:40:03 -0800 Received: from ubuntu-PowerEdge-T110-II.sclab.marvell.com (unknown [10.106.27.86]) by maili.marvell.com (Postfix) with ESMTP id 5864F3F707C; Sat, 23 Dec 2023 05:40:02 -0800 (PST) From: Shinas Rasheed To: , CC: , , , , , , , , , , , Subject: [PATCH net-next v2 0/8] add octeon_ep_vf driver Date: Sat, 23 Dec 2023 05:39:52 -0800 Message-ID: <20231223134000.2906144-1-srasheed@marvell.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: WWI6X4cPuudqvOLDttD9gXiMQ0GttIIj X-Proofpoint-ORIG-GUID: WWI6X4cPuudqvOLDttD9gXiMQ0GttIIj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786080241057503659 X-GMAIL-MSGID: 1786080241057503659 This driver implements networking functionality of Marvell's Octeon PCI Endpoint NIC VF. This driver support following devices: * Network controller: Cavium, Inc. Device b203 * Network controller: Cavium, Inc. Device b403 * Network controller: Cavium, Inc. Device b103 * Network controller: Cavium, Inc. Device b903 * Network controller: Cavium, Inc. Device ba03 * Network controller: Cavium, Inc. Device bc03 * Network controller: Cavium, Inc. Device bd03 Changes: V2: - Removed linux/version.h header file from inclusion in octep_vf_main.c - Corrected Makefile entry to include building octep_vf_mbox.c in [6/8] patch. - Removed redundant vzalloc pointer cast and vfree pointer check in [6/8] patch. V1: https://lore.kernel.org/all/20231221092844.2885872-1-srasheed@marvell.com/ Shinas Rasheed (8): octeon_ep_vf: Add driver framework and device initialization octeon_ep_vf: add hardware configuration APIs octeon_ep_vf: add VF-PF mailbox communication. octeon_ep_vf: add Tx/Rx ring resource setup and cleanup octeon_ep_vf: add support for ndo ops octeon_ep_vf: add Tx/Rx processing and interrupt support octeon_ep_vf: add ethtool support octeon_ep_vf: update MAINTAINERS .../device_drivers/ethernet/index.rst | 1 + .../ethernet/marvell/octeon_ep_vf.rst | 24 + MAINTAINERS | 9 + drivers/net/ethernet/marvell/Kconfig | 1 + drivers/net/ethernet/marvell/Makefile | 1 + .../net/ethernet/marvell/octeon_ep_vf/Kconfig | 19 + .../ethernet/marvell/octeon_ep_vf/Makefile | 10 + .../marvell/octeon_ep_vf/octep_vf_cn9k.c | 488 +++++++ .../marvell/octeon_ep_vf/octep_vf_cnxk.c | 500 +++++++ .../marvell/octeon_ep_vf/octep_vf_config.h | 160 +++ .../marvell/octeon_ep_vf/octep_vf_ethtool.c | 307 ++++ .../marvell/octeon_ep_vf/octep_vf_main.c | 1230 +++++++++++++++++ .../marvell/octeon_ep_vf/octep_vf_main.h | 338 +++++ .../marvell/octeon_ep_vf/octep_vf_mbox.c | 430 ++++++ .../marvell/octeon_ep_vf/octep_vf_mbox.h | 166 +++ .../marvell/octeon_ep_vf/octep_vf_regs_cn9k.h | 154 +++ .../marvell/octeon_ep_vf/octep_vf_regs_cnxk.h | 162 +++ .../marvell/octeon_ep_vf/octep_vf_rx.c | 511 +++++++ .../marvell/octeon_ep_vf/octep_vf_rx.h | 224 +++ .../marvell/octeon_ep_vf/octep_vf_tx.c | 331 +++++ .../marvell/octeon_ep_vf/octep_vf_tx.h | 276 ++++ 21 files changed, 5342 insertions(+) create mode 100644 Documentation/networking/device_drivers/ethernet/marvell/octeon_ep_vf.rst create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/Kconfig create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/Makefile create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_cn9k.c create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_cnxk.c create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_config.h create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_ethtool.c create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.h create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_mbox.c create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_mbox.h create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_regs_cn9k.h create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_regs_cnxk.h create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_rx.c create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_rx.h create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_tx.c create mode 100644 drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_tx.h