From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0076.outbound.protection.outlook.com [104.47.33.76]) by dpdk.org (Postfix) with ESMTP id 20F1023D for ; Mon, 18 Dec 2017 10:41:31 +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=dbio5T2959UBymbZg7fVyY2wi5sIrOD2b/xfyeDmxjM=; b=it22QlsFUgQR0p5TuZ31Qe5qGhd3b0HF7ZeYn9tFbGgBJYfWYM8GHGrmAXPdjD1KPL2NyNJTZh3JhcJh+6eJXzF0xI5LHnu2wHd9TpCnq7JoVrRAXPejyt5nYa8Dt5APO5Ay1vB1IYOIrfDqalLvyoIfABFsTTQbQbb/7ZLaWJI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [10.89.1.32] (115.113.156.3) by BN6PR07MB3092.namprd07.prod.outlook.com (10.172.105.10) 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 09:41:28 +0000 To: Pavan Nikhilesh , ferruh.yigit@intel.com, santosh.shukla@cavium.com Cc: dev@dpdk.org References: <20171128145855.27106-1-pbhagavatula@caviumnetworks.com> <20171209125510.20592-1-pbhagavatula@caviumnetworks.com> From: santosh Message-ID: Date: Mon, 18 Dec 2017 15:11:15 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171209125510.20592-1-pbhagavatula@caviumnetworks.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: HK2PR04CA0063.apcprd04.prod.outlook.com (10.170.154.31) To BN6PR07MB3092.namprd07.prod.outlook.com (10.172.105.10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1e43a70d-7b50-48b1-185b-08d545fb84ae X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(7168020)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:BN6PR07MB3092; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3092; 3:DSc/Rq8ImXZxm0FxX+mxrFu6ZQ0Sj4aH77DxLoXIgHzpe64e9sWZ7aqYeo/7km73S322IL1777VzXgOLyZ5E0KhbleNMzSeON1l5l623zDYEql6f9XSQXA/3vDlhIotwIWfFP4KqluYnkgQshjT+odk/uG8/BIDyjABzcy3dTCnmA5LC9mqNFsVmQUx2HuD0RlTUJppfVWBDU3lbVDaw7xQHhFlYT3IM/jrFuF445zEVgirwfKJGCHkiXi1wcdrJ; 25:JEpAgbnn1dGRg29q22HaBghajwXaxvgz1oo0QickMYL4UFBQ/9dspXcDquR5qVQnCVuidqhyIlI+RLNbH1P8UgJFqfNce+CZ/ieNzdVJJnNG6OYLORkBsNBnFXCZ7cY0CLy5fTFGwr4kk/9zcmw9Mad7CA/58MSAi5fPF3GqWPz+e2vy4EMG+N+wNj5bgxRZcCt8CngEKNs3boemu87DxOMPysop2xczj0xLl95/PCi8oY+sKrPKIXRenB3TBmcuES6GxiDD9C/jrkuUc1U7Irf7liOJ/QaKEcL5uhaXw1pQaqydLn8KUov4vAw3wwEEq3fGrUM0ZPQwSJgL1F5zaA==; 31:EFcZdlWy1XrzZUvS+pLyDcpcoH28a88OjZ2YywrkYVymiT1ylxi2sn5MejKuOce6vtAmFTIoxsRhF923jKti+J3nN4n/b9mIWvccDnp4d/73UWLoIVCy0VRKj04PrQF46rxEw9+cx12rBtxq3KJkLqUvgzRj+2WX+0ug1O/ktmHeNMScRKvzMSL+XcTYRj6jZpRbVUC7HCSNjlN5mUjb6eJrQhBd7EJ+TWnEmbeQnyo= X-MS-TrafficTypeDiagnostic: BN6PR07MB3092: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3092; 20:Emtvy1TOcS3E4ozrFvlCFPXXCNALIM1xEfCkto15v3v+pSDtdt9y0dfweZz5ArY/mlijNGslezxbqUqWey32RuoliGV77kDY39hVWIuK/zHXY9+mXOTCnGsFC84dDtk9yz5Hy5mcSW4JmK/3Oi2psrs9WX/R3TomM4W81JQlGZx8innydoaHizQ+JuU+KzgTnA0GtWi2Vvey4ph3iuRPdGI9KToCB9CNHGBbrAZARDhYy00U6Rl74BvNaouCMQaL5RdHyqa6sX5M5e56xKHL4yXphOmF+IpDaurMTF6i13VRH8WebC01Z8nPcw4JaUwOR6PUWSnvVH4XqNBAlO42LSkQDgB2hhI2iSmVa6bdNN7Xb9hcqECGKVAnh4CFbg/i8bKPHJXSiOxLL+u4nCr0LPcB3HRAhWL5bxccxDvKoOD+Lpecf3VP1x0/CRuT4bO1clH+mqTYov+G7K10kHkW0penIdWbGzPjhz2EQgqVY0j+52q8bD2MzSqgUQwLbTIsk+zz3odjdoSBgXJzqqunT5uzabs00DzYOvoP8+k3cCgir8uZiQwe8Ig0ufvhnRbM2dqBJbt8Mag/Jh3SSknGOkS9wdlxQPuhfajIR86FSoo=; 4:S4Or+ZJKvUdKbciFc9VvZluFQw+AoZE6mG46jY53JmWhfPWbfUBdvNgG5vuDqO8gGJUIa05EEgJkmTvOsGPPrUcYaZkJP9rplTnab+HgyRCupkvthKSd0IzGoUrtd6QMoeXe9dzLgFb85HH+ZgnURnXlmv17j0wG/1Oa/niDCKzErXJ/ZfyaxYIyh55B/SKAiSzJzE4OF05zdkwOcnApSaqjjrHUjtbmQ0/zyaEdikHv7TXAhP7SIKONlybGmluYiAhbyMNmRLC8iTxUkiZY5g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(3231023)(10201501046)(3002001)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BN6PR07MB3092; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3092; X-Forefront-PRVS: 0525BB0ADF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(396003)(376002)(366004)(39850400004)(346002)(189003)(24454002)(199004)(42882006)(31686004)(58126008)(2486003)(52146003)(83506002)(6116002)(66066001)(65956001)(23676004)(7736002)(52116002)(86152003)(65806001)(8676002)(316002)(2950100002)(6306002)(2906002)(76176011)(97736004)(16576012)(6666003)(3846002)(47776003)(90366009)(106356001)(81156014)(8936002)(305945005)(6246003)(6486002)(31696002)(77096006)(81166006)(72206003)(36756003)(50466002)(53376002)(53936002)(65826007)(478600001)(64126003)(229853002)(5660300001)(55236004)(4326008)(16526018)(966005)(386003)(25786009)(230700001)(68736007)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3092; H:[10.89.1.32]; 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: =?utf-8?B?MTtCTjZQUjA3TUIzMDkyOzIzOm5iT3hhOUhsc3hTOFNabHVMeS9yQy83Yjhk?= =?utf-8?B?eTVQbWNFOEZ6WmJwQ1BmQ2dwcXdmOG1MVmxNK2V0NUFpMStkNzIvK28xYWdK?= =?utf-8?B?SGdmZm4vK0VRcXNqM2tJeURhQzFEa1pzY090SS9JZWd0OHFKNHVkRUszRG52?= =?utf-8?B?anZKSTR2N1kxTmtjOW01MzMzVkh0akJWZnliNEJqN3FwOGxlbWxwNnRpVkFR?= =?utf-8?B?Uy8vVzZKN1AyWXFnQlcwY1R4bDUvdnJpRDByMW5MMGNTb1VmdThaS2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weXWPbp6Z7z3yze6Oa2opHe6jcKk1KzB8sHjHHM7phjhUt1Jpk+iEXQplX9zqbCgiRGV/NpG+S7KVqLFIaUqPjdf+gwo8BtSHO27tH2nYwQ3S99tgLYLWFq0bLsCqm34p0jM9kPYEGvvU7+lxypyCGPjHfQzLFiMukWXsi6iyIuAjvWniY2WM1QrMpDn0Y/DV95y6xhanqWONRvxpf2uVGFv35PuZdXPRwr+3XPmuB2QLth8=; 5:G8bFDLA6YQbld8CngWkxiJ1YSanY3mrOtYmsIoDMRTKpWq5OUcOXXGYYnLTVbBxjVxTYcKKwqsmNd7JkR85CT8Bm1qZsbWMLZ19mbbfi1Pi2lRybsgkiaUWvkdvBoeWUS8+ejb9OhnoJrzr+ZN7MKXWioVqnbTgwQXLa9t/EIJM=; 24:T7zMKtXqZfwJmRP1xiEpxn2C4dYw7j7nn/Xi77biAmzoDZUHBQ2GeRbOKkSd91K6xAqJC3iTde35RG4/qNoHP3TJlo3LDLBTXkrywhtHFRs=; 7:RlCA2hMxbi9e9tc4bbWn4motLd6P8WthGLxmALwHj15Ec0lN0kz+TFWp6dPuxAM3mpidWl4dUHV7BrfaavIke8HN0c9H+OOENJZTEKt6Gp3nVqjhq41McHf6wN9+i2M5ZHkmYG32vrLPyBCzbXNrFAX2rejXup54ndOf08YqFEHYhzGnmhQLb91mPWkR1MEtMbDJkfhe5tXezioLz6bFbPciWhQRpb84nzd5i+6rz5voXx/aTT5/g4jAr+ucKwFX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 09:41:28.3840 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e43a70d-7b50-48b1-185b-08d545fb84ae X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3092 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 09:41:32 -0000 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