From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B7B2A055A; Tue, 25 Feb 2020 12:28:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AE991F1C; Tue, 25 Feb 2020 12:28:30 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A6A23B62 for ; Tue, 25 Feb 2020 12:28:28 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 03:28:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,483,1574150400"; d="scan'208";a="230989187" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 25 Feb 2020 03:28:27 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 25 Feb 2020 03:28:27 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.196]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.98]) with mapi id 14.03.0439.000; Tue, 25 Feb 2020 19:28:02 +0800 From: "Wang, Xiao W" To: Xiaojun Liu , "Zhang, Qi Z" , "Kwan, Ngai-mint" , "Keller, Jacob E" CC: "dev@dpdk.org" , "Ye, Xiaolong" Thread-Topic: [PATCH v2 5/5] net/fm10k: add switch management support Thread-Index: AQHV5/YlOavBVD9nFU+gnJQbYHEhuqgrx3PQ Date: Tue, 25 Feb 2020 11:28:01 +0000 Message-ID: References: <1576057875-7677-2-git-send-email-xiaojun.liu@silicom.co.il> <1582207174-31037-1-git-send-email-xiaojun.liu@silicom.co.il> <1582207174-31037-6-git-send-email-xiaojun.liu@silicom.co.il> In-Reply-To: <1582207174-31037-6-git-send-email-xiaojun.liu@silicom.co.il> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 5/5] net/fm10k: add switch management support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Xiaojun, Gather some comments about the code changes to original file: Based on the latest dpdk, "git am" will fail with the Makefile. Add CONFIG_RTE_FM10K_MANAGEMENT=3Dn as a default option into ./config is be= tter. If user wants to turn on this switch feature, it's easier to just cha= nge "n" to "y". No need to introduce another macro ENABLE_FM10K_MANAGEMENT, just use RTE_FM= 10K_MANAGEMENT to wrap your code. For ethdev.c: static int fm10k_switch_ready; This should be a per device value, right? I = assume we may have >1 fm10k devices, then cannot share one state value. DEV_RX_OFFLOAD_RSS_HASH is removed, it may affect current usage. Log some debug info before return -EIO. How about moving the commonly used variables like "struct fm10k_hw *hw" out= of "ifdef else". Put fm10k_link_update() at the end of dev_start(). For fm10k_stats_get(), it looks there's little code shared between #if and = #else, you can just write a whole new function. There's comment "It may not work for VF", have you addressed this uncertain= ty? We'd better not to leave this in upstream version. BTW, when sending new versions, you need to document what has changed from = last version in your cover letter, in below format: V2: * Fix what * Fix what Best Regards, Xiao > -----Original Message----- > From: Xiaojun Liu > Sent: Thursday, February 20, 2020 10:00 PM > To: Wang, Xiao W ; Zhang, Qi Z > ; Kwan, Ngai-mint ; > Keller, Jacob E > Cc: dev@dpdk.org; Xiaojun Liu > Subject: [PATCH v2 5/5] net/fm10k: add switch management support >=20 > Split dev init to 2 parts. > First only register the port in switch > management; second init hook will be > called after all the pf are registered > and switch initialization. It will finish > dev init. Also add switch interrupt support. > Add fm10k_mirror_rule_set/fm10k_mirror_rule_reset > to support mirror operation. Add fm10k_dev_filter_ctrl > to support flow operation. > Add dpdk port and pf mapping, so > the dpdk port can map to a specific pf > and 1 dpdk port can map to 2 pf to get > total 100G throughput. >=20 > To enable the switch management, you need add > CONFIG_RTE_FM10K_MANAGEMENT=3Dy in > config/common_linux when building. >=20 > Signed-off-by: Xiaojun Liu > --- [...]