From patchwork Fri Dec 18 15:16:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xueming Li X-Patchwork-Id: 85471 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 12F9CA09FD; Fri, 18 Dec 2020 16:17:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C6BF5CB00; Fri, 18 Dec 2020 16:17:13 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 2EC6DCADA for ; Fri, 18 Dec 2020 16:17:10 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@nvidia.com) with SMTP; 18 Dec 2020 17:17:04 +0200 Received: from nvidia.com (pegasus05.mtr.labs.mlnx [10.210.16.100]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BIFH4qY010856; Fri, 18 Dec 2020 17:17:04 +0200 From: Xueming Li To: Viacheslav Ovsiienko , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Olivier Matz , Matan Azrad Cc: dev@dpdk.org, xuemingl@nvidia.com, Asaf Penso Date: Fri, 18 Dec 2020 15:16:45 +0000 Message-Id: <1608304614-13908-1-git-send-email-xuemingl@nvidia.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [RFC 0/9] support global syntax 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" New Global device syntax [1] is used to identify a device with full bus, class and driver description, example: -a bus=pci,id=82:00.0/class=eth/driver=mlx5,dv_flow_en=1 This patch try to enable global syntax with backward compatibility by trying to new global syntax firstle and fallback to legacy parsing. For PCI device, BDF is retrived from the "id" attribute of bus section, parse from device name if "id" not available. [1]: https://www.dpdk.org/wp-content/uploads/sites/35/2018/10/am-07-DPDK-hotplug-20180905.pdf Xueming Li (9): devargs: fix data buffer storage type devargs: fix memory leak on parsing error devargs: fix memory leak in legacy parser devargs: fix buffer data memory leak kvargs: add get by key function devargs: support new global device syntax bus/pci: add new global device syntax support common/mlx5: support device global syntax net/mlx5: support new device global syntax app/test-pmd/config.c | 4 +-- app/test-pmd/testpmd.c | 4 +-- drivers/bus/pci/pci_common.c | 18 ++++++++-- drivers/bus/vdev/vdev.c | 5 +-- drivers/common/mlx5/mlx5_common_pci.c | 6 +++- drivers/net/failsafe/failsafe_args.c | 3 +- drivers/net/failsafe/failsafe_eal.c | 2 +- drivers/net/mlx5/linux/mlx5_os.c | 18 ++++++++-- drivers/net/mlx5/mlx5.c | 6 +++- examples/multi_process/hotplug_mp/commands.c | 8 ++--- examples/vdpa/main.c | 6 ++-- lib/librte_eal/common/eal_common_dev.c | 7 ++-- lib/librte_eal/common/eal_common_devargs.c | 36 ++++++++++++++++---- lib/librte_eal/common/hotplug_mp.c | 5 ++- lib/librte_eal/include/rte_dev.h | 2 +- lib/librte_eal/include/rte_devargs.h | 2 +- lib/librte_ethdev/rte_ethdev.c | 5 +-- lib/librte_kvargs/rte_kvargs.c | 20 +++++++++++ lib/librte_kvargs/rte_kvargs.h | 14 ++++++++ lib/librte_kvargs/version.map | 1 + 20 files changed, 134 insertions(+), 38 deletions(-)