From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0080.outbound.protection.outlook.com [104.47.32.80]) by dpdk.org (Postfix) with ESMTP id 8BBD11D7 for ; Mon, 18 Dec 2017 22:52:52 +0100 (CET) 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=shswzinDS2FDKFKwqTFRUAKWlAVHrvVhEFPnT6BMrdc=; b=UhxO8HGT/a2PXP/9cdOES8NBfSG6s9EuEK6GnJBMNxLJa2A0hcSm00epOtel8tGKPuGtAXqhq5n+So6jvB8JCc1+dJ6HR7TCvjN7a8gQFQGNLN9OAojvMvICW/LcVctxgkf5ju/HrO7uJKoSYtNw25FdhwJm7HYwYVXUGv1louQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (111.93.218.67) by CY4PR07MB3461.namprd07.prod.outlook.com (10.171.252.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Mon, 18 Dec 2017 21:52:49 +0000 Date: Tue, 19 Dec 2017 03:22:27 +0530 From: Pavan Nikhilesh To: santosh , ferruh.yigit@intel.com Cc: dev@dpdk.org Message-ID: <20171218215226.ls5s2jjziaquzbbl@Pavan-LT> References: <20171128145855.27106-1-pbhagavatula@caviumnetworks.com> <20171209125510.20592-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: KL1PR0601CA0007.apcprd06.prod.outlook.com (10.170.160.145) To CY4PR07MB3461.namprd07.prod.outlook.com (10.171.252.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 96d139d9-7e42-4048-e2fb-08d54661af66 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:CY4PR07MB3461; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3461; 3:a6sonjX4sUIKRlZNtLx2VQRlXbkqqa8naB5jMYkV1s2tBZoQuu9PxM+3i52iXPgt2T5yqY5b2iF3DzLwZuLsMD9NbWnqBekmsJuXNE6JWtHKIolM9cJd/JBijCPIvCHah4LyPrA8grfFdTcErM9ejYlTB85NEzQhaGgTtwKDK7q7pM3L5i3YxNbgyF7B12xMPOVqnuc7o199gyfrxqToAaq05ngukZVheyJ9euoNRjivmftYcY6FeutXrXxWZxVI; 25:dg2wq16oJGC29Gfn8Yz2KjNgl17kPA5M28C6801eMhypWYHn9hdeWJRRvYPGLdmTcLYuj1+Qyr1fmNPh1klFpQpEFozMg4ZbeTXjwfKjKpZUf4C/cBiDmHW8p1QA+6nOm5PNz0ZWOgsF+IBT59wym7bIQFiIE4zvUd1XCo2kW6iaIXQHIm0xPJWMlKry8wDfpqIN9cw0oKt5mpVifO7XNZ9Y5K5rVTtjQjBsMNKp1qexVgRwjKDJjxZ2nfM/haZXMM1QvDafFPzuwzzFdk3j4Nj3gwUMim63k+sasHC32VvqvBRRlHmEAnFgavRPSAicNfD17zb937uii6GEQPo60g==; 31:gWqkcYORxQy4NR0ZjEOEAxFznpWclXmihWUejLhmHvmO7k7RgVOmyz0RfZKt5jB8Dqq70hBl3WYSg//jEPnIaWZLp+QH2CkvKZmzwb3jLB7nhS9YvrZ7R4dr+L0REdF4i2/7KdCZRY0UBm0mJ9QNnaS6vgdEEWv+4znEADr8aabHlxQHoPCC1kpzJyR5im0LzqQZU4YobwEp4Ann1pVwZ5BbcS/KBI3fG9iUxmt7Zac= X-MS-TrafficTypeDiagnostic: CY4PR07MB3461: X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3461; 20:1VOj7T2jJpacNdKrWFPYTp0EOojrI1BeWvID8l5gQwOS2OH1kevA6tXxIWjlIp5fO8eTOQm6feMCRFILDdiI1P4NJO/9cA0pIt0xoUHDohQwDu9kJ3D/Ju2OlmsUdZpXDTjnP/0tvNYDgCUObl9VoCPGqzWbUhtbsU71OgmsbdNIDubJwBhvEesSZ+V//KOONsqWWwL4dDe6X6QyxxarXZQICAXEG6YY+wYW56P/+uVpwSMePK6WcACrFQWAh8ETwaDhm52yhIVOeZcS1wiD2zaSGzZH7XD9DgZLyO+mrAmqn9DK5uVSaOe52L9oIz+wDDE8QZXJP5JtM2izvyBW2DdKoiGRFjQK3t4qHlm0tXF3c2mP8SAEQnfmDhPLsa7AZYDqX8CsD93S6KzVzZvGSECti9/0ooAEy6mMcAjcMF1tVpsRDWFVELL7XNul9dfMNJTGQn/l8+JfqTKa4Er5uSAao/nvkJhva1tlHFufSJiXITtohq6yE2htLdK8d4Frzd7vxvUOdfdpBngg08KeR66J2NZkbqEZcep6j1wzKOqaXKeCq1W+0Bm3GVU6V7gLloeSWF79Twc9qoiXfebdfT4VwZkJZ6w+Td6H0hhMFcQ=; 4:zI466Lm7vbWvvIkwePvJ7RRDy4KnYBl6ZnBbH4idL3kyrmyy2BgL/ib+yxN2pVQEXumn27vE3BZqMXK/k6w3pSaVYI9kmLpU4w1SorzVta+jpmQ7GdW9nd/pT+bJaJNL9Kx0IY3mzWy1YN6lsjk83KVfkjwW1gIvGqDGzw4j/hBBZoz6OZP5iJtVrbVPDCJDVCclmvNMSahTUeppvWCvg072vT3SzRg4ZALrsUkFTfn5FGQGNN9rJQGf0sRzYN36IYfPAQ04LC/z97f6JPDasg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(10201501046)(3231023)(3002001)(6041248)(20161123560025)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR07MB3461; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3461; X-Forefront-PRVS: 0525BB0ADF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(346002)(376002)(51914003)(189003)(199004)(24454002)(16586007)(316002)(5009440100003)(6306002)(81156014)(16526018)(9686003)(8676002)(229853002)(97736004)(55016002)(58126008)(33716001)(966005)(386003)(53936002)(305945005)(8936002)(68736007)(6666003)(6116002)(2950100002)(25786009)(83506002)(52116002)(4326008)(478600001)(33896004)(3846002)(53376002)(5660300001)(2906002)(7736002)(6496006)(47776003)(42882006)(72206003)(66066001)(6246003)(50466002)(1076002)(105586002)(76176011)(23726003)(106356001)(81166006)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3461; H:Pavan-LT; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; CY4PR07MB3461; 23:jdh//+ZaSBnbOG0I/QxHJRjNicZFMz1/cXPkiEWkv?= =?us-ascii?Q?O2xvxYeHpciFwwM7J5KYi+6++qzQ1KT8EedapVT027J2ezUokhvRoWe0pd86?= =?us-ascii?Q?H1nvZXUM/rkZ9V2sbKtuqaKbYu3Go6B7ulruOSqdw0C5Y2pcRD6967td6FfL?= =?us-ascii?Q?xFYAsw2f98C4OiFEQHAT1Gf6frEEk6mD0Ws0fPX0Av27QnTlemb5tiOOGGkn?= =?us-ascii?Q?QeOO+Qkk9+3NiI59QJQsfFZRRqffmRGDeSDiOi5XiHDJlzAaZAlIOxURdwxl?= =?us-ascii?Q?ipqvP8n/QnQesRxeNu7udJnEJFQazev3S43583kI+tZwP44n6ebrnHpk2nKw?= =?us-ascii?Q?7E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vgZSNqJ6kEKDJB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 21:52:49.5851 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 96d139d9-7e42-4048-e2fb-08d54661af66 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3461 Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/octeontx: add channel to port id mapping 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: Mon, 18 Dec 2017 21:52:53 -0000 On Mon, Dec 18, 2017 at 03:11:15PM +0530, santosh wrote: > > On Saturday 09 December 2017 06:25 PM, Pavan Nikhilesh wrote: > > The channel to port id map is used by event octeontx to map the received > > wqe to the respective ethdev port. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > > > v2 changes: > > - Used extern instead of defining global variable > > > > drivers/net/octeontx/octeontx_ethdev.c | 6 ++++++ > > drivers/net/octeontx/octeontx_ethdev.h | 6 ++++++ > > drivers/net/octeontx/rte_pmd_octeontx_version.map | 6 ++++++ > > 3 files changed, 18 insertions(+) > > > > diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c > > index bd24ec330..46cb061b4 100644 > > --- a/drivers/net/octeontx/octeontx_ethdev.c > > +++ b/drivers/net/octeontx/octeontx_ethdev.c > > @@ -54,6 +54,9 @@ struct octeontx_vdev_init_params { > > uint8_t nr_port; > > }; > > > > +uint16_t > > +octeontx_pchan_map[OCTEONTX_MAX_BGX_PORTS][OCTEONTX_MAX_LMAC_PER_BGX]; > > + > > enum octeontx_link_speed { > > OCTEONTX_LINK_SPEED_SGMII, > > OCTEONTX_LINK_SPEED_XAUI, > > @@ -1133,6 +1136,9 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev, > > nic->num_tx_queues); > > PMD_INIT_LOG(DEBUG, "speed %d mtu %d", nic->speed, nic->mtu); > > > > + octeontx_pchan_map[(nic->base_ochan >> 8) & 0x7] > > + [(nic->base_ochan >> 4) & 0xF] = data->port_id; > > + > > return data->port_id; > > > > err: > > diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h > > index c47d4c6d3..f046595a8 100644 > > --- a/drivers/net/octeontx/octeontx_ethdev.h > > +++ b/drivers/net/octeontx/octeontx_ethdev.h > > @@ -52,12 +52,18 @@ > > #define OCTEONTX_VDEV_NR_PORT_ARG ("nr_port") > > #define OCTEONTX_MAX_NAME_LEN 32 > > > > +#define OCTEONTX_MAX_BGX_PORTS 4 > > +#define OCTEONTX_MAX_LMAC_PER_BGX 4 > > + > > static inline struct octeontx_nic * > > octeontx_pmd_priv(struct rte_eth_dev *dev) > > { > > return dev->data->dev_private; > > } > > > > +extern uint16_t > > +octeontx_pchan_map[OCTEONTX_MAX_BGX_PORTS][OCTEONTX_MAX_LMAC_PER_BGX]; > > + > > /* Octeontx ethdev nic */ > > struct octeontx_nic { > > struct rte_eth_dev *dev; > > diff --git a/drivers/net/octeontx/rte_pmd_octeontx_version.map b/drivers/net/octeontx/rte_pmd_octeontx_version.map > > index a70bd197b..3ec12ddb1 100644 > > --- a/drivers/net/octeontx/rte_pmd_octeontx_version.map > > +++ b/drivers/net/octeontx/rte_pmd_octeontx_version.map > > @@ -2,3 +2,9 @@ DPDK_17.11 { > > > > local: *; > > }; > > + > > +DPDK_18.04 { > > + global: > > + > > + octeontx_pchan_map; > > +}; > > nits: better be rte_octeontx_pchan_map > refer http://dpdk.org/browse/dpdk/tree/drivers/mempool/dpaa2/rte_mempool_dpaa2_version.map#n4 > > Acked-by: Santosh Shukla > Thanks for the review and ack, will send out v3 fixing the name. Pavan. >