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 A8C4CA055A; Tue, 25 Feb 2020 13:56:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 92BB42C02; Tue, 25 Feb 2020 13:56:12 +0100 (CET) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60132.outbound.protection.outlook.com [40.107.6.132]) by dpdk.org (Postfix) with ESMTP id 1380B1F1C for ; Tue, 25 Feb 2020 13:56:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OGV+Z3h3MAUUQimwlKIFIntFAN/Vn6OKi5tvk/AH7LgzXXl3C6/Jh9EIPJ6kG4vlquyEmsi1B3wM5OtqHFVJsKfb3XWXA1NncvcynV1mcfVW290Y1MagLgP7qpFik8o0Scs0LcfBs3cROq8RtO3In/d/vd5izD0U0Al1I2ulNVF7rb5jbf2+YUHN46noY9nFs0DNXWkFRWogcS/oSh00A/Vb8lUjQnWyQ15QcQeI3WKAZwm15Qe/czX2dugjDZgqBWwsR+XW2G56koCHlZlkFLW37cvP6+qJDYzBKEpogJBUVV9PR0BaiFJ1uflz84APsFjpVPRf1UILCTRW1YZpqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C2O343y2HKhQZydTrwJVacclUbleBWMOB9BR/ysh9F8=; b=DUH7l7ajG2uQZP1WKzpW0J92HYlRqSt53u/CORIwe4P9/qMEXVv5mKwWheoIoRO3X/mGD+h1kCbNXP5zSJoKw4lhuSE6aOIAu6w8GR4mN1V8iY0BoGH2aIJOZ8H+5KngWxz9HOfdBZxAKWWoHQY67kA14P6l+j9o6zKOureuMmjUq5ftZ2H+EGXb7j7gpHjPd6A81D+l8bIdwE0bGwX9p3MoHWkrd6meAFJrg+6r2alPuMgX+gBan61lw4WJXLnMNO5/5OG/R87g6lA5lqdXfKsVGEZovURfPeZ8hz6c4i9RSK6hIIsPuhmuSC1HiwJyepFXXF6L7RjebIVjbDqqWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silicom.co.il; dmarc=pass action=none header.from=silicom.co.il; dkim=pass header.d=silicom.co.il; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=SILICOMLTD.onmicrosoft.com; s=selector2-SILICOMLTD-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C2O343y2HKhQZydTrwJVacclUbleBWMOB9BR/ysh9F8=; b=UmugvRL9pJvPrAL5QxL5XrL7NttkgmxyuMEJ8UspRq8WuwJjA3blhME/WejZoNj4x2YR5zlNDKOq/ioemaLQ4W9ck12bjXElAlDK3e+YFAgsNi+flZcUttTjChJASH0lxYF5ASzsr0FN/HzJwb6kLInU2/R5vpfGhuv62rk/4Ss= Received: from DB7PR04MB5196.eurprd04.prod.outlook.com (20.176.234.140) by DB7PR04MB4156.eurprd04.prod.outlook.com (52.134.110.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.21; Tue, 25 Feb 2020 12:56:08 +0000 Received: from DB7PR04MB5196.eurprd04.prod.outlook.com ([fe80::a400:f6b9:34b1:ed]) by DB7PR04MB5196.eurprd04.prod.outlook.com ([fe80::a400:f6b9:34b1:ed%5]) with mapi id 15.20.2750.021; Tue, 25 Feb 2020 12:56:08 +0000 From: Xiaojun Liu To: "Wang, Xiao W" , "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/YYX/m8S09GGEuVN8K87D4VeagrzVqAgAAX41I= Date: Tue, 25 Feb 2020 12:56:08 +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: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=xiaojun.liu@silicom.co.il; x-originating-ip: [119.139.198.174] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3b42eeef-75b6-40c9-220f-08d7b9f21538 x-ms-traffictypediagnostic: DB7PR04MB4156: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0324C2C0E2 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(39850400004)(346002)(376002)(396003)(366004)(189003)(199004)(4326008)(71200400001)(33656002)(81166006)(26005)(2906002)(52536014)(44832011)(8676002)(8936002)(478600001)(53546011)(19627405001)(9686003)(6506007)(81156014)(55016002)(316002)(64756008)(186003)(91956017)(66946007)(5660300002)(76116006)(7696005)(86362001)(66446008)(66556008)(66476007)(54906003)(110136005); DIR:OUT; SFP:1102; SCL:1; SRVR:DB7PR04MB4156; H:DB7PR04MB5196.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: silicom.co.il does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OTR9ii1+3hOYzy0mWVBi+5d3UcCgm/HpKwvwOowF0TF4texVIuof84G8C/UB6UwNSqnYLgNf9d0/yxAtls//O1/ncOqySeCeVNce8lyvrbw1gMMN/Pw7gPS2NzOpmZJ+oFn34HwiPhgis36iO5QewJZn2NPE1W9AWgrwtCWd3rxWVHB8gqkO2mOHtfIS9HGTk7xbt3hU9Z387hlne5Tzjx3vXWJvO+4v3y2SHokT8pBKeHKr1bynHYNOeMRkwePIJiKIS7z0+cXb1cCsFvQy4mA7fN9WyMWnT2q27adNR44RvoQwKXV47xDBK2wUm48FVbDZFQAy4zDnUWABzMr5BwLNwhQSlJiHicNMSDTuc4uFyUPsdSWHgxil8X9F1AepFsgb+7ZWgBmUK+R7/d1wzxgX5AsdJC1lYquqTwg5Nhxe4qXlfX7tlVjYstvllbP8 x-ms-exchange-antispam-messagedata: mNXNYdufBCvFa86ZX5eP9RUNwJs/StFa10DIt4fcuezotM8b4d0T3qPNn476S9uXB3yD8DllHB48jkGO1+Lh6Ok5Vt2aDIVTT052l68KFVKkKkFjAvDbXlbsKCXRI36oRThWxhfSPyajtkXtVc5DSw== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: silicom.co.il X-MS-Exchange-CrossTenant-Network-Message-Id: 3b42eeef-75b6-40c9-220f-08d7b9f21538 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Feb 2020 12:56:08.3330 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c9e326d8-ce47-4930-8612-cc99d3c87ad1 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6yUuxzE83KrGKLLmgPv7u0Vbbd7OLEqC/X3VeOeB2VjC3tMfDaQyPVJqR9JkbtSH/GXFvrpBxJseAuHRmpjSMer4oePp7SFqlkhE83EtR4Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4156 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 Xiao, Thank you! I will follow your comments. Best regards, Xiaojun ________________________________ From: Wang, Xiao W Sent: Tuesday, February 25, 2020 7:28 PM To: Xiaojun Liu ; Zhang, Qi Z ; Kwan, Ngai-mint ; Keller, Jacob E Cc: dev@dpdk.org ; Ye, Xiaolong Subject: RE: [PATCH v2 5/5] net/fm10k: add switch management support 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 > > 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. > > To enable the switch management, you need add > CONFIG_RTE_FM10K_MANAGEMENT=3Dy in > config/common_linux when building. > > Signed-off-by: Xiaojun Liu > --- [...]