From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0060.outbound.protection.outlook.com [104.47.36.60]) by dpdk.org (Postfix) with ESMTP id B0D031B1A6 for ; Sun, 8 Oct 2017 14:45:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1iOVsqxwkdeiRPazznNEqLIaAkBaCj+gw3X8DD+4oIo=; b=mzziomJ04e7NzTyXExgwsR+FX6sN0szMM6+KCarEzj/ioCzTM4gwq5kwZBy/NpaJ7hfhZbnGnykz/x9tQPj1aEghXLFVwY026ynSvVfZazF7qR9rcZh4FhjP4Jl7CZy8R4micAK/MnDWVSfar2wAJVV7WPVDNTKEHK7fmBk0MQU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (14.140.2.178) by BN6PR07MB3089.namprd07.prod.outlook.com (10.172.105.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Sun, 8 Oct 2017 12:45:28 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: ferruh.yigit@intel.com, jerin.jacob@caviumnetworks.com, Santosh Shukla Date: Sun, 8 Oct 2017 18:14:08 +0530 Message-Id: <20171008124430.1866-5-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171008124430.1866-1-santosh.shukla@caviumnetworks.com> References: <20170831145436.5397-1-jerin.jacob@caviumnetworks.com> <20171008124430.1866-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MA1PR01CA0113.INDPRD01.PROD.OUTLOOK.COM (10.174.56.157) To BN6PR07MB3089.namprd07.prod.outlook.com (10.172.105.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6fdf37f3-db44-4f67-6eab-08d50e4a757f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR07MB3089; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3089; 3:REhzvNmvaELsn+EHLhfdrmN3kttpMoKm8eNmojT010Z8+65ExiJrtdJcX2gnrr9zoUoqk4ZCwF6p8+k7Uov+Ws7X6JuJ+8vLVWTiXvC6ar/9KgXthOMzY4gmXedqk/B/5ZKDRFtvQGcGbbxQoMRxYrd//i9xI9ZhPZkTyy55CfHa6ENAmvTc/o4fGrXDwS3JnHm9M8YgK6epm6hGmpqc/uhJRXaPoEgMV7a6Dz7WwoNfFKrvZwCpaFlHzDDyz/eF; 25:zt2ElT6qFyApFI/oq5ljwfX0QMNue5Yl7Yx+lkvhPDgooYgw//HKY84hq8seP7XoJvPpCYrn91EnSQqcN2ymsIpZyXBpLzDlDFxZq1GxBIKNBC/k/dkJ+nykxCz1S2XtK1jTUFlTSK8fKrEsA6JKfUGmdQLJMfMdN3Bnakmb3ihzaGLp5QOg61xlWNOnpPFVbtl98MMghhXAwjo+y6HnTET821/XjMugkbFVkxYkiCldQJ0UL/v11jLSvdcCGxvoRARACZV5F/EgBs9ItUCRHZ0u4aS0jy8Mle9hxlvImuZb5zKuSjv+ZwOHw2zNmfZkHjT4LORGJMcmeHDs9h5SEg==; 31:uHfsdPXA7EBnch/p/uKTa7nsoL3lF/qDlpq/rkTO9OFYtFeVpW6ddaYig5JW77zXUFpWYC4CH218ECmSsVmnZ96BYPQQDPeMwYEQyNOzFvlWpCby0ExWdRssVfkH6neq5PbvidWZq3ZoO9JIcu0w49L/xMkUQXWLN7tLhUcjd5XlEJ6ENZBlKseAB79hOZsuhs4khysou++9kW6Pg7vtq3+rkrgNfhiul5fsJIJrS2A= X-MS-TrafficTypeDiagnostic: BN6PR07MB3089: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3089; 20:uUJL/ks4lbtL19De3T/GHI+KrYrzRvra8/M8mECEB+nfvLqEdr5dsP5PaEqaQUbJF0Gda9ios8iFo3fC+RVvr1uqIg3xDHgCrKe4Jk9nhGqMvPwCkQLuOA+R3nHOh0t1fQNoNvvYwp14iao8WjDhRI2aplyDXIVfXiyd3ulCvUmQdC4rewJJcU/yhz/vhXc0Tllv+sFq+U5ftinV5wfs/iYutvfAknOHKuH79n68Ydio1tWVjA58y5cdIW1J/jPtbojziptNSvdk3zF1pPNCNKkuR/FB5b945UkVYzf8RgG99EjssxC2BHUkBioOneQzcmbGLFYfjgRRPlN6x7hloiAGWsxBMQ+pSrES1n3BrtszYHS8mWM/ltG16qRBXp64HviZEOWBRslwNwS6qkWLfH1C2/3rGcvC7anEps6smG/4vf4g+II9V2ogp3odLbYK3hmB1vp8Lpv5T6jlB5VWczQEFTN4d5Le5yGGXiC9W1/HVIwtkKpsx21uILdXXyTsco+OIOXDLtfVHcr56sxxepzM8IUSe0WXwp3o4M1rb9kUeFjECRLDNRuj4PTV4WJOw7MOkd9Nh4bjVWRxTL6qLgOFZLJDiyU9vRQ2xtaABf8=; 4:kR8i/x3MCemRVPFV3DmAVvytftZkbXmtzTECSAuHVyhXvANU78xYwuFLB6uKGTE6fPiYc2uHpjluzI5k46mh+8W9y9cH/ynRfQSbsFTX3Cdm+ai0BxcLLDFHi6ma7b3I2dZpUjjIX6bwvrHceM9CZjlIPDHC2GjSgNJ0LKuRrtGuckDGShceTZSmSK2eRbgg7WyOW3CvvtULpO7O1RoCWBo86OlZssqmjkXNhjZc05+9QUuUBnIXBTNavUy33VIvOu1C/VqCYYhLmmAk1LGd52+EXNK0I4xFThY81LRnm8Q= X-Exchange-Antispam-Report-Test: UriScan:(158342451672863); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(100000703101)(100105400095)(6041248)(20161123562025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3089; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3089; X-Forefront-PRVS: 0454444834 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(376002)(346002)(199003)(189002)(6916009)(42882006)(81166006)(2950100002)(81156014)(8936002)(50226002)(6486002)(16526018)(6666003)(189998001)(16586007)(316002)(6116002)(1076002)(6506006)(3846002)(7736002)(305945005)(8676002)(106356001)(105586002)(5009440100003)(53936002)(4326008)(66066001)(107886003)(47776003)(2906002)(5660300001)(6512007)(76176999)(5003940100001)(50986999)(97736004)(25786009)(101416001)(68736007)(48376002)(50466002)(478600001)(72206003)(2351001)(2361001)(33646002)(36756003)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3089; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3089; 23:iXzP4HnlwJdxab5Fp80xRJBLgtvFbJD6XhZnSGUvj?= =?us-ascii?Q?e4Ym3rcfQAJG70znb0Ico1fK1wL9IjT5sESfVMjHe5lIvl4gm9p8P7W3Q1zW?= =?us-ascii?Q?UI3fN+BP/79gZhiudfwXxiQsVceZPvJos8LDTwQrpSOKP3A2+Gr4pHouEu2H?= =?us-ascii?Q?VXHfSojecIDo55SHuA4UE0Spz2J34ul8NWnLvMnmzS2Mokv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FDwKREfv5JjnnZqhhsEnZ8bz1RkVUk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2017 12:45:28.5793 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3089 Subject: [dpdk-dev] [PATCH v2 04/26] net/octeontx/base: add base BGX operations X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Oct 2017 12:45:32 -0000 From: Jerin Jacob BGX is an HW MAC interface. This patch adds the basic BGX operation like open, close, start and stop. These operations are implemented through mailbox messages and kernel PF driver being the server to process the message with the physical port identifier. Signed-off-by: Jerin Jacob Co-authored-by: Santosh Shukla Signed-off-by: Santosh Shukla --- drivers/net/octeontx/Makefile | 5 ++ drivers/net/octeontx/base/octeontx_bgx.c | 119 +++++++++++++++++++++++++++++++ drivers/net/octeontx/base/octeontx_bgx.h | 74 +++++++++++++++++++ 3 files changed, 198 insertions(+) create mode 100644 drivers/net/octeontx/base/octeontx_bgx.c create mode 100644 drivers/net/octeontx/base/octeontx_bgx.h diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile index 2d8f2e1d6..91de31864 100644 --- a/drivers/net/octeontx/Makefile +++ b/drivers/net/octeontx/Makefile @@ -47,6 +47,11 @@ $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)) VPATH += $(SRCDIR)/base +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_bgx.c + LDLIBS += -lrte_eventdev LDLIBS += -lrte_pmd_octeontx_ssovf diff --git a/drivers/net/octeontx/base/octeontx_bgx.c b/drivers/net/octeontx/base/octeontx_bgx.c new file mode 100644 index 000000000..2e817292e --- /dev/null +++ b/drivers/net/octeontx/base/octeontx_bgx.c @@ -0,0 +1,119 @@ +/* + * BSD LICENSE + * + * Copyright (C) Cavium Inc. 2017. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Cavium networks nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include "octeontx_bgx.h" + +int +octeontx_bgx_port_open(int port, octeontx_mbox_bgx_port_conf_t *conf) +{ + struct octeontx_mbox_hdr hdr; + octeontx_mbox_bgx_port_conf_t bgx_conf; + int len = sizeof(octeontx_mbox_bgx_port_conf_t); + int res; + + memset(&bgx_conf, 0, sizeof(octeontx_mbox_bgx_port_conf_t)); + hdr.coproc = OCTEONTX_BGX_COPROC; + hdr.msg = MBOX_BGX_PORT_OPEN; + hdr.vfid = port; + + res = octeontx_ssovf_mbox_send(&hdr, NULL, 0, &bgx_conf, len); + if (res < 0) + return -EACCES; + + conf->enable = bgx_conf.enable; + conf->promisc = bgx_conf.promisc; + conf->bpen = bgx_conf.bpen; + conf->node = bgx_conf.node; + conf->base_chan = bgx_conf.base_chan; + conf->num_chans = bgx_conf.num_chans; + conf->mtu = bgx_conf.mtu; + conf->bgx = bgx_conf.bgx; + conf->lmac = bgx_conf.lmac; + conf->mode = bgx_conf.mode; + conf->pkind = bgx_conf.pkind; + memcpy(conf->macaddr, bgx_conf.macaddr, 6); + + return res; +} + +int +octeontx_bgx_port_close(int port) +{ + struct octeontx_mbox_hdr hdr; + int res; + + hdr.coproc = OCTEONTX_BGX_COPROC; + hdr.msg = MBOX_BGX_PORT_CLOSE; + hdr.vfid = port; + + res = octeontx_ssovf_mbox_send(&hdr, NULL, 0, NULL, 0); + if (res < 0) + return -EACCES; + + return res; +} + +int +octeontx_bgx_port_start(int port) +{ + struct octeontx_mbox_hdr hdr; + int res; + + hdr.coproc = OCTEONTX_BGX_COPROC; + hdr.msg = MBOX_BGX_PORT_START; + hdr.vfid = port; + + res = octeontx_ssovf_mbox_send(&hdr, NULL, 0, NULL, 0); + if (res < 0) + return -EACCES; + + return res; +} + +int +octeontx_bgx_port_stop(int port) +{ + struct octeontx_mbox_hdr hdr; + int res; + + hdr.coproc = OCTEONTX_BGX_COPROC; + hdr.msg = MBOX_BGX_PORT_STOP; + hdr.vfid = port; + + res = octeontx_ssovf_mbox_send(&hdr, NULL, 0, NULL, 0); + if (res < 0) + return -EACCES; + + return res; +} diff --git a/drivers/net/octeontx/base/octeontx_bgx.h b/drivers/net/octeontx/base/octeontx_bgx.h new file mode 100644 index 000000000..09810ac4b --- /dev/null +++ b/drivers/net/octeontx/base/octeontx_bgx.h @@ -0,0 +1,74 @@ +/* + * BSD LICENSE + * + * Copyright (C) Cavium Inc. 2017. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Cavium networks nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __OCTEONTX_BGX_H__ +#define __OCTEONTX_BGX_H__ + +#include +#include + +#include + +#define OCTEONTX_BGX_COPROC 6 + +/* BGX messages */ +#define MBOX_BGX_PORT_OPEN 0 +#define MBOX_BGX_PORT_CLOSE 1 +#define MBOX_BGX_PORT_START 2 +#define MBOX_BGX_PORT_STOP 3 + +/* BGX port configuration parameters: */ +typedef struct octeontx_mbox_bgx_port_conf { + uint8_t enable; + uint8_t promisc; + uint8_t bpen; + uint8_t macaddr[6]; /* MAC address.*/ + uint8_t fcs_strip; + uint8_t bcast_mode; + uint8_t mcast_mode; + uint8_t node; /* CPU node */ + uint16_t base_chan; + uint16_t num_chans; + uint16_t mtu; + uint8_t bgx; + uint8_t lmac; + uint8_t mode; + uint8_t pkind; +} octeontx_mbox_bgx_port_conf_t; + +int octeontx_bgx_port_open(int port, octeontx_mbox_bgx_port_conf_t *conf); +int octeontx_bgx_port_close(int port); +int octeontx_bgx_port_start(int port); +int octeontx_bgx_port_stop(int port); + +#endif /* __OCTEONTX_BGX_H__ */ + -- 2.14.1