From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0053.outbound.protection.outlook.com [104.47.34.53]) by dpdk.org (Postfix) with ESMTP id D69441B37D for ; Thu, 8 Feb 2018 09:26:36 +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=5qt+I4Aj4UkMUJiIH6aJ4sy0oqZeVbHfylzjXKT1fy4=; b=d1ce3SAUJ4pjE2BItNY2v1OM13Se+TgZpEHaAZsaP86dE4kM/hv8IxNZTWXRYcw1uOd9jDQAa7WpCyWNzDOPLQviTCTo3onM7fralE/yODTEQ5CKip0ZnwCHez0SwK6jr7hqRUZJvInolWe7iGs6DVEfyr1Tlxsz3Dq4/KjnfQ8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Thu, 8 Feb 2018 08:26:32 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, yliu@fridaylinux.org Cc: stable@dpdk.org, Pavan Nikhilesh Date: Thu, 8 Feb 2018 13:56:02 +0530 Message-Id: <20180208082603.2069-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR0401CA0010.apcprd04.prod.outlook.com (10.170.128.148) To DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02d77a3f-464f-489f-f022-08d56ecdaa48 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:7N7TRCVo1ypglZL2q0P+R196RpEKArqgmdQN3eNyuyXw4lQI3OgQsr8fpspo0Wpt6TGpwqwSy8qITgZf3c3b70O2eGF6UlEWA2quKuW6CmAxDO42K5iSflh2VMkn1AJGrLWYh0BLpY3UpedZ8+HZN9pnaB5QC20BlAnhPgdznr3hlWXOSopoqcIj1H9mG9IOg1Tu5Zz64ooQ/0d8Zv6GZ7u0dtwPqfLw7JfpaoWjokTRIUFwy3PVsyVa9E4Oyz/2; 25:qw1yZge+GzDAFbShTwIcxQgYZpko1+HcLodbPQtbHo8yD3ITICMyJZ9LtZka2p0RuV/W+hyo+U7QWGgdRdXBO1t++SxvN1Zr1XwdFO9q1nJ7DUqNIS9G6pUZy4YtU+yn/UH2aAQUFYv5BgQyZpwwUsIafMeDVyPmy7pDc0Wc0EPUgDAQsP00017GJtMNdCfErhTBAe712LxAeTkeegQtKgs4Hji2DaYo2mkJLzp+g3O9tjMMzNyKnmdZPqWlc6/DqK3933+3YyAJ7HgYQMDAJIOmFfPgT3pwZvG2Y/GGva0Z3MYyuu3yN126InILuTYUKJ/cDcUOuPfL/n8qjTGpOg==; 31:NYV/HmPOy+tNiAFDGi2V4zwh0ctfkQP/zmfdneTEuRMlDIXEon1X5I/Tr+BD31a4UWxIq+gaNjhLUwNqVR111QgCoJO+ozAzlvr7dtEqqIzqsGc0ufoBwq/CY4wVTkdm60bz5CBxeAC7l10dAEkHUGeOjoMZke59p77gCfZAo6toLxjTPVRClSWyr7KO6LjcvTAbPd+xqOLvDGVVnPVkCHMqAx60Nk7ItpRMpvJZDyI= X-MS-TrafficTypeDiagnostic: DM5PR07MB3466: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 20:m2LcGgiDjqTddwa8YEU4f6HNBlqkgN3Y3+H2BtLqZB5iqgazGXRgJYy6SEyTR6rVtOqZE56yuAiKfTVlVutiWwMCHXaugODU4KrqNt2yQCg7fc/T+YIpzQHHD/ZFsdB4R1QF6ido3zZfPGkjknlMWaFU4Zc66U0qQf7s9ci4/w0oduq/FeYV1f2+LK8WlGCsPVS3AAVlC9N0gFeoFBPwcr0oeDfebg+pQ4peucakzb9Jyh1aneRdGsHIkeNqVLxteyuXplDnN61z48nkito5VNbPAe/a6OPNQ68+qWzaPUvVwZ3ldioGhpyAW/1TpTRRW6YrxWEyAmdzg5ODqzpPSJX0cf84/8okO2APBLJz0INQjyd+TEff1D1Pbf0L5SQt0PjvWyybBzdyto/TjqJIn7fCJ4IHKBeh5knnCKuCF+SRiAaB4wg6tr3Mj87NddoGIuCBa9JrKuw73gdGqIOAbBnDuguZy7js09jzb/xIuIgcIpgxvB9P7ZOFY8rE4lLQWVwHnQAMxmXCYaLZC0346qzPx/CgL9EVp8oaTvC2OQk+vpdMEJgzbiGEmpGGMEleWJDYplDkXoV1Z8ug3vIDUp9+rczNrLX8rilbr5IxEsw=; 4:/PG8/vIPYuOuK0aOWDnTYEjj7ePaXZJFfWX6phkcKq/luJZ5BbcVA861sxZv9y69ZbmJgtinXFXgOLS7X8XHAOWDtM/LE3tt73DBci3gNBuka3ociQbArB1MsFvZuWcc31xtow5eSaqSUwLVNV+DcKjAD7W1JQZo7TPXM2kPjqFuiQgaChpe5tKnl4nVI01CR62m5ZrNuK6XHwqFKttEXPeqbTYowpM3I3yqXHh13NpVoNYseeSsrMyr8DyvDv3Hy9Tsojy0LsX1j2VD2loKQA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(93006095)(3231101)(2400082)(944501161)(10201501046)(6041288)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:; SRVR:DM5PR07MB3466; X-Forefront-PRVS: 0577AD41D6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(346002)(39380400002)(376002)(396003)(366004)(39860400002)(189003)(199004)(5660300001)(68736007)(25786009)(107886003)(5009440100003)(4326008)(305945005)(97736004)(6116002)(3846002)(1076002)(2906002)(7736002)(47776003)(66066001)(1857600001)(105586002)(36756003)(48376002)(50466002)(106356001)(52116002)(316002)(16586007)(42882006)(6666003)(8936002)(50226002)(51416003)(81156014)(72206003)(8676002)(81166006)(6512007)(478600001)(53936002)(386003)(26005)(6506007)(6486002)(16526019)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; H:localhost.localdomain; 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; DM5PR07MB3466; 23:8MPiJ2us5+jXrN6BSogxnVUAkMNGABVHFay1TeXVJ?= =?us-ascii?Q?K21c0rVx6aCWS5Or3UFbMp9DFj00yvtfwmm6jBADUw5EBuMe72vJ4aVeOulM?= =?us-ascii?Q?JGb8e9tU34k0yzccppqAqkI2E14QwT1vHFdH9hFs8w3vl2Xz2opneUiAGjdE?= =?us-ascii?Q?wyjVAECLmyyaBaQ1caFSC7wCWI9NK9VPm8ir/WKfz0UOtVwTb7fIV+24f2aT?= =?us-ascii?Q?ylIRQ4bhm0ITemNpKE8z1eH+h0WxGQWifkW4uIfbGdBy8jon9ns5cxzHrSQ1?= =?us-ascii?Q?txuaCprREUISz6ZXz5i9Ku8758dulcsX6iUAJgxia02zqUtY509BYxFtb3NX?= =?us-ascii?Q?eV+UlL8Z6vzYMtDOX2Q2o8gkcqpW0bepQlpV1PsVn/QIk/FvRRqf5mkGdNmW?= =?us-ascii?Q?yMDOTbjMseRU0lRxsBghhiTRVFk5q2k/axmP0iNBOuiG11eTqhxXl+bMCRuZ?= =?us-ascii?Q?X1QLvMLR+179PxghlT0/cP748KzANhNE05PB+ouqmZ+nBKDatCSCiXCve7E2?= =?us-ascii?Q?j3epNP5BQbVy+Kh24uZCAuzIbZRxyEqWoCR2T1omRmi9ZV7btmof9vzwvae3?= =?us-ascii?Q?73ZhBivDokb2N8LpHqHZpwPVRJ6iMnTsj+spCpuhi4Ja1/ZtEXsm3tGLRVB6?= =?us-ascii?Q?N2qt0N4XRAQqDirUHfmt5I+W6TAFailw/V+OClbkG7c6BJdahXrG9lgEol1c?= =?us-ascii?Q?scLkum4ysumCmg52G8TkGn76ggUIk6Atu8ydOJXxw+H9RdRSAYySHFGDNX42?= =?us-ascii?Q?J0Ueo3Ljt0CaYNCSdpQZJfdOcj46Gm5sgtjZnbSX44oNeUWwOFJN8aeKqhvE?= =?us-ascii?Q?LIQgJ/1zX0EUNArHAQCODa+ZAF90nygxztfWoe0PVAj360u7XguTDiKnlGrU?= =?us-ascii?Q?mC3cp86uiUHH2y/CVJ6pyhv6NQEPliYwMn7cJu9AyYI523w9LVCe8oWcrKYy?= =?us-ascii?Q?4BfFYDL82EZjV1TjsrZhZgGMW0NfdTri0YugXY2xB9iXGc1/u/E1rWiBDqDk?= =?us-ascii?Q?C5S/1rzrc2wR2C++j6M8knF0urkldAHpKQnfTLvOaEnr1NrAjJn+hqE1OhWR?= =?us-ascii?Q?6LO3dOS6bmIT4bOpyXXWmSeIjfxCsgv4oILZZX93I9PZl1LnubDJ7/UPNMLo?= =?us-ascii?Q?xmrwaap9VrMzIQF2bgpQdv379/RCRs2XbNtbg418KQFQ39U10G7SitofMzC6?= =?us-ascii?Q?8Q6gsNIJKock0A=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 6:xNc79ibBLrLy86Yps3ILSTRWLftRgzVOK2u5MrSvM0OVhTEmOyXVuF+4/EshCv9g3wLYLuk65iSHts3ppSnlDhUSTkJDI/SmjbO2T5zo4rKVhQXzP4w6O+WX5U6x5cEsoig0zZSCvnr5dY54exQUrAG0Ryr6Zdc2lmxoR9xj+pna7AUxIgySo52wVqbk2gj6XItqvCV93lNzCmbCMSxfyG6s2m1+vgEZcQHfCvr2sfVnKNJoQM+xEkwpv6tI/J1M1hbNJlQbpYC8wNUTSipc632N8RR6D29a8TuiD3k0KQ+LY8TBtDbVvGwgeah5dTTZW3IQLDcomQ3RvRn1R7lA43FHjtD/O38UvWR5dl98Vaw=; 5:WKijBlH3j5W8GLYP2LTAZMD/9BTD2aT9gyVA7glP/MBuHfP94IqnYqERXRbttppTv45rwONI12YUGkmfyfcxwwCjFVqzE7AUKWUJPjYXCBA5G2po+0cAJ58ZRHXRVxImnrGttLH78YXartURer1gY1QfgOPf6uGo+XT9/2wmmk8=; 24:O4ZatS2pAv6YVkr+F55MpxZKCqjHAY0PkPO+dc3uiFFwTwRuha+V0JqdCs29GAkwFF/9zurVNJyH8kNeBJpYzS7Mq65FNy4UOlY+5JR3QTo=; 7:dG+eXgp1S6spIU2x6jEahmXven/+J/Bs3jTfwNxltyQsj/vBKvWkSJNen8wUSSF2BsBeLHwBjvPwOHZyRSF7t+S4/7yuwTYLH3gYTqP7HILMcK90uSsPj0ao4caoJqqHoZKhKyKqmYbQyZnOtJEw9kPhP3BipsCWCi7/CbxQmjY5jXzSld92EGcY+H+wYaUzJXICBWg9qVdVRhkU70RNcXSe9DBomOUTUSCFdEpjHOprRW9s3hIOmOqjoAPZlfja SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2018 08:26:32.6894 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 02d77a3f-464f-489f-f022-08d56ecdaa48 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3466 X-Mailman-Approved-At: Thu, 08 Feb 2018 19:10:33 +0100 Subject: [dpdk-stable] [PATCH 1/2] net/octeontx: add channel to port id mapping X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Feb 2018 08:26:37 -0000 The channel to port id map is used by event octeontx to map the received wqe to the respective ethdev port. [ backported from upstream commit 989d492620f1 ] Signed-off-by: Pavan Nikhilesh Acked-by: Santosh Shukla --- drivers/net/octeontx/octeontx_ethdev.c | 6 ++++++ drivers/net/octeontx/octeontx_ethdev.h | 6 ++++++ drivers/net/octeontx/rte_pmd_octeontx_version.map | 3 +++ 3 files changed, 15 insertions(+) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index b52700e4c..eca3a39fd 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 +rte_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); + rte_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..d37bb8a23 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 +rte_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..40d68c79e 100644 --- a/drivers/net/octeontx/rte_pmd_octeontx_version.map +++ b/drivers/net/octeontx/rte_pmd_octeontx_version.map @@ -1,4 +1,7 @@ DPDK_17.11 { + global: + + rte_octeontx_pchan_map; local: *; }; -- 2.16.1