From patchwork Wed Aug 3 09:10:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikas Gupta X-Patchwork-Id: 12935300 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66365C19F2C for ; Wed, 3 Aug 2022 09:10:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235972AbiHCJKu (ORCPT ); Wed, 3 Aug 2022 05:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236544AbiHCJKj (ORCPT ); Wed, 3 Aug 2022 05:10:39 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A43CBCBC for ; Wed, 3 Aug 2022 02:10:38 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id f192so6448168pfa.9 for ; Wed, 03 Aug 2022 02:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=message-id:date:subject:cc:to:from:from:to:cc; bh=7nC1kn14hSb6XfNcg7iyF0+f7Dd42bPZouKa4KQzkRc=; b=OWA7thdDyz+4DDdn7aPFQtWlRVM2kZR7McUNpwcTn0UnXgWSQk6Diviv1mk7l3nCU0 x835+pgVi93P8oZr7ZFCsq8qwBGLvGwxva70Q8lhT8KnpQ7KmRmj2gx5+b8EoQA5+O74 Q8k4DrWCBokmfnQ8ckA9m3z+bBex+BKHZr3eE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=7nC1kn14hSb6XfNcg7iyF0+f7Dd42bPZouKa4KQzkRc=; b=TxL6+sKzR7RNdLsJAVzGrKzzehLBXAdnBmLHzw05MNUxtBDGiCUsVwuwzuz6yItwc1 iwkugz9ZyOXQizKjBQoIU24e2JOgB9rAGI4B9Wl6ADoOHwUxS4MOyX5ChpvbeOHaSrLg /9+tpuRNFH87n2rNIELY5dNzVpfAqCdunHE4BBX3Dy4Cs7iGiWfNPxxDkH3uTl7vfO+0 Vsv72i6sLGFs/WZ0fMc1wRL4Qc5GYLoX7ujByCPNM7LPYv5JrFj45VD4OrrOLlpWIkl6 Iq5JQWiUV/mIUQOz4PVQer5EXaiIhfaCFPbGhZ2cCRrp9PM+cC10K4fhh2KYST6nbP8D t+jA== X-Gm-Message-State: AJIora9P2A8gIQL0fODLP0qSXbowZyJJrGsexvuP98GUzuCDzjaEfRAz xPXUK+ETrA1bALnsGDMWw8LrEA== X-Google-Smtp-Source: AGRyM1sTxbcNxXzwC8k9sgrLopp6r/s02y6ILfnv3LBtA5T6HLy9RPBxAWQKmvIWxljkAFx2uT/bQw== X-Received: by 2002:a05:6a00:1946:b0:52a:e551:2241 with SMTP id s6-20020a056a00194600b0052ae5512241mr24253782pfk.29.1659517837604; Wed, 03 Aug 2022 02:10:37 -0700 (PDT) Received: from rahul_yocto_ubuntu18.ibn.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id ik25-20020a170902ab1900b0016d6963cb12sm1315960plb.304.2022.08.03.02.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 02:10:35 -0700 (PDT) From: Vikas Gupta To: jiri@nvidia.com, dsahern@kernel.org, stephen@networkplumber.org Cc: kuba@kernel.org, netdev@vger.kernel.org, edumazet@google.com, michael.chan@broadcom.com, andrew.gospodarek@broadcom.com, Vikas Gupta Subject: [PATCH iproute2-next v5 0/2] devlink: add support to run selftest Date: Wed, 3 Aug 2022 14:40:23 +0530 Message-Id: <20220803091025.30800-1-vikas.gupta@broadcom.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: dsahern@gmail.com Hi, This patchset adds support in devlink to run selftests. A related patchset for kernel has been merged. Below are the few examples for the commands implemented in the patchset. Examples: $ devlink dev selftests run pci/0000:03:00.0 id flash pci/0000:03:00.0: flash: status passed $ devlink dev selftests show pci/0000:03:00.0 pci/0000:03:00.0 flash changes from: v4->v5 Addressed the comments by jiri@nvidia.com. Change in json output for seltests show command. v3->v4 Updated with the UAPI kernel header and hence related implementation for selftests impacted due to reorganization of enums/attributes. v2->v3 a) Update the implementation of commands according to the latest patch set of kernel devlink patch. b) Added bash-completion. v1->v2 a) Changes required to implement command due to changes in kernel patch (under review). b) Added commands descriptions in devlink-dev man page. Thanks, Vikas Vikas Gupta (2): devlink: update the devlink.h devlink: add support for running selftests bash-completion/devlink | 30 +++- devlink/devlink.c | 328 +++++++++++++++++++++++++++++++++++ include/uapi/linux/devlink.h | 31 ++++ man/man8/devlink-dev.8 | 46 +++++ 4 files changed, 434 insertions(+), 1 deletion(-)