From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 106EFA034F; Tue, 23 Feb 2021 12:45:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D2FD4068C; Tue, 23 Feb 2021 12:45:54 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id ABD8840041 for ; Tue, 23 Feb 2021 12:45:52 +0100 (CET) IronPort-SDR: icKl1B9hSofNAsacYfSbs/xOVBfEVfkT5SkKI/T8vOG5hKmpBr2LWO9v9x8lwyHpF//SPjtaLD J92wC4P0dKrA== X-IronPort-AV: E=McAfee;i="6000,8403,9903"; a="248826902" X-IronPort-AV: E=Sophos;i="5.81,199,1610438400"; d="scan'208";a="248826902" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2021 03:45:51 -0800 IronPort-SDR: 5UrFmeeNfF4pZtmSsYM0CJbyqHOx/6UX1HXjI2ZtVxcLJOryxDE61ProlznNJsAF3QEDCPn3H8 jn/dKbif8UHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,199,1610438400"; d="scan'208";a="403483228" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga007.jf.intel.com with ESMTP; 23 Feb 2021 03:45:51 -0800 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 23 Feb 2021 03:45:50 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 23 Feb 2021 03:45:50 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 23 Feb 2021 03:45:50 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Tue, 23 Feb 2021 03:45:49 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hui3rtzWDfowhd87CuKz56QBPxMtSKInZGXrTViMvb196+SAQalZ/Bmxhza0PxNQiTzL3QaPhXd4f+zSh/2k6Hhl2jXaBbEfUfgmbzOW0hZa9r1TgbrtmZhZG9sLrZKfuxbr+GyocEreTKZzxjhhGJ98cH87Ekm8rn6deCqwS9YG7zDXR6+MgCC7PgAtbCcy8TwbBXccx+kQc8q71eINFYUL1kmR/oNLAgIz5yIH/brEzrzhtCrClGEyrRu5ku5AVfaMvSusQpYdWq6bAVGNUTOFgyLuRIW1gfBdmtMscZ5qiONpoY8ecPWMT6Oz8Mzoxlym5JAduApiNn0BxiOqWg== 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=TMqWYbnO+X9OO8+hB+W67EF8KTYlsbvqhDkzCPoPzxs=; b=ZDhzYMk5usPaywMQAPgeMc+UvKdH1EYpkLvvqgAXoTT6CgL9mXuQycP2rzcEt/KiCjjWQFeXWRH31UtROYhkHF/LoCPs1q1vt2QBjGRX4Kf3a0hJy0uoN7Du2H9VhFIRSFK+vVwpYHdL/kmFUJiRDr5r5lum51tg4wNMu6YaB4RKOMVTYkFn3F2VjKOit9DyMkUpItqCUBf2G/Xo1+0WTru3ycUcRRYN/wGO4VgP3Qu9QQDrHp06rnF/1x0zph3YY6m6W4fGnyIOA2/ThdcPw1Sy9LG/X1M55f7i4VsWnebyxwSQFTkvxP2ETPSjMqXjxXfWOqqw5bTbOpJQ3fvsWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TMqWYbnO+X9OO8+hB+W67EF8KTYlsbvqhDkzCPoPzxs=; b=NkIb/pQToG+YD/1KrcwU1+AWCcTB1xqGZVAC0Ch+GwDAIHcinLS20nwEgmQStpIXT/izqSYg63zSK92GyTk143uueNNKoiBczPKZRVcMO7MxvK/KMimLNncrGI1+vdxmqXqenZVosqdnCbIiIYy3PAwyLA/cSHd2Q22nbX2U0s0= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN8PR11MB3796.namprd11.prod.outlook.com (2603:10b6:408:90::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.32; Tue, 23 Feb 2021 11:45:48 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::e543:2d99:1ff3:33c7]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::e543:2d99:1ff3:33c7%4]) with mapi id 15.20.3868.032; Tue, 23 Feb 2021 11:45:48 +0000 From: "Wang, Haiyue" To: Stephen Hemminger , Xueming Li CC: "dev@dpdk.org" , Viacheslav Ovsiienko , Asaf Penso Thread-Topic: [dpdk-dev] [PATCH v6 0/9] ethdev: support SubFunction representor Thread-Index: AQHXAoDlMoYK8OPy9U6ntanMAOCvbaplCKWAgACjT2A= Date: Tue, 23 Feb 2021 11:45:48 +0000 Message-ID: References: <1608303356-13089-2-git-send-email-xuemingl@nvidia.com> <1613272907-22563-1-git-send-email-xuemingl@nvidia.com> <20210222175431.05de1f2b@hermes.local> In-Reply-To: <20210222175431.05de1f2b@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.0.76 authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.202] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 26511496-7564-43df-6dde-08d8d7f0902f x-ms-traffictypediagnostic: BN8PR11MB3796: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: zYBrHaUca3vS1kjaNGB0DmN4WjlE7AWAg731H6gNivPcnVFNvjArtuWAKa7MWC5xsuO+dAN8pakk9tJWghIj7CgpA+8GcXCO3XdI/0Ef5tyt800+QG3R5Y2mzkXamu3Cdr3ym/XLGso98YCXA8xJiPrZicTH/XsVcHbF4K0qtmSAiVRMDkx6p3UcLywwXmGdglvzOiOWnL1GkhnNd+TO1KbKTX33aV3PF64mLy+T+am59oflvaL63WJgGMVEEZz9VWO5bqeEbvhJeGK1pJj4f0lMCxKbNB77h4XNbZD+Vhy5D1PdT1J9agwgANeaBb4QsL6hdfJZhwry+duQg0OK85BMhnu+5VsBxzIxptWy8cemh4wRWV6hkAcbHv9mDr9OPhxr+Eze4U+/bhg98Bcd/bg4oEWgELX7GuLTWJIrWZJ5rcxDF1Yy5KgiF9wl2vsnB8qgu048G21NcvXegOtZ/x6CgBDCXi+FL4GIPi5yUbfTZf73Hkkra+l+09QKKc/zHbbhjRIeXzMoAKSdLR+IWgoDH885/XKIRbSQ8tjKWN2cQK3Wk3HoebDeCr029zbwpdklouDD9tRzg6/xgvBGFi/HbLSt7Bzya/7BUN1w10E= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(39860400002)(396003)(136003)(366004)(376002)(9686003)(966005)(64756008)(26005)(66556008)(66446008)(86362001)(66476007)(33656002)(52536014)(76116006)(83380400001)(186003)(7696005)(66946007)(8676002)(5660300002)(55016002)(478600001)(2906002)(110136005)(54906003)(8936002)(316002)(71200400001)(6506007)(53546011)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?F20yUMl77R3P/+4Ke6ld2jvoRotRUjWC1Ss0UVhPOyF29jWq8gDDnMoGOkWM?= =?us-ascii?Q?8RswUW27XkMgak7QJ/vMdFUcaQ0Uubh5FqfypM54iQ1q4GZPzy7VYtVv7V9+?= =?us-ascii?Q?JWAWzk9h50eQR2UVdjdgbVGXHqhc5GVrf6FrewWUdcoikUS0Wv+AoK4ii17A?= =?us-ascii?Q?5kwIbiHDgK1P0j09PHTMMvyCKeJG4YC9nKo9TQD1oWUT+SiUdRPr9Hkdka+g?= =?us-ascii?Q?lE5b6OAORSV/iYUrM2KtJrVrWGO6qD99MTKnIuaLAI8nlDuADhK3hTHXsdoz?= =?us-ascii?Q?9EHEFiPtroiUFRyTjXjQNYtIeS9kCDK55Ra2Pljt1vZ8lFWISfIHMr7fZsTI?= =?us-ascii?Q?ZuYWsN0lLdALbN7wXuixEcWNNn+2PbQIPRrL7UVBjKWyDB8Qt2ZvrfYN4A2h?= =?us-ascii?Q?qNPJ8Pi1pNhaoTMYPctsMZaqQiL1phbYypacAYhcvG0b7TzZd7frOAHqx4XA?= =?us-ascii?Q?lCgca9U+dE2v+PoH++XjaHddxyulE8G8T8mnyqL2Yr3UQOoe5i2j0gQNHsSR?= =?us-ascii?Q?1Km/yRqEbs6GAteyIoEepOGb6q5iMOEGXdpheVnoLhpUoJAon8F10g5DExay?= =?us-ascii?Q?k8xTbV9rGluXHdUsWrdmMOimr9oGIiAaDt/Razv6evR5/snYAy+TC2m8pldo?= =?us-ascii?Q?SVhZIN95jQcT6DPrH9KZvavA9pRthKs0Fp3JhI5j6jkevyZFZSU2JDrhyy3a?= =?us-ascii?Q?Aib8ryxh+LfGPT1uYMRjKLUSyKzuPG2B7kSwifXAwchAD1+YRnPb2NwOl8YM?= =?us-ascii?Q?D/1IQqlbSsbdjnJr6rwDPlg3NvUBLYl3aDim6U/wQ7VB9aMtzo0FB8kFDjBT?= =?us-ascii?Q?yLPlPS39vQNAvvRpvj39+IwI8f0QbwWvyO5KJlThy5JOsTXi8WtI2HBHO8iV?= =?us-ascii?Q?CfUCcEn9k9SHh/7R02m9n2dDc3JASnXLzUCN4A6b0GDjag0vdgXNu8q4dsl0?= =?us-ascii?Q?TzwUkeFhAEfIOErDxMMfokjx0YR9qj2q0oQt+OebISNX4fDmsgThnu0ddlHw?= =?us-ascii?Q?YrFenxbgRSYJ5kz7DSVCDXiajm8PftZ23leaCnbXmjseQIsHWVbeInwzZidD?= =?us-ascii?Q?NgocG2OswR5OSgHelBXwlq+6JZuXQoKxiEguaQESkiySyXcKa+MkRjXqMTyy?= =?us-ascii?Q?w/e+1Me++9tNtaHhDTsVIienv1gJz3HOECeu5g0fpUPGLauYGLjGtVGLAxmi?= =?us-ascii?Q?VCI6lTPHw5b9su7A0c+AKQzKGSiv5WO/oyW53/SxRZOekEsE1vZ+Kj5577Ns?= =?us-ascii?Q?bxw1bOLQjztcSQtlYwN4J7KFSXqX2GVtjtO+vOWQUzu8EHKU2gIWV+qycp4h?= =?us-ascii?Q?aUqLuHx5V7FZz4u1LxRNJ30Z?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26511496-7564-43df-6dde-08d8d7f0902f X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2021 11:45:48.3595 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kxRSO5BI4ifjSbpkP4u/np2B4xG5fcFrmmOY6OObo3Jl4wdT+41BgLIskE9sYH7Yb4KEbr2ZDfUtLnnoRTr8DA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3796 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6 0/9] ethdev: support SubFunction representor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: dev On Behalf Of Stephen Hemminger > Sent: Tuesday, February 23, 2021 09:55 > To: Xueming Li > Cc: dev@dpdk.org; Viacheslav Ovsiienko ; Asaf Pen= so > Subject: Re: [dpdk-dev] [PATCH v6 0/9] ethdev: support SubFunction repres= entor >=20 > On Sun, 14 Feb 2021 03:21:30 +0000 > Xueming Li wrote: >=20 > > SubFunction [1] is a portion of the PCI device, a SF netdev has its own > > dedicated queues(txq, rxq). A SF netdev supports E-Switch representatio= n > > offload similar to existing PF and VF representors. A SF shares PCI > > level resources with other SFs and/or with its parent PCI function. > > > > From SmartNIC perspective, when PCI device is shared for multi-host, > > representors for host controller and host PF is required. > > > > This patch set introduces new representor types in addtion to existing > > VF representor. Syntax: > > > > [[c#]pf#]vf#: VF port representor/s from controller/pf > > [[c#]pf#]sf#: SF port representor/s from controller/pf > > #: VF representor - for backwards compatibility > > > > "#" is number instance, list or range, valid examples: > > 1, [1,3,5], [0-3], [0,2-4,6] > > > > For backward compatibility, this patch also introduces new netdev > > capability to indicate the capability of supportting SF representor. > > > > Version history: > > RFC: > > initial version [2] > > V2: > > - separate patch for represnetor infrastructure, controller, pf and > > sf. > > - replace representor ID macro with functions: > > rte_eth_representor_id_encode() > > rte_eth_representor_id_parse() > > - new patch to allow devargs with same PCI BDF but different > > representors. > > - other minor code updates according to comments, thanks Andrew! > > - update document > > V3: > > - improve probing of allowed devargs with same name. > > - parse single word of kvargs as key. > > - update kvargs test cases. > > V4: > > - split first representor refactor patch into > > 1: add representor type > > 2: refector representor list parsing > > - push the patch supporting multi-devargs for same device. > > V5: > > - add comments for parsing functions > > - update switch_representation.rst - Thanks Ajit > > V6: > > - split representor types into different patches, move to > > rte_ethdev.h > > - improvements of rte_eth_devargs_process_list() according to > > Andrew's suggestion > > - fixed PF probe failure for Intel i40e > > - replace ethdev SF capability with rte_eth_representor_info_get() > > - add new ethdev ops api to get representor info from PMD > > - replace representor ID encode/decode with conversion from > > representor info > > - change ethdev representor iterator to use new ID encoding > > > > > > Xueming Li (9): > > ethdev: introduce representor type > > ethdev: support representor port list > > ethdev: support new VF representor syntax > > ethdev: support sub function representor > > ethdev: support PF index in representor > > ethdev: support multi-host in representor > > ethdev: new API to get representor info > > ethdev: representor iterator compare complete info > > kvargs: update parser to support lists > > > > app/test/test_kvargs.c | 46 ++++- > > config/rte_config.h | 1 + > > doc/guides/prog_guide/poll_mode_drv.rst | 13 +- > > .../prog_guide/switch_representation.rst | 35 +++- > > drivers/net/bnxt/bnxt_ethdev.c | 7 + > > drivers/net/enic/enic_ethdev.c | 6 + > > drivers/net/i40e/i40e_ethdev.c | 7 + > > drivers/net/ixgbe/ixgbe_ethdev.c | 7 + > > drivers/net/mlx5/linux/mlx5_os.c | 11 ++ > > lib/librte_ethdev/ethdev_driver.h | 49 ++++- > > lib/librte_ethdev/ethdev_private.c | 173 ++++++++++++------ > > lib/librte_ethdev/ethdev_private.h | 3 - > > lib/librte_ethdev/rte_class_eth.c | 40 ++-- > > lib/librte_ethdev/rte_ethdev.c | 102 ++++++++++- > > lib/librte_ethdev/rte_ethdev.h | 53 ++++++ > > lib/librte_ethdev/version.map | 4 + > > lib/librte_kvargs/rte_kvargs.c | 101 +++++++--- > > 17 files changed, 535 insertions(+), 123 deletions(-) > > >=20 > A couple of higher level design questions: > 1. How does Linux and other OS handle this in their API? > 2. This solution seems quite tied into a specific implementation on your = hardware. > Is there a PCI standard for this? > 3. Maybe a more general solution where these were represented as buses wo= uld > allow for other connection methods in the future? It should be "auxiliary bus", I think. ;-) https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/dri= vers/base/auxiliary.c mlx5 subfunction support https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?= id=3D24a790da0ac4d9bcce2a9becc8799241716672f6